ipctl 59 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 60 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 74 drivers/pinctrl/freescale/pinctrl-imx.c dev_err(ipctl->dev, "unable to find group for node %pOFn\n", np); ipctl 162 drivers/pinctrl/freescale/pinctrl-imx.c static int imx_pmx_set_one_pin_mmio(struct imx_pinctrl *ipctl, ipctl 165 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 171 drivers/pinctrl/freescale/pinctrl-imx.c pin_reg = &ipctl->pin_regs[pin_id]; ipctl 174 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(ipctl->dev, "Pin(%s) does not support mux function\n", ipctl 182 drivers/pinctrl/freescale/pinctrl-imx.c reg = readl(ipctl->base + pin_reg->mux_reg); ipctl 185 drivers/pinctrl/freescale/pinctrl-imx.c writel(reg, ipctl->base + pin_reg->mux_reg); ipctl 186 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%x\n", ipctl 189 drivers/pinctrl/freescale/pinctrl-imx.c writel(pin_mmio->mux_mode, ipctl->base + pin_reg->mux_reg); ipctl 190 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%x\n", ipctl 217 drivers/pinctrl/freescale/pinctrl-imx.c val = readl(ipctl->base + pin_mmio->input_reg); ipctl 220 drivers/pinctrl/freescale/pinctrl-imx.c writel(val, ipctl->base + pin_mmio->input_reg); ipctl 226 drivers/pinctrl/freescale/pinctrl-imx.c if (ipctl->input_sel_base) ipctl 227 drivers/pinctrl/freescale/pinctrl-imx.c writel(pin_mmio->input_val, ipctl->input_sel_base + ipctl 230 drivers/pinctrl/freescale/pinctrl-imx.c writel(pin_mmio->input_val, ipctl->base + ipctl 232 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(ipctl->dev, ipctl 243 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 244 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 265 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(ipctl->dev, "enable function %s group %s\n", ipctl 276 drivers/pinctrl/freescale/pinctrl-imx.c err = imx_pmx_set_one_pin_mmio(ipctl, pin); ipctl 293 drivers/pinctrl/freescale/pinctrl-imx.c static u32 imx_pinconf_decode_generic_config(struct imx_pinctrl *ipctl, ipctl 297 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 329 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl) ipctl 331 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 332 drivers/pinctrl/freescale/pinctrl-imx.c struct pinctrl_dev *pctl = ipctl->pctl; ipctl 345 drivers/pinctrl/freescale/pinctrl-imx.c return imx_pinconf_decode_generic_config(ipctl, configs, num_configs); ipctl 351 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 352 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 353 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pin_reg *pin_reg = &ipctl->pin_regs[pin_id]; ipctl 356 drivers/pinctrl/freescale/pinctrl-imx.c dev_err(ipctl->dev, "Pin(%s) does not support config function\n", ipctl 361 drivers/pinctrl/freescale/pinctrl-imx.c *config = readl(ipctl->base + pin_reg->conf_reg); ipctl 372 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 373 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 385 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 386 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 387 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pin_reg *pin_reg = &ipctl->pin_regs[pin_id]; ipctl 391 drivers/pinctrl/freescale/pinctrl-imx.c dev_err(ipctl->dev, "Pin(%s) does not support config function\n", ipctl 396 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(ipctl->dev, "pinconf set pin %s\n", ipctl 402 drivers/pinctrl/freescale/pinctrl-imx.c reg = readl(ipctl->base + pin_reg->conf_reg); ipctl 405 drivers/pinctrl/freescale/pinctrl-imx.c writel(reg, ipctl->base + pin_reg->conf_reg); ipctl 406 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%x\n", ipctl 409 drivers/pinctrl/freescale/pinctrl-imx.c writel(configs[i], ipctl->base + pin_reg->conf_reg); ipctl 410 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(ipctl->dev, "write: offset 0x%x val 0x%lx\n", ipctl 422 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 423 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 436 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 437 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 445 drivers/pinctrl/freescale/pinctrl-imx.c dev_err(ipctl->dev, "failed to get %s pinconf\n", ipctl 451 drivers/pinctrl/freescale/pinctrl-imx.c pin_reg = &ipctl->pin_regs[pin_id]; ipctl 457 drivers/pinctrl/freescale/pinctrl-imx.c config = readl(ipctl->base + pin_reg->conf_reg); ipctl 514 drivers/pinctrl/freescale/pinctrl-imx.c static void imx_pinctrl_parse_pin_mmio(struct imx_pinctrl *ipctl, ipctl 519 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 540 drivers/pinctrl/freescale/pinctrl-imx.c pin_reg = &ipctl->pin_regs[*pin_id]; ipctl 550 drivers/pinctrl/freescale/pinctrl-imx.c pin_mmio->config = imx_pinconf_parse_generic_config(np, ipctl); ipctl 563 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(ipctl->dev, "%s: 0x%x 0x%08lx", info->pins[*pin_id].name, ipctl 569 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl, ipctl 572 drivers/pinctrl/freescale/pinctrl-imx.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 578 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(ipctl->dev, "group(%d): %pOFn\n", index, np); ipctl 607 drivers/pinctrl/freescale/pinctrl-imx.c dev_err(ipctl->dev, ipctl 615 drivers/pinctrl/freescale/pinctrl-imx.c dev_err(ipctl->dev, "Invalid fsl,pins or pins property in node %pOF\n", np); ipctl 620 drivers/pinctrl/freescale/pinctrl-imx.c grp->data = devm_kcalloc(ipctl->dev, ipctl 623 drivers/pinctrl/freescale/pinctrl-imx.c grp->pins = devm_kcalloc(ipctl->dev, ipctl 632 drivers/pinctrl/freescale/pinctrl-imx.c imx_pinctrl_parse_pin_scu(ipctl, &grp->pins[i], ipctl 635 drivers/pinctrl/freescale/pinctrl-imx.c imx_pinctrl_parse_pin_mmio(ipctl, &grp->pins[i], ipctl 643 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl, ipctl 646 drivers/pinctrl/freescale/pinctrl-imx.c struct pinctrl_dev *pctl = ipctl->pctl; ipctl 662 drivers/pinctrl/freescale/pinctrl-imx.c dev_err(ipctl->dev, "no groups defined in %pOF\n", np); ipctl 665 drivers/pinctrl/freescale/pinctrl-imx.c func->group_names = devm_kcalloc(ipctl->dev, func->num_group_names, ipctl 673 drivers/pinctrl/freescale/pinctrl-imx.c grp = devm_kzalloc(ipctl->dev, sizeof(struct group_desc), ipctl 680 drivers/pinctrl/freescale/pinctrl-imx.c mutex_lock(&ipctl->mutex); ipctl 682 drivers/pinctrl/freescale/pinctrl-imx.c ipctl->group_index++, grp); ipctl 683 drivers/pinctrl/freescale/pinctrl-imx.c mutex_unlock(&ipctl->mutex); ipctl 685 drivers/pinctrl/freescale/pinctrl-imx.c imx_pinctrl_parse_groups(child, grp, ipctl, i++); ipctl 720 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl) ipctl 724 drivers/pinctrl/freescale/pinctrl-imx.c struct pinctrl_dev *pctl = ipctl->pctl; ipctl 751 drivers/pinctrl/freescale/pinctrl-imx.c mutex_lock(&ipctl->mutex); ipctl 753 drivers/pinctrl/freescale/pinctrl-imx.c mutex_unlock(&ipctl->mutex); ipctl 757 drivers/pinctrl/freescale/pinctrl-imx.c ipctl->group_index = 0; ipctl 767 drivers/pinctrl/freescale/pinctrl-imx.c imx_pinctrl_parse_functions(np, ipctl, 0); ipctl 771 drivers/pinctrl/freescale/pinctrl-imx.c imx_pinctrl_parse_functions(child, ipctl, i++); ipctl 781 drivers/pinctrl/freescale/pinctrl-imx.c static void imx_free_resources(struct imx_pinctrl *ipctl) ipctl 783 drivers/pinctrl/freescale/pinctrl-imx.c if (ipctl->pctl) ipctl 784 drivers/pinctrl/freescale/pinctrl-imx.c pinctrl_unregister(ipctl->pctl); ipctl 794 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl; ipctl 810 drivers/pinctrl/freescale/pinctrl-imx.c ipctl = devm_kzalloc(&pdev->dev, sizeof(*ipctl), GFP_KERNEL); ipctl 811 drivers/pinctrl/freescale/pinctrl-imx.c if (!ipctl) ipctl 815 drivers/pinctrl/freescale/pinctrl-imx.c ipctl->pin_regs = devm_kmalloc_array(&pdev->dev, info->npins, ipctl 816 drivers/pinctrl/freescale/pinctrl-imx.c sizeof(*ipctl->pin_regs), ipctl 818 drivers/pinctrl/freescale/pinctrl-imx.c if (!ipctl->pin_regs) ipctl 822 drivers/pinctrl/freescale/pinctrl-imx.c ipctl->pin_regs[i].mux_reg = -1; ipctl 823 drivers/pinctrl/freescale/pinctrl-imx.c ipctl->pin_regs[i].conf_reg = -1; ipctl 826 drivers/pinctrl/freescale/pinctrl-imx.c ipctl->base = devm_platform_ioremap_resource(pdev, 0); ipctl 827 drivers/pinctrl/freescale/pinctrl-imx.c if (IS_ERR(ipctl->base)) ipctl 828 drivers/pinctrl/freescale/pinctrl-imx.c return PTR_ERR(ipctl->base); ipctl 837 drivers/pinctrl/freescale/pinctrl-imx.c ipctl->input_sel_base = of_iomap(np, 0); ipctl 839 drivers/pinctrl/freescale/pinctrl-imx.c if (!ipctl->input_sel_base) { ipctl 867 drivers/pinctrl/freescale/pinctrl-imx.c mutex_init(&ipctl->mutex); ipctl 869 drivers/pinctrl/freescale/pinctrl-imx.c ipctl->info = info; ipctl 870 drivers/pinctrl/freescale/pinctrl-imx.c ipctl->dev = &pdev->dev; ipctl 871 drivers/pinctrl/freescale/pinctrl-imx.c platform_set_drvdata(pdev, ipctl); ipctl 873 drivers/pinctrl/freescale/pinctrl-imx.c imx_pinctrl_desc, ipctl, ipctl 874 drivers/pinctrl/freescale/pinctrl-imx.c &ipctl->pctl); ipctl 880 drivers/pinctrl/freescale/pinctrl-imx.c ret = imx_pinctrl_probe_dt(pdev, ipctl); ipctl 888 drivers/pinctrl/freescale/pinctrl-imx.c return pinctrl_enable(ipctl->pctl); ipctl 891 drivers/pinctrl/freescale/pinctrl-imx.c imx_free_resources(ipctl); ipctl 898 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl = dev_get_drvdata(dev); ipctl 900 drivers/pinctrl/freescale/pinctrl-imx.c return pinctrl_force_sleep(ipctl->pctl); ipctl 905 drivers/pinctrl/freescale/pinctrl-imx.c struct imx_pinctrl *ipctl = dev_get_drvdata(dev); ipctl 907 drivers/pinctrl/freescale/pinctrl-imx.c return pinctrl_force_default(ipctl->pctl); ipctl 150 drivers/pinctrl/freescale/pinctrl-imx.h void imx_pinctrl_parse_pin_scu(struct imx_pinctrl *ipctl, ipctl 165 drivers/pinctrl/freescale/pinctrl-imx.h static inline void imx_pinctrl_parse_pin_scu(struct imx_pinctrl *ipctl, ipctl 75 drivers/pinctrl/freescale/pinctrl-imx1-core.c static void __iomem *imx1_mem(struct imx1_pinctrl *ipctl, unsigned int pin_id) ipctl 78 drivers/pinctrl/freescale/pinctrl-imx1-core.c return ipctl->base + port * MX1_PORT_STRIDE; ipctl 85 drivers/pinctrl/freescale/pinctrl-imx1-core.c static void imx1_write_2bit(struct imx1_pinctrl *ipctl, unsigned int pin_id, ipctl 88 drivers/pinctrl/freescale/pinctrl-imx1-core.c void __iomem *reg = imx1_mem(ipctl, pin_id) + reg_offset; ipctl 98 drivers/pinctrl/freescale/pinctrl-imx1-core.c dev_dbg(ipctl->dev, "write: register 0x%p offset %d value 0x%x\n", ipctl 112 drivers/pinctrl/freescale/pinctrl-imx1-core.c static void imx1_write_bit(struct imx1_pinctrl *ipctl, unsigned int pin_id, ipctl 115 drivers/pinctrl/freescale/pinctrl-imx1-core.c void __iomem *reg = imx1_mem(ipctl, pin_id) + reg_offset; ipctl 132 drivers/pinctrl/freescale/pinctrl-imx1-core.c static int imx1_read_2bit(struct imx1_pinctrl *ipctl, unsigned int pin_id, ipctl 135 drivers/pinctrl/freescale/pinctrl-imx1-core.c void __iomem *reg = imx1_mem(ipctl, pin_id) + reg_offset; ipctl 145 drivers/pinctrl/freescale/pinctrl-imx1-core.c static int imx1_read_bit(struct imx1_pinctrl *ipctl, unsigned int pin_id, ipctl 148 drivers/pinctrl/freescale/pinctrl-imx1-core.c void __iomem *reg = imx1_mem(ipctl, pin_id) + reg_offset; ipctl 173 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 174 drivers/pinctrl/freescale/pinctrl-imx1-core.c const struct imx1_pinctrl_soc_info *info = ipctl->info; ipctl 182 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 183 drivers/pinctrl/freescale/pinctrl-imx1-core.c const struct imx1_pinctrl_soc_info *info = ipctl->info; ipctl 192 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 193 drivers/pinctrl/freescale/pinctrl-imx1-core.c const struct imx1_pinctrl_soc_info *info = ipctl->info; ipctl 207 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 210 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_read_bit(ipctl, offset, MX1_GIUS), ipctl 211 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_read_bit(ipctl, offset, MX1_GPR), ipctl 212 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_read_bit(ipctl, offset, MX1_DDIR), ipctl 213 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_read_2bit(ipctl, offset, MX1_OCR), ipctl 214 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_read_2bit(ipctl, offset, MX1_ICONFA), ipctl 215 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_read_2bit(ipctl, offset, MX1_ICONFB)); ipctl 222 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 223 drivers/pinctrl/freescale/pinctrl-imx1-core.c const struct imx1_pinctrl_soc_info *info = ipctl->info; ipctl 299 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 300 drivers/pinctrl/freescale/pinctrl-imx1-core.c const struct imx1_pinctrl_soc_info *info = ipctl->info; ipctl 314 drivers/pinctrl/freescale/pinctrl-imx1-core.c dev_dbg(ipctl->dev, "enable function %s group %s\n", ipctl 332 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_write_bit(ipctl, pin_id, gpio_in_use, MX1_GIUS); ipctl 333 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_write_bit(ipctl, pin_id, direction, MX1_DDIR); ipctl 336 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_write_2bit(ipctl, pin_id, gpio_oconf, MX1_OCR); ipctl 337 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_write_2bit(ipctl, pin_id, gpio_iconfa, ipctl 339 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_write_2bit(ipctl, pin_id, gpio_iconfb, ipctl 342 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_write_bit(ipctl, pin_id, afunction, MX1_GPR); ipctl 351 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 352 drivers/pinctrl/freescale/pinctrl-imx1-core.c const struct imx1_pinctrl_soc_info *info = ipctl->info; ipctl 360 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 361 drivers/pinctrl/freescale/pinctrl-imx1-core.c const struct imx1_pinctrl_soc_info *info = ipctl->info; ipctl 370 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 371 drivers/pinctrl/freescale/pinctrl-imx1-core.c const struct imx1_pinctrl_soc_info *info = ipctl->info; ipctl 389 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 391 drivers/pinctrl/freescale/pinctrl-imx1-core.c *config = imx1_read_bit(ipctl, pin_id, MX1_PUEN); ipctl 400 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 404 drivers/pinctrl/freescale/pinctrl-imx1-core.c imx1_write_bit(ipctl, pin_id, configs[i] & 0x01, MX1_PUEN); ipctl 406 drivers/pinctrl/freescale/pinctrl-imx1-core.c dev_dbg(ipctl->dev, "pinconf set pullup pin %s\n", ipctl 425 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 426 drivers/pinctrl/freescale/pinctrl-imx1-core.c const struct imx1_pinctrl_soc_info *info = ipctl->info; ipctl 594 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *ipctl; ipctl 606 drivers/pinctrl/freescale/pinctrl-imx1-core.c ipctl = devm_kzalloc(&pdev->dev, sizeof(*ipctl), GFP_KERNEL); ipctl 607 drivers/pinctrl/freescale/pinctrl-imx1-core.c if (!ipctl) ipctl 614 drivers/pinctrl/freescale/pinctrl-imx1-core.c ipctl->base = devm_ioremap_nocache(&pdev->dev, res->start, ipctl 616 drivers/pinctrl/freescale/pinctrl-imx1-core.c if (!ipctl->base) ipctl 624 drivers/pinctrl/freescale/pinctrl-imx1-core.c ret = imx1_pinctrl_parse_dt(pdev, ipctl, info); ipctl 630 drivers/pinctrl/freescale/pinctrl-imx1-core.c ipctl->info = info; ipctl 631 drivers/pinctrl/freescale/pinctrl-imx1-core.c ipctl->dev = info->dev; ipctl 632 drivers/pinctrl/freescale/pinctrl-imx1-core.c platform_set_drvdata(pdev, ipctl); ipctl 633 drivers/pinctrl/freescale/pinctrl-imx1-core.c ipctl->pctl = devm_pinctrl_register(&pdev->dev, pctl_desc, ipctl); ipctl 634 drivers/pinctrl/freescale/pinctrl-imx1-core.c if (IS_ERR(ipctl->pctl)) { ipctl 636 drivers/pinctrl/freescale/pinctrl-imx1-core.c return PTR_ERR(ipctl->pctl); ipctl 641 drivers/pinctrl/freescale/pinctrl-imx1-core.c pinctrl_unregister(ipctl->pctl); ipctl 266 drivers/pinctrl/freescale/pinctrl-imx7ulp.c struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 270 drivers/pinctrl/freescale/pinctrl-imx7ulp.c pin_reg = &ipctl->pin_regs[offset]; ipctl 274 drivers/pinctrl/freescale/pinctrl-imx7ulp.c reg = readl(ipctl->base + pin_reg->mux_reg); ipctl 279 drivers/pinctrl/freescale/pinctrl-imx7ulp.c writel(reg, ipctl->base + pin_reg->mux_reg); ipctl 73 drivers/pinctrl/freescale/pinctrl-scu.c struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 99 drivers/pinctrl/freescale/pinctrl-scu.c dev_dbg(ipctl->dev, "write: pin_id %u config 0x%x val 0x%x\n", ipctl 105 drivers/pinctrl/freescale/pinctrl-scu.c void imx_pinctrl_parse_pin_scu(struct imx_pinctrl *ipctl, ipctl 109 drivers/pinctrl/freescale/pinctrl-scu.c const struct imx_pinctrl_soc_info *info = ipctl->info; ipctl 119 drivers/pinctrl/freescale/pinctrl-scu.c dev_dbg(ipctl->dev, "%s: 0x%x 0x%08lx", info->pins[pin->pin].name, ipctl 297 drivers/pinctrl/freescale/pinctrl-vf610.c struct imx_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 301 drivers/pinctrl/freescale/pinctrl-vf610.c pin_reg = &ipctl->pin_regs[offset]; ipctl 306 drivers/pinctrl/freescale/pinctrl-vf610.c reg = readl(ipctl->base + pin_reg->mux_reg); ipctl 311 drivers/pinctrl/freescale/pinctrl-vf610.c writel(reg, ipctl->base + pin_reg->mux_reg); ipctl 175 drivers/pinctrl/pinctrl-rzn1.c static void rzn1_hw_set_lock(struct rzn1_pinctrl *ipctl, u8 lock, u8 value) ipctl 183 drivers/pinctrl/pinctrl-rzn1.c u32 val = ipctl->lev1_protect_phys | !(value & LOCK_LEVEL1); ipctl 185 drivers/pinctrl/pinctrl-rzn1.c writel(val, &ipctl->lev1->status_protect); ipctl 189 drivers/pinctrl/pinctrl-rzn1.c u32 val = ipctl->lev2_protect_phys | !(value & LOCK_LEVEL2); ipctl 191 drivers/pinctrl/pinctrl-rzn1.c writel(val, &ipctl->lev2->status_protect); ipctl 195 drivers/pinctrl/pinctrl-rzn1.c static void rzn1_pinctrl_mdio_select(struct rzn1_pinctrl *ipctl, int mdio, ipctl 198 drivers/pinctrl/pinctrl-rzn1.c if (ipctl->mdio_func[mdio] >= 0 && ipctl->mdio_func[mdio] != func) ipctl 199 drivers/pinctrl/pinctrl-rzn1.c dev_warn(ipctl->dev, "conflicting setting for mdio%d!\n", mdio); ipctl 200 drivers/pinctrl/pinctrl-rzn1.c ipctl->mdio_func[mdio] = func; ipctl 202 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "setting mdio%d to %u\n", mdio, func); ipctl 204 drivers/pinctrl/pinctrl-rzn1.c writel(func, &ipctl->lev2->l2_mdio[mdio]); ipctl 215 drivers/pinctrl/pinctrl-rzn1.c static int rzn1_set_hw_pin_func(struct rzn1_pinctrl *ipctl, unsigned int pin, ipctl 248 drivers/pinctrl/pinctrl-rzn1.c rzn1_pinctrl_mdio_select(ipctl, mdio_channel, mdio_func); ipctl 252 drivers/pinctrl/pinctrl-rzn1.c if (pin >= ARRAY_SIZE(ipctl->lev1->conf) || ipctl 256 drivers/pinctrl/pinctrl-rzn1.c l1 = readl(&ipctl->lev1->conf[pin]); ipctl 258 drivers/pinctrl/pinctrl-rzn1.c l2 = readl(&ipctl->lev2->conf[pin]); ipctl 261 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "setting func for pin %u to %u\n", pin, pin_config); ipctl 275 drivers/pinctrl/pinctrl-rzn1.c writel(l1, &ipctl->lev1->conf[pin]); ipctl 276 drivers/pinctrl/pinctrl-rzn1.c writel(l2, &ipctl->lev2->conf[pin]); ipctl 283 drivers/pinctrl/pinctrl-rzn1.c const struct rzn1_pinctrl *ipctl, const char *name) ipctl 287 drivers/pinctrl/pinctrl-rzn1.c for (i = 0; i < ipctl->ngroups; i++) { ipctl 288 drivers/pinctrl/pinctrl-rzn1.c if (!strcmp(ipctl->groups[i].name, name)) ipctl 289 drivers/pinctrl/pinctrl-rzn1.c return &ipctl->groups[i]; ipctl 297 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 299 drivers/pinctrl/pinctrl-rzn1.c return ipctl->ngroups; ipctl 305 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 307 drivers/pinctrl/pinctrl-rzn1.c return ipctl->groups[selector].name; ipctl 314 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 316 drivers/pinctrl/pinctrl-rzn1.c if (selector >= ipctl->ngroups) ipctl 319 drivers/pinctrl/pinctrl-rzn1.c *pins = ipctl->groups[selector].pins; ipctl 320 drivers/pinctrl/pinctrl-rzn1.c *npins = ipctl->groups[selector].npins; ipctl 338 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 346 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "processing node %pOF\n", np); ipctl 348 drivers/pinctrl/pinctrl-rzn1.c grp = rzn1_pinctrl_find_group_by_name(ipctl, np->name); ipctl 350 drivers/pinctrl/pinctrl-rzn1.c dev_err(ipctl->dev, "unable to find group for node %pOF\n", np); ipctl 359 drivers/pinctrl/pinctrl-rzn1.c dev_err(ipctl->dev, "%pOF: could not parse property\n", np); ipctl 434 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 436 drivers/pinctrl/pinctrl-rzn1.c return ipctl->nfunctions; ipctl 442 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 444 drivers/pinctrl/pinctrl-rzn1.c return ipctl->functions[selector].name; ipctl 452 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 454 drivers/pinctrl/pinctrl-rzn1.c *groups = ipctl->functions[selector].groups; ipctl 455 drivers/pinctrl/pinctrl-rzn1.c *num_groups = ipctl->functions[selector].num_groups; ipctl 463 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 464 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pin_group *grp = &ipctl->groups[group]; ipctl 467 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "set mux %s(%d) group %s(%d)\n", ipctl 468 drivers/pinctrl/pinctrl-rzn1.c ipctl->functions[selector].name, selector, grp->name, group); ipctl 470 drivers/pinctrl/pinctrl-rzn1.c rzn1_hw_set_lock(ipctl, LOCK_ALL, LOCK_ALL); ipctl 472 drivers/pinctrl/pinctrl-rzn1.c rzn1_set_hw_pin_func(ipctl, grp->pins[i], grp->pin_ids[i], 0); ipctl 473 drivers/pinctrl/pinctrl-rzn1.c rzn1_hw_set_lock(ipctl, LOCK_ALL, 0); ipctl 488 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 494 drivers/pinctrl/pinctrl-rzn1.c if (pin >= ARRAY_SIZE(ipctl->lev1->conf)) ipctl 497 drivers/pinctrl/pinctrl-rzn1.c l1 = readl(&ipctl->lev1->conf[pin]); ipctl 520 drivers/pinctrl/pinctrl-rzn1.c l2 = readl(&ipctl->lev2->conf[pin]); ipctl 540 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 547 drivers/pinctrl/pinctrl-rzn1.c if (pin >= ARRAY_SIZE(ipctl->lev1->conf)) ipctl 550 drivers/pinctrl/pinctrl-rzn1.c l1 = readl(&ipctl->lev1->conf[pin]); ipctl 559 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "set pin %d pull up\n", pin); ipctl 564 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "set pin %d pull down\n", pin); ipctl 569 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "set pin %d bias off\n", pin); ipctl 574 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "set pin %d drv %umA\n", pin, arg); ipctl 589 drivers/pinctrl/pinctrl-rzn1.c dev_err(ipctl->dev, ipctl 601 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "set pin %d High-Z\n", pin); ipctl 611 drivers/pinctrl/pinctrl-rzn1.c rzn1_hw_set_lock(ipctl, LOCK_LEVEL1, LOCK_LEVEL1); ipctl 612 drivers/pinctrl/pinctrl-rzn1.c writel(l1, &ipctl->lev1->conf[pin]); ipctl 613 drivers/pinctrl/pinctrl-rzn1.c rzn1_hw_set_lock(ipctl, LOCK_LEVEL1, 0); ipctl 623 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 624 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pin_group *grp = &ipctl->groups[selector]; ipctl 628 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "group get %s selector:%u\n", grp->name, selector); ipctl 649 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = pinctrl_dev_get_drvdata(pctldev); ipctl 650 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pin_group *grp = &ipctl->groups[selector]; ipctl 654 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "group set %s selector:%u configs:%p/%d\n", ipctl 686 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl) ipctl 692 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "%s: %s\n", __func__, np->name); ipctl 704 drivers/pinctrl/pinctrl-rzn1.c dev_err(ipctl->dev, ipctl 711 drivers/pinctrl/pinctrl-rzn1.c dev_err(ipctl->dev, "Invalid " RZN1_PINS_PROP " in node %pOF\n", ipctl 718 drivers/pinctrl/pinctrl-rzn1.c grp->pin_ids = devm_kmalloc_array(ipctl->dev, ipctl 721 drivers/pinctrl/pinctrl-rzn1.c grp->pins = devm_kmalloc_array(ipctl->dev, ipctl 754 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl, ipctl 763 drivers/pinctrl/pinctrl-rzn1.c func = &ipctl->functions[index]; ipctl 769 drivers/pinctrl/pinctrl-rzn1.c dev_err(ipctl->dev, "no groups defined in %pOF\n", np); ipctl 772 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "function %s has %d groups\n", ipctl 775 drivers/pinctrl/pinctrl-rzn1.c func->groups = devm_kmalloc_array(ipctl->dev, ipctl 783 drivers/pinctrl/pinctrl-rzn1.c grp = &ipctl->groups[ipctl->ngroups]; ipctl 785 drivers/pinctrl/pinctrl-rzn1.c ret = rzn1_pinctrl_parse_groups(np, grp, ipctl); ipctl 789 drivers/pinctrl/pinctrl-rzn1.c ipctl->ngroups++; ipctl 794 drivers/pinctrl/pinctrl-rzn1.c grp = &ipctl->groups[ipctl->ngroups]; ipctl 796 drivers/pinctrl/pinctrl-rzn1.c ret = rzn1_pinctrl_parse_groups(child, grp, ipctl); ipctl 802 drivers/pinctrl/pinctrl-rzn1.c ipctl->ngroups++; ipctl 805 drivers/pinctrl/pinctrl-rzn1.c dev_dbg(ipctl->dev, "function %s parsed %u/%u groups\n", ipctl 812 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl) ipctl 825 drivers/pinctrl/pinctrl-rzn1.c ipctl->nfunctions = nfuncs; ipctl 826 drivers/pinctrl/pinctrl-rzn1.c ipctl->functions = devm_kmalloc_array(&pdev->dev, nfuncs, ipctl 827 drivers/pinctrl/pinctrl-rzn1.c sizeof(*ipctl->functions), ipctl 829 drivers/pinctrl/pinctrl-rzn1.c if (!ipctl->functions) ipctl 832 drivers/pinctrl/pinctrl-rzn1.c ipctl->ngroups = 0; ipctl 836 drivers/pinctrl/pinctrl-rzn1.c ipctl->groups = devm_kmalloc_array(&pdev->dev, ipctl 838 drivers/pinctrl/pinctrl-rzn1.c sizeof(*ipctl->groups), ipctl 840 drivers/pinctrl/pinctrl-rzn1.c if (!ipctl->groups) ipctl 844 drivers/pinctrl/pinctrl-rzn1.c ret = rzn1_pinctrl_parse_functions(child, ipctl, i++); ipctl 856 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl; ipctl 861 drivers/pinctrl/pinctrl-rzn1.c ipctl = devm_kzalloc(&pdev->dev, sizeof(*ipctl), GFP_KERNEL); ipctl 862 drivers/pinctrl/pinctrl-rzn1.c if (!ipctl) ipctl 865 drivers/pinctrl/pinctrl-rzn1.c ipctl->mdio_func[0] = -1; ipctl 866 drivers/pinctrl/pinctrl-rzn1.c ipctl->mdio_func[1] = -1; ipctl 869 drivers/pinctrl/pinctrl-rzn1.c ipctl->lev1_protect_phys = (u32)res->start + 0x400; ipctl 870 drivers/pinctrl/pinctrl-rzn1.c ipctl->lev1 = devm_ioremap_resource(&pdev->dev, res); ipctl 871 drivers/pinctrl/pinctrl-rzn1.c if (IS_ERR(ipctl->lev1)) ipctl 872 drivers/pinctrl/pinctrl-rzn1.c return PTR_ERR(ipctl->lev1); ipctl 875 drivers/pinctrl/pinctrl-rzn1.c ipctl->lev2_protect_phys = (u32)res->start + 0x400; ipctl 876 drivers/pinctrl/pinctrl-rzn1.c ipctl->lev2 = devm_ioremap_resource(&pdev->dev, res); ipctl 877 drivers/pinctrl/pinctrl-rzn1.c if (IS_ERR(ipctl->lev2)) ipctl 878 drivers/pinctrl/pinctrl-rzn1.c return PTR_ERR(ipctl->lev2); ipctl 880 drivers/pinctrl/pinctrl-rzn1.c ipctl->clk = devm_clk_get(&pdev->dev, NULL); ipctl 881 drivers/pinctrl/pinctrl-rzn1.c if (IS_ERR(ipctl->clk)) ipctl 882 drivers/pinctrl/pinctrl-rzn1.c return PTR_ERR(ipctl->clk); ipctl 883 drivers/pinctrl/pinctrl-rzn1.c ret = clk_prepare_enable(ipctl->clk); ipctl 887 drivers/pinctrl/pinctrl-rzn1.c ipctl->dev = &pdev->dev; ipctl 892 drivers/pinctrl/pinctrl-rzn1.c ret = rzn1_pinctrl_probe_dt(pdev, ipctl); ipctl 898 drivers/pinctrl/pinctrl-rzn1.c platform_set_drvdata(pdev, ipctl); ipctl 901 drivers/pinctrl/pinctrl-rzn1.c ipctl, &ipctl->pctl); ipctl 907 drivers/pinctrl/pinctrl-rzn1.c ret = pinctrl_enable(ipctl->pctl); ipctl 916 drivers/pinctrl/pinctrl-rzn1.c clk_disable_unprepare(ipctl->clk); ipctl 923 drivers/pinctrl/pinctrl-rzn1.c struct rzn1_pinctrl *ipctl = platform_get_drvdata(pdev); ipctl 925 drivers/pinctrl/pinctrl-rzn1.c clk_disable_unprepare(ipctl->clk);