Lines Matching refs:pmx
660 struct artpec6_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in artpec6_pmx_select_func() local
684 regval = readl(pmx->base + reg); in artpec6_pmx_select_func()
687 writel(regval, pmx->base + reg); in artpec6_pmx_select_func()
695 struct artpec6_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in artpec6_pmx_set() local
697 dev_dbg(pmx->dev, "enabling %s function for pin group %s\n", in artpec6_pmx_set()
710 struct artpec6_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in artpec6_pmx_request_gpio() local
717 val = readl_relaxed(pmx->base + reg); in artpec6_pmx_request_gpio()
720 writel_relaxed(val, pmx->base + reg); in artpec6_pmx_request_gpio()
736 struct artpec6_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in artpec6_pconf_get() local
741 if (pin >= pmx->num_pins) { in artpec6_pconf_get()
742 dev_dbg(pmx->dev, "pinconf is not supported for pin %s\n", in artpec6_pconf_get()
743 pmx->pins[pin].name); in artpec6_pconf_get()
747 dev_dbg(pmx->dev, "getting configuration for pin %s\n", in artpec6_pconf_get()
748 pmx->pins[pin].name); in artpec6_pconf_get()
751 regval = readl(pmx->base + artpec6_pmx_reg_offset(pin)); in artpec6_pconf_get()
797 struct artpec6_pmx *pmx = pinctrl_dev_get_drvdata(pctldev); in artpec6_pconf_set() local
805 if (pin >= pmx->num_pins) { in artpec6_pconf_set()
806 dev_dbg(pmx->dev, "pinconf is not supported for pin %s\n", in artpec6_pconf_set()
807 pmx->pins[pin].name); in artpec6_pconf_set()
811 dev_dbg(pmx->dev, "setting configuration for pin %s\n", in artpec6_pconf_set()
812 pmx->pins[pin].name); in artpec6_pconf_set()
814 reg = pmx->base + artpec6_pmx_reg_offset(pin); in artpec6_pconf_set()
871 dev_dbg(pmx->dev, "parameter not supported\n"); in artpec6_pconf_set()
921 static void artpec6_pmx_reset(struct artpec6_pmx *pmx) in artpec6_pmx_reset() argument
923 void __iomem *base = pmx->base; in artpec6_pmx_reset()
938 struct artpec6_pmx *pmx; in artpec6_pmx_probe() local
940 pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); in artpec6_pmx_probe()
941 if (!pmx) in artpec6_pmx_probe()
944 pmx->dev = &pdev->dev; in artpec6_pmx_probe()
946 pmx->base = devm_platform_ioremap_resource(pdev, 0); in artpec6_pmx_probe()
948 if (IS_ERR(pmx->base)) in artpec6_pmx_probe()
949 return PTR_ERR(pmx->base); in artpec6_pmx_probe()
951 artpec6_pmx_reset(pmx); in artpec6_pmx_probe()
953 pmx->pins = artpec6_pins; in artpec6_pmx_probe()
954 pmx->num_pins = ARRAY_SIZE(artpec6_pins); in artpec6_pmx_probe()
955 pmx->functions = artpec6_pmx_functions; in artpec6_pmx_probe()
956 pmx->num_functions = ARRAY_SIZE(artpec6_pmx_functions); in artpec6_pmx_probe()
957 pmx->pin_groups = artpec6_pin_groups; in artpec6_pmx_probe()
958 pmx->num_pin_groups = ARRAY_SIZE(artpec6_pin_groups); in artpec6_pmx_probe()
959 pmx->pctl = pinctrl_register(&artpec6_desc, &pdev->dev, pmx); in artpec6_pmx_probe()
961 if (IS_ERR(pmx->pctl)) { in artpec6_pmx_probe()
963 return PTR_ERR(pmx->pctl); in artpec6_pmx_probe()
966 platform_set_drvdata(pdev, pmx); in artpec6_pmx_probe()
975 struct artpec6_pmx *pmx = platform_get_drvdata(pdev); in artpec6_pmx_remove() local
977 pinctrl_unregister(pmx->pctl); in artpec6_pmx_remove()