Lines Matching full:pctrl
921 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_groups_count() local
923 return pctrl->ngroups; in bm1880_pctrl_get_groups_count()
929 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_group_name() local
931 return pctrl->groups[selector].name; in bm1880_pctrl_get_group_name()
939 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_group_pins() local
941 *pins = pctrl->groups[selector].pins; in bm1880_pctrl_get_group_pins()
942 *num_pins = pctrl->groups[selector].npins; in bm1880_pctrl_get_group_pins()
958 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pmux_get_functions_count() local
960 return pctrl->nfuncs; in bm1880_pmux_get_functions_count()
966 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pmux_get_function_name() local
968 return pctrl->funcs[selector].name; in bm1880_pmux_get_function_name()
976 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pmux_get_function_groups() local
978 *groups = pctrl->funcs[selector].groups; in bm1880_pmux_get_function_groups()
979 *num_groups = pctrl->funcs[selector].ngroups; in bm1880_pmux_get_function_groups()
987 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pinmux_set_mux() local
988 const struct bm1880_pctrl_group *pgrp = &pctrl->groups[group]; in bm1880_pinmux_set_mux()
989 const struct bm1880_pinmux_function *func = &pctrl->funcs[function]; in bm1880_pinmux_set_mux()
996 u32 regval = readl_relaxed(pctrl->base + BM1880_REG_MUX + in bm1880_pinmux_set_mux()
1002 writel_relaxed(regval, pctrl->base + BM1880_REG_MUX + offset); in bm1880_pinmux_set_mux()
1155 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pinconf_cfg_get() local
1162 regval = readl_relaxed(pctrl->base + BM1880_REG_MUX + offset); in bm1880_pinconf_cfg_get()
1187 ret = bm1880_pinconf_drv_get(pctrl->pinconf[pin].drv_bits, in bm1880_pinconf_cfg_get()
1208 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pinconf_cfg_set() local
1213 regval = readl_relaxed(pctrl->base + BM1880_REG_MUX + offset); in bm1880_pinconf_cfg_set()
1249 pctrl->pinconf[pin].drv_bits, in bm1880_pinconf_cfg_set()
1262 writel_relaxed(regval, pctrl->base + BM1880_REG_MUX + offset); in bm1880_pinconf_cfg_set()
1274 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pinconf_group_set() local
1275 const struct bm1880_pctrl_group *pgrp = &pctrl->groups[selector]; in bm1880_pinconf_group_set()
1314 struct bm1880_pinctrl *pctrl; in bm1880_pinctrl_probe() local
1316 pctrl = devm_kzalloc(&pdev->dev, sizeof(*pctrl), GFP_KERNEL); in bm1880_pinctrl_probe()
1317 if (!pctrl) in bm1880_pinctrl_probe()
1320 pctrl->base = devm_platform_ioremap_resource(pdev, 0); in bm1880_pinctrl_probe()
1321 if (IS_ERR(pctrl->base)) in bm1880_pinctrl_probe()
1322 return PTR_ERR(pctrl->base); in bm1880_pinctrl_probe()
1324 pctrl->groups = bm1880_pctrl_groups; in bm1880_pinctrl_probe()
1325 pctrl->ngroups = ARRAY_SIZE(bm1880_pctrl_groups); in bm1880_pinctrl_probe()
1326 pctrl->funcs = bm1880_pmux_functions; in bm1880_pinctrl_probe()
1327 pctrl->nfuncs = ARRAY_SIZE(bm1880_pmux_functions); in bm1880_pinctrl_probe()
1328 pctrl->pinconf = bm1880_pinconf; in bm1880_pinctrl_probe()
1330 pctrl->pctrldev = devm_pinctrl_register(&pdev->dev, &bm1880_desc, in bm1880_pinctrl_probe()
1331 pctrl); in bm1880_pinctrl_probe()
1332 if (IS_ERR(pctrl->pctrldev)) in bm1880_pinctrl_probe()
1333 return PTR_ERR(pctrl->pctrldev); in bm1880_pinctrl_probe()
1335 platform_set_drvdata(pdev, pctrl); in bm1880_pinctrl_probe()