Lines Matching refs:pmx

47 	struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev);  in sh_pfc_get_groups_count()  local
49 return pmx->pfc->info->nr_groups; in sh_pfc_get_groups_count()
55 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_get_group_name() local
57 return pmx->pfc->info->groups[selector].name; in sh_pfc_get_group_name()
63 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_get_group_pins() local
65 *pins = pmx->pfc->info->groups[selector].pins; in sh_pfc_get_group_pins()
66 *num_pins = pmx->pfc->info->groups[selector].nr_pins; in sh_pfc_get_group_pins()
104 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_dt_subnode_to_map() local
105 struct device *dev = pmx->pfc->dev; in sh_pfc_dt_subnode_to_map()
242 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_dt_node_to_map() local
243 struct device *dev = pmx->pfc->dev; in sh_pfc_dt_node_to_map()
296 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_get_functions_count() local
298 return pmx->pfc->info->nr_functions; in sh_pfc_get_functions_count()
304 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_get_function_name() local
306 return pmx->pfc->info->functions[selector].name; in sh_pfc_get_function_name()
314 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_get_function_groups() local
316 *groups = pmx->pfc->info->functions[selector].groups; in sh_pfc_get_function_groups()
317 *num_groups = pmx->pfc->info->functions[selector].nr_groups; in sh_pfc_get_function_groups()
325 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_func_set_mux() local
326 struct sh_pfc *pfc = pmx->pfc; in sh_pfc_func_set_mux()
338 struct sh_pfc_pin_config *cfg = &pmx->configs[idx]; in sh_pfc_func_set_mux()
357 struct sh_pfc_pin_config *cfg = &pmx->configs[idx]; in sh_pfc_func_set_mux()
371 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_gpio_request_enable() local
372 struct sh_pfc *pfc = pmx->pfc; in sh_pfc_gpio_request_enable()
374 struct sh_pfc_pin_config *cfg = &pmx->configs[idx]; in sh_pfc_gpio_request_enable()
405 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_gpio_disable_free() local
406 struct sh_pfc *pfc = pmx->pfc; in sh_pfc_gpio_disable_free()
408 struct sh_pfc_pin_config *cfg = &pmx->configs[idx]; in sh_pfc_gpio_disable_free()
424 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_gpio_set_direction() local
425 struct sh_pfc *pfc = pmx->pfc; in sh_pfc_gpio_set_direction()
572 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_pinconf_get() local
573 struct sh_pfc *pfc = pmx->pfc; in sh_pfc_pinconf_get()
647 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_pinconf_set() local
648 struct sh_pfc *pfc = pmx->pfc; in sh_pfc_pinconf_set()
730 struct sh_pfc_pinctrl *pmx = pinctrl_dev_get_drvdata(pctldev); in sh_pfc_pinconf_group_set() local
735 pins = pmx->pfc->info->groups[group].pins; in sh_pfc_pinconf_group_set()
736 num_pins = pmx->pfc->info->groups[group].nr_pins; in sh_pfc_pinconf_group_set()
756 static int sh_pfc_map_pins(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx) in sh_pfc_map_pins() argument
761 pmx->pins = devm_kcalloc(pfc->dev, in sh_pfc_map_pins()
762 pfc->info->nr_pins, sizeof(*pmx->pins), in sh_pfc_map_pins()
764 if (unlikely(!pmx->pins)) in sh_pfc_map_pins()
767 pmx->configs = devm_kcalloc(pfc->dev, in sh_pfc_map_pins()
768 pfc->info->nr_pins, sizeof(*pmx->configs), in sh_pfc_map_pins()
770 if (unlikely(!pmx->configs)) in sh_pfc_map_pins()
775 struct pinctrl_pin_desc *pin = &pmx->pins[i]; in sh_pfc_map_pins()
787 struct sh_pfc_pinctrl *pmx; in sh_pfc_register_pinctrl() local
790 pmx = devm_kzalloc(pfc->dev, sizeof(*pmx), GFP_KERNEL); in sh_pfc_register_pinctrl()
791 if (unlikely(!pmx)) in sh_pfc_register_pinctrl()
794 pmx->pfc = pfc; in sh_pfc_register_pinctrl()
796 ret = sh_pfc_map_pins(pfc, pmx); in sh_pfc_register_pinctrl()
800 pmx->pctl_desc.name = DRV_NAME; in sh_pfc_register_pinctrl()
801 pmx->pctl_desc.owner = THIS_MODULE; in sh_pfc_register_pinctrl()
802 pmx->pctl_desc.pctlops = &sh_pfc_pinctrl_ops; in sh_pfc_register_pinctrl()
803 pmx->pctl_desc.pmxops = &sh_pfc_pinmux_ops; in sh_pfc_register_pinctrl()
804 pmx->pctl_desc.confops = &sh_pfc_pinconf_ops; in sh_pfc_register_pinctrl()
805 pmx->pctl_desc.pins = pmx->pins; in sh_pfc_register_pinctrl()
806 pmx->pctl_desc.npins = pfc->info->nr_pins; in sh_pfc_register_pinctrl()
808 ret = devm_pinctrl_register_and_init(pfc->dev, &pmx->pctl_desc, pmx, in sh_pfc_register_pinctrl()
809 &pmx->pctl); in sh_pfc_register_pinctrl()
816 return pinctrl_enable(pmx->pctl); in sh_pfc_register_pinctrl()