Lines Matching refs:pctldev

25 int pinconf_check_ops(struct pinctrl_dev *pctldev)  in pinconf_check_ops()  argument
27 const struct pinconf_ops *ops = pctldev->desc->confops; in pinconf_check_ops()
31 dev_err(pctldev->dev, in pinconf_check_ops()
56 int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin, in pin_config_get_for_pin() argument
59 const struct pinconf_ops *ops = pctldev->desc->confops; in pin_config_get_for_pin()
62 dev_dbg(pctldev->dev, in pin_config_get_for_pin()
67 return ops->pin_config_get(pctldev, pin, config); in pin_config_get_for_pin()
73 struct pinctrl_dev *pctldev; in pin_config_group_get() local
77 pctldev = get_pinctrl_dev_from_devname(dev_name); in pin_config_group_get()
78 if (!pctldev) { in pin_config_group_get()
83 mutex_lock(&pctldev->mutex); in pin_config_group_get()
85 ops = pctldev->desc->confops; in pin_config_group_get()
88 dev_dbg(pctldev->dev, in pin_config_group_get()
94 selector = pinctrl_get_group_selector(pctldev, pin_group); in pin_config_group_get()
100 ret = ops->pin_config_group_get(pctldev, selector, config); in pin_config_group_get()
103 mutex_unlock(&pctldev->mutex); in pin_config_group_get()
110 struct pinctrl_dev *pctldev = setting->pctldev; in pinconf_map_to_setting() local
115 pin = pin_get_from_name(pctldev, in pinconf_map_to_setting()
118 dev_err(pctldev->dev, "could not map pin config for \"%s\"", in pinconf_map_to_setting()
125 pin = pinctrl_get_group_selector(pctldev, in pinconf_map_to_setting()
128 dev_err(pctldev->dev, "could not map group config for \"%s\"", in pinconf_map_to_setting()
150 struct pinctrl_dev *pctldev = setting->pctldev; in pinconf_apply_setting() local
151 const struct pinconf_ops *ops = pctldev->desc->confops; in pinconf_apply_setting()
155 dev_err(pctldev->dev, "missing confops\n"); in pinconf_apply_setting()
162 dev_err(pctldev->dev, "missing pin_config_set op\n"); in pinconf_apply_setting()
165 ret = ops->pin_config_set(pctldev, in pinconf_apply_setting()
170 dev_err(pctldev->dev, in pinconf_apply_setting()
178 dev_err(pctldev->dev, in pinconf_apply_setting()
182 ret = ops->pin_config_group_set(pctldev, in pinconf_apply_setting()
187 dev_err(pctldev->dev, in pinconf_apply_setting()
200 int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin, in pinconf_set_config() argument
205 ops = pctldev->desc->confops; in pinconf_set_config()
209 return ops->pin_config_set(pctldev, pin, configs, nconfigs); in pinconf_set_config()
214 static void pinconf_show_config(struct seq_file *s, struct pinctrl_dev *pctldev, in pinconf_show_config() argument
220 if (pctldev) in pinconf_show_config()
221 confops = pctldev->desc->confops; in pinconf_show_config()
228 confops->pin_config_config_dbg_show(pctldev, s, in pinconf_show_config()
238 struct pinctrl_dev *pctldev; in pinconf_show_map() local
240 pctldev = get_pinctrl_dev_from_devname(map->ctrl_dev_name); in pinconf_show_map()
255 pinconf_show_config(s, pctldev, map->data.configs.configs, in pinconf_show_map()
262 struct pinctrl_dev *pctldev = setting->pctldev; in pinconf_show_setting() local
263 const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; in pinconf_show_setting()
268 desc = pin_desc_get(setting->pctldev, in pinconf_show_setting()
275 pctlops->get_group_name(pctldev, in pinconf_show_setting()
287 pinconf_show_config(s, pctldev, setting->data.configs.configs, in pinconf_show_setting()
291 static void pinconf_dump_pin(struct pinctrl_dev *pctldev, in pinconf_dump_pin() argument
294 const struct pinconf_ops *ops = pctldev->desc->confops; in pinconf_dump_pin()
297 pinconf_generic_dump_pins(pctldev, s, NULL, pin); in pinconf_dump_pin()
299 ops->pin_config_dbg_show(pctldev, s, pin); in pinconf_dump_pin()
304 struct pinctrl_dev *pctldev = s->private; in pinconf_pins_show() local
310 mutex_lock(&pctldev->mutex); in pinconf_pins_show()
313 for (i = 0; i < pctldev->desc->npins; i++) { in pinconf_pins_show()
316 pin = pctldev->desc->pins[i].number; in pinconf_pins_show()
317 desc = pin_desc_get(pctldev, pin); in pinconf_pins_show()
324 pinconf_dump_pin(pctldev, s, pin); in pinconf_pins_show()
328 mutex_unlock(&pctldev->mutex); in pinconf_pins_show()
333 static void pinconf_dump_group(struct pinctrl_dev *pctldev, in pinconf_dump_group() argument
337 const struct pinconf_ops *ops = pctldev->desc->confops; in pinconf_dump_group()
340 pinconf_generic_dump_pins(pctldev, s, gname, 0); in pinconf_dump_group()
342 ops->pin_config_group_dbg_show(pctldev, s, selector); in pinconf_dump_group()
347 struct pinctrl_dev *pctldev = s->private; in pinconf_groups_show() local
348 const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; in pinconf_groups_show()
349 unsigned ngroups = pctlops->get_groups_count(pctldev); in pinconf_groups_show()
356 const char *gname = pctlops->get_group_name(pctldev, selector); in pinconf_groups_show()
359 pinconf_dump_group(pctldev, s, selector, gname); in pinconf_groups_show()
371 struct pinctrl_dev *pctldev) in pinconf_init_device_debugfs() argument
374 devroot, pctldev, &pinconf_pins_fops); in pinconf_init_device_debugfs()
376 devroot, pctldev, &pinconf_groups_fops); in pinconf_init_device_debugfs()