Lines Matching full:pef2256

3  * PEF2256 also known as FALC56 driver
11 #include <linux/framer/pef2256.h>
95 struct pef2256_pinctrl *pef2256 = pinctrl_dev_get_drvdata(pctldev); in pef2256_get_groups_count() local
98 return pef2256->pctrl_desc.npins; in pef2256_get_groups_count()
104 struct pef2256_pinctrl *pef2256 = pinctrl_dev_get_drvdata(pctldev); in pef2256_get_group_name() local
107 return pef2256->pctrl_desc.pins[selector].name; in pef2256_get_group_name()
114 struct pef2256_pinctrl *pef2256 = pinctrl_dev_get_drvdata(pctldev); in pef2256_get_group_pins() local
117 *pins = &pef2256->pctrl_desc.pins[selector].number; in pef2256_get_group_pins()
133 struct pef2256_pinctrl *pef2256 = pinctrl_dev_get_drvdata(pctldev); in pef2256_get_functions_count() local
135 return pef2256->nfunctions; in pef2256_get_functions_count()
141 struct pef2256_pinctrl *pef2256 = pinctrl_dev_get_drvdata(pctldev); in pef2256_get_function_name() local
143 return pef2256->functions[selector].name; in pef2256_get_function_name()
150 struct pef2256_pinctrl *pef2256 = pinctrl_dev_get_drvdata(pctldev); in pef2256_get_function_groups() local
152 *groups = pef2256->functions[selector].groups; in pef2256_get_function_groups()
153 *num_groups = pef2256->functions[selector].ngroups; in pef2256_get_function_groups()
160 struct pef2256_pinctrl *pef2256 = pinctrl_dev_get_drvdata(pctldev); in pef2256_set_mux() local
165 pinreg_desc = pef2256->pctrl_desc.pins[group_selector].drv_data; in pef2256_set_mux()
166 func_val = pef2256->functions[func_selector].func_val; in pef2256_set_mux()
168 return regmap_update_bits(pef2256->regmap, pinreg_desc->offset, in pef2256_set_mux()
272 static int pef2256_register_pinctrl(struct pef2256_pinctrl *pef2256) in pef2256_register_pinctrl() argument
276 pef2256->pctrl_desc.name = dev_name(pef2256->dev); in pef2256_register_pinctrl()
277 pef2256->pctrl_desc.owner = THIS_MODULE; in pef2256_register_pinctrl()
278 pef2256->pctrl_desc.pctlops = &pef2256_pctlops; in pef2256_register_pinctrl()
279 pef2256->pctrl_desc.pmxops = &pef2256_pmxops; in pef2256_register_pinctrl()
280 if (pef2256->version == PEF2256_VERSION_1_2) { in pef2256_register_pinctrl()
281 pef2256->pctrl_desc.pins = pef2256_v12_pins; in pef2256_register_pinctrl()
282 pef2256->pctrl_desc.npins = ARRAY_SIZE(pef2256_v12_pins); in pef2256_register_pinctrl()
283 pef2256->functions = pef2256_v12_functions; in pef2256_register_pinctrl()
284 pef2256->nfunctions = ARRAY_SIZE(pef2256_v12_functions); in pef2256_register_pinctrl()
286 pef2256->pctrl_desc.pins = pef2256_v2x_pins; in pef2256_register_pinctrl()
287 pef2256->pctrl_desc.npins = ARRAY_SIZE(pef2256_v2x_pins); in pef2256_register_pinctrl()
288 pef2256->functions = pef2256_v2x_functions; in pef2256_register_pinctrl()
289 pef2256->nfunctions = ARRAY_SIZE(pef2256_v2x_functions); in pef2256_register_pinctrl()
292 pctrl = devm_pinctrl_register(pef2256->dev, &pef2256->pctrl_desc, pef2256); in pef2256_register_pinctrl()
294 return dev_err_probe(pef2256->dev, PTR_ERR(pctrl), in pef2256_register_pinctrl()
300 static void pef2256_reset_pinmux(struct pef2256_pinctrl *pef2256) in pef2256_reset_pinmux() argument
309 if (pef2256->version == PEF2256_VERSION_1_2) in pef2256_reset_pinmux()
314 regmap_write(pef2256->regmap, PEF2256_PC1, val); in pef2256_reset_pinmux()
315 regmap_write(pef2256->regmap, PEF2256_PC2, val); in pef2256_reset_pinmux()
316 regmap_write(pef2256->regmap, PEF2256_PC3, val); in pef2256_reset_pinmux()
317 regmap_write(pef2256->regmap, PEF2256_PC4, val); in pef2256_reset_pinmux()
323 struct pef2256 *pef2256; in pef2256_pinctrl_probe() local
332 pef2256 = dev_get_drvdata(pdev->dev.parent); in pef2256_pinctrl_probe()
335 pef2256_pinctrl->regmap = pef2256_get_regmap(pef2256); in pef2256_pinctrl_probe()
336 pef2256_pinctrl->version = pef2256_get_version(pef2256); in pef2256_pinctrl_probe()
350 .name = "lantiq-pef2256-pinctrl",
357 MODULE_DESCRIPTION("PEF2256 pin controller driver");