Lines Matching full:pctrl
33 * @pctrl: Pinctrl device
42 struct pinctrl_dev *pctrl; member
827 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pctrl_get_groups_count() local
829 return pctrl->ngroups; in zynq_pctrl_get_groups_count()
835 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pctrl_get_group_name() local
837 return pctrl->groups[selector].name; in zynq_pctrl_get_group_name()
845 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pctrl_get_group_pins() local
847 *pins = pctrl->groups[selector].pins; in zynq_pctrl_get_group_pins()
848 *num_pins = pctrl->groups[selector].npins; in zynq_pctrl_get_group_pins()
864 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pmux_get_functions_count() local
866 return pctrl->nfuncs; in zynq_pmux_get_functions_count()
872 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pmux_get_function_name() local
874 return pctrl->funcs[selector].name; in zynq_pmux_get_function_name()
882 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pmux_get_function_groups() local
884 *groups = pctrl->funcs[selector].groups; in zynq_pmux_get_function_groups()
885 *num_groups = pctrl->funcs[selector].ngroups; in zynq_pmux_get_function_groups()
894 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pinmux_set_mux() local
895 const struct zynq_pctrl_group *pgrp = &pctrl->groups[group]; in zynq_pinmux_set_mux()
896 const struct zynq_pinmux_function *func = &pctrl->funcs[function]; in zynq_pinmux_set_mux()
907 ret = regmap_read(pctrl->syscon, in zynq_pinmux_set_mux()
908 pctrl->pctrl_offset + func->mux, ®); in zynq_pinmux_set_mux()
914 ret = regmap_write(pctrl->syscon, in zynq_pinmux_set_mux()
915 pctrl->pctrl_offset + func->mux, reg); in zynq_pinmux_set_mux()
921 u32 reg, addr = pctrl->pctrl_offset + (4 * pin); in zynq_pinmux_set_mux()
923 ret = regmap_read(pctrl->syscon, addr, ®); in zynq_pinmux_set_mux()
929 ret = regmap_write(pctrl->syscon, addr, reg); in zynq_pinmux_set_mux()
993 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pinconf_cfg_get() local
998 ret = regmap_read(pctrl->syscon, pctrl->pctrl_offset + (4 * pin), ®); in zynq_pinconf_cfg_get()
1052 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pinconf_cfg_set() local
1057 ret = regmap_read(pctrl->syscon, pctrl->pctrl_offset + (4 * pin), ®); in zynq_pinconf_cfg_set()
1113 ret = regmap_write(pctrl->syscon, pctrl->pctrl_offset + (4 * pin), reg); in zynq_pinconf_cfg_set()
1126 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pinconf_group_set() local
1127 const struct zynq_pctrl_group *pgrp = &pctrl->groups[selector]; in zynq_pinconf_group_set()
1165 struct zynq_pinctrl *pctrl; in zynq_pinctrl_probe() local
1167 pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); in zynq_pinctrl_probe()
1168 if (!pctrl) in zynq_pinctrl_probe()
1171 pctrl->syscon = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, in zynq_pinctrl_probe()
1173 if (IS_ERR(pctrl->syscon)) { in zynq_pinctrl_probe()
1175 return PTR_ERR(pctrl->syscon); in zynq_pinctrl_probe()
1183 pctrl->pctrl_offset = res->start; in zynq_pinctrl_probe()
1185 pctrl->groups = zynq_pctrl_groups; in zynq_pinctrl_probe()
1186 pctrl->ngroups = ARRAY_SIZE(zynq_pctrl_groups); in zynq_pinctrl_probe()
1187 pctrl->funcs = zynq_pmux_functions; in zynq_pinctrl_probe()
1188 pctrl->nfuncs = ARRAY_SIZE(zynq_pmux_functions); in zynq_pinctrl_probe()
1190 pctrl->pctrl = devm_pinctrl_register(&pdev->dev, &zynq_desc, pctrl); in zynq_pinctrl_probe()
1191 if (IS_ERR(pctrl->pctrl)) in zynq_pinctrl_probe()
1192 return PTR_ERR(pctrl->pctrl); in zynq_pinctrl_probe()
1194 platform_set_drvdata(pdev, pctrl); in zynq_pinctrl_probe()