Lines Matching full:pctrl
919 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_groups_count() local
921 return pctrl->ngroups; in bm1880_pctrl_get_groups_count()
927 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_group_name() local
929 return pctrl->groups[selector].name; in bm1880_pctrl_get_group_name()
937 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_group_pins() local
939 *pins = pctrl->groups[selector].pins; in bm1880_pctrl_get_group_pins()
940 *num_pins = pctrl->groups[selector].npins; in bm1880_pctrl_get_group_pins()
956 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pmux_get_functions_count() local
958 return pctrl->nfuncs; in bm1880_pmux_get_functions_count()
964 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pmux_get_function_name() local
966 return pctrl->funcs[selector].name; in bm1880_pmux_get_function_name()
974 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pmux_get_function_groups() local
976 *groups = pctrl->funcs[selector].groups; in bm1880_pmux_get_function_groups()
977 *num_groups = pctrl->funcs[selector].ngroups; in bm1880_pmux_get_function_groups()
985 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pinmux_set_mux() local
986 const struct bm1880_pctrl_group *pgrp = &pctrl->groups[group]; in bm1880_pinmux_set_mux()
987 const struct bm1880_pinmux_function *func = &pctrl->funcs[function]; in bm1880_pinmux_set_mux()
994 u32 regval = readl_relaxed(pctrl->base + BM1880_REG_MUX + in bm1880_pinmux_set_mux()
1000 writel_relaxed(regval, pctrl->base + BM1880_REG_MUX + offset); in bm1880_pinmux_set_mux()
1153 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pinconf_cfg_get() local
1160 regval = readl_relaxed(pctrl->base + BM1880_REG_MUX + offset); in bm1880_pinconf_cfg_get()
1185 ret = bm1880_pinconf_drv_get(pctrl->pinconf[pin].drv_bits, in bm1880_pinconf_cfg_get()
1206 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pinconf_cfg_set() local
1211 regval = readl_relaxed(pctrl->base + BM1880_REG_MUX + offset); in bm1880_pinconf_cfg_set()
1247 pctrl->pinconf[pin].drv_bits, in bm1880_pinconf_cfg_set()
1260 writel_relaxed(regval, pctrl->base + BM1880_REG_MUX + offset); in bm1880_pinconf_cfg_set()
1272 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pinconf_group_set() local
1273 const struct bm1880_pctrl_group *pgrp = &pctrl->groups[selector]; in bm1880_pinconf_group_set()
1312 struct bm1880_pinctrl *pctrl; in bm1880_pinctrl_probe() local
1314 pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); in bm1880_pinctrl_probe()
1315 if (!pctrl) in bm1880_pinctrl_probe()
1318 pctrl->base = devm_platform_ioremap_resource(pdev, 0); in bm1880_pinctrl_probe()
1319 if (IS_ERR(pctrl->base)) in bm1880_pinctrl_probe()
1320 return PTR_ERR(pctrl->base); in bm1880_pinctrl_probe()
1322 pctrl->groups = bm1880_pctrl_groups; in bm1880_pinctrl_probe()
1323 pctrl->ngroups = ARRAY_SIZE(bm1880_pctrl_groups); in bm1880_pinctrl_probe()
1324 pctrl->funcs = bm1880_pmux_functions; in bm1880_pinctrl_probe()
1325 pctrl->nfuncs = ARRAY_SIZE(bm1880_pmux_functions); in bm1880_pinctrl_probe()
1326 pctrl->pinconf = bm1880_pinconf; in bm1880_pinctrl_probe()
1328 pctrl->pctrldev = devm_pinctrl_register(&pdev->dev, &bm1880_desc, in bm1880_pinctrl_probe()
1329 pctrl); in bm1880_pinctrl_probe()
1330 if (IS_ERR(pctrl->pctrldev)) in bm1880_pinctrl_probe()
1331 return PTR_ERR(pctrl->pctrldev); in bm1880_pinctrl_probe()
1333 platform_set_drvdata(pdev, pctrl); in bm1880_pinctrl_probe()