pctl 85 arch/alpha/include/asm/core_titan.h titan_64 pctl; pctl 77 arch/alpha/include/asm/core_tsunami.h tsunami_64 pctl; pctl 238 arch/alpha/kernel/core_titan.c union TPAchipPCTL pctl; pctl 241 arch/alpha/kernel/core_titan.c pctl.pctl_q_whole = port->pctl.csr; pctl 243 arch/alpha/kernel/core_titan.c return pctl.pctl_r_bits.apctl_v_agp_present; pctl 342 arch/alpha/kernel/core_titan.c port->pctl.csr |= pctl_m_mwin; pctl 644 arch/alpha/kernel/core_titan.c union TPAchipPCTL pctl; pctl 646 arch/alpha/kernel/core_titan.c pctl.pctl_q_whole = port->pctl.csr; pctl 649 arch/alpha/kernel/core_titan.c pctl.pctl_r_bits.apctl_v_agp_sba_en = agp->mode.bits.sba; pctl 652 arch/alpha/kernel/core_titan.c pctl.pctl_r_bits.apctl_v_agp_rate = 0; /* 1x */ pctl 654 arch/alpha/kernel/core_titan.c pctl.pctl_r_bits.apctl_v_agp_rate = 1; /* 2x */ pctl 657 arch/alpha/kernel/core_titan.c pctl.pctl_r_bits.apctl_v_agp_rate = 2; /* 4x */ pctl 661 arch/alpha/kernel/core_titan.c pctl.pctl_r_bits.apctl_v_agp_hp_rd = 2; pctl 662 arch/alpha/kernel/core_titan.c pctl.pctl_r_bits.apctl_v_agp_lp_rd = 7; pctl 667 arch/alpha/kernel/core_titan.c pctl.pctl_r_bits.apctl_v_agp_en = agp->mode.bits.enable; pctl 671 arch/alpha/kernel/core_titan.c 1 << pctl.pctl_r_bits.apctl_v_agp_rate, pctl 672 arch/alpha/kernel/core_titan.c pctl.pctl_r_bits.apctl_v_agp_sba_en ? " - SBA" : ""); pctl 675 arch/alpha/kernel/core_titan.c port->pctl.csr = pctl.pctl_q_whole; pctl 738 arch/alpha/kernel/core_titan.c union TPAchipPCTL pctl; pctl 795 arch/alpha/kernel/core_titan.c pctl.pctl_q_whole = port->pctl.csr; pctl 797 arch/alpha/kernel/core_titan.c agp->mode.bits.rate = 1 << pctl.pctl_r_bits.apctl_v_agp_rate; pctl 798 arch/alpha/kernel/core_titan.c agp->mode.bits.sba = pctl.pctl_r_bits.apctl_v_agp_sba_en; pctl 800 arch/alpha/kernel/core_titan.c agp->mode.bits.enable = pctl.pctl_r_bits.apctl_v_agp_en; pctl 251 arch/alpha/kernel/core_tsunami.c if (tsunami_probe_read(&pchip->pctl.csr) == 0) pctl 350 arch/alpha/kernel/core_tsunami.c pchip->pctl.csr |= pctl_m_mwin; pctl 238 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t pctl:5; pctl 244 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t pctl:5; pctl 261 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t pctl:5; pctl 267 arch/mips/include/asm/octeon/cvmx-agl-defs.h uint64_t pctl:5; pctl 226 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:5; pctl 230 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:5; pctl 237 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:4; pctl 241 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:4; pctl 252 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:4; pctl 256 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:4; pctl 306 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:5; pctl 308 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:5; pctl 319 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:5; pctl 321 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:5; pctl 470 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:4; pctl 474 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:4; pctl 482 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:4; pctl 486 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:4; pctl 495 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:5; pctl 501 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:5; pctl 510 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:5; pctl 516 arch/mips/include/asm/octeon/cvmx-asxx-defs.h uint64_t pctl:5; pctl 2427 arch/mips/include/asm/octeon/cvmx-lmcx-defs.h uint64_t pctl:5; pctl 2429 arch/mips/include/asm/octeon/cvmx-lmcx-defs.h uint64_t pctl:5; pctl 296 arch/mips/include/asm/octeon/cvmx-mio-defs.h uint64_t pctl:5; pctl 300 arch/mips/include/asm/octeon/cvmx-mio-defs.h uint64_t pctl:5; pctl 307 arch/mips/include/asm/octeon/cvmx-mio-defs.h uint64_t pctl:6; pctl 311 arch/mips/include/asm/octeon/cvmx-mio-defs.h uint64_t pctl:6; pctl 2486 arch/mips/include/asm/octeon/cvmx-mio-defs.h uint64_t pctl:6; pctl 2490 arch/mips/include/asm/octeon/cvmx-mio-defs.h uint64_t pctl:6; pctl 337 arch/mips/include/asm/octeon/cvmx-npi-defs.h uint64_t pctl:5; pctl 341 arch/mips/include/asm/octeon/cvmx-npi-defs.h uint64_t pctl:5; pctl 62 drivers/isdn/hardware/mISDN/w6692.c u8 pctl; pctl 566 drivers/isdn/hardware/mISDN/w6692.c card->pctl |= ((wch->bch.nr & 2) ? W_PCTL_PCX : 0); pctl 567 drivers/isdn/hardware/mISDN/w6692.c WriteW6692(card, W_PCTL, card->pctl); pctl 863 drivers/isdn/hardware/mISDN/w6692.c card->pctl = 0x80; pctl 865 drivers/isdn/hardware/mISDN/w6692.c WriteW6692(card, W_PCTL, card->pctl); pctl 868 drivers/isdn/hardware/mISDN/w6692.c card->pctl = W_PCTL_OE5 | W_PCTL_OE4 | W_PCTL_OE2 | pctl 876 drivers/isdn/hardware/mISDN/w6692.c WriteW6692(card, W_PCTL, card->pctl); pctl 1260 drivers/media/platform/exynos4-is/media-dev.c struct fimc_pinctrl *pctl = &fmd->pinctl; pctl 1262 drivers/media/platform/exynos4-is/media-dev.c pctl->pinctrl = devm_pinctrl_get(dev); pctl 1263 drivers/media/platform/exynos4-is/media-dev.c if (IS_ERR(pctl->pinctrl)) pctl 1264 drivers/media/platform/exynos4-is/media-dev.c return PTR_ERR(pctl->pinctrl); pctl 1266 drivers/media/platform/exynos4-is/media-dev.c pctl->state_default = pinctrl_lookup_state(pctl->pinctrl, pctl 1268 drivers/media/platform/exynos4-is/media-dev.c if (IS_ERR(pctl->state_default)) pctl 1269 drivers/media/platform/exynos4-is/media-dev.c return PTR_ERR(pctl->state_default); pctl 1271 drivers/media/platform/exynos4-is/media-dev.c pctl->state_idle = pinctrl_lookup_state(pctl->pinctrl, pctl 669 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c struct pvr2_ctrl *pctl; pctl 676 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c pctl = pvr2_hdw_get_ctrl_v4l(hdw, ctrl->id); pctl 677 drivers/media/usb/pvrusb2/pvrusb2-v4l2.c if (!pctl) { pctl 1040 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c drv_ctl.s.pctl = 6; pctl 2366 drivers/net/ethernet/mediatek/mtk_eth_soc.c if (eth->pctl) { pctl 2368 drivers/net/ethernet/mediatek/mtk_eth_soc.c regmap_write(eth->pctl, GPIO_DRV_SEL10, 0xa00); pctl 2371 drivers/net/ethernet/mediatek/mtk_eth_soc.c regmap_write(eth->pctl, GPIO_OD33_CTRL8, 0x5); pctl 2374 drivers/net/ethernet/mediatek/mtk_eth_soc.c regmap_write(eth->pctl, GPIO_BIAS_CTRL, 0x0); pctl 2947 drivers/net/ethernet/mediatek/mtk_eth_soc.c eth->pctl = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, pctl 2949 drivers/net/ethernet/mediatek/mtk_eth_soc.c if (IS_ERR(eth->pctl)) { pctl 2951 drivers/net/ethernet/mediatek/mtk_eth_soc.c return PTR_ERR(eth->pctl); pctl 873 drivers/net/ethernet/mediatek/mtk_eth_soc.h struct regmap *pctl; pctl 20 drivers/phy/qualcomm/phy-qcom-usb-hsic.c struct pinctrl *pctl; pctl 56 drivers/phy/qualcomm/phy-qcom-usb-hsic.c pins_default = pinctrl_lookup_state(uphy->pctl, PINCTRL_STATE_DEFAULT); pctl 60 drivers/phy/qualcomm/phy-qcom-usb-hsic.c ret = pinctrl_select_state(uphy->pctl, pins_default); pctl 114 drivers/phy/qualcomm/phy-qcom-usb-hsic.c uphy->pctl = devm_pinctrl_get(&ulpi->dev); pctl 115 drivers/phy/qualcomm/phy-qcom-usb-hsic.c if (IS_ERR(uphy->pctl)) pctl 116 drivers/phy/qualcomm/phy-qcom-usb-hsic.c return PTR_ERR(uphy->pctl); pctl 364 drivers/pinctrl/aspeed/pinctrl-aspeed.c struct pinctrl_dev *pctl; pctl 380 drivers/pinctrl/aspeed/pinctrl-aspeed.c pctl = pinctrl_register(pdesc, &pdev->dev, pdata); pctl 382 drivers/pinctrl/aspeed/pinctrl-aspeed.c if (IS_ERR(pctl)) { pctl 384 drivers/pinctrl/aspeed/pinctrl-aspeed.c return PTR_ERR(pctl); pctl 1404 drivers/pinctrl/bcm/pinctrl-bcm281xx.c struct pinctrl_dev *pctl; pctl 1426 drivers/pinctrl/bcm/pinctrl-bcm281xx.c pctl = devm_pinctrl_register(&pdev->dev, &bcm281xx_pinctrl_desc, pdata); pctl 1427 drivers/pinctrl/bcm/pinctrl-bcm281xx.c if (IS_ERR(pctl)) { pctl 1429 drivers/pinctrl/bcm/pinctrl-bcm281xx.c return PTR_ERR(pctl); pctl 108 drivers/pinctrl/bcm/pinctrl-cygnus-mux.c struct pinctrl_dev *pctl; pctl 993 drivers/pinctrl/bcm/pinctrl-cygnus-mux.c pinctrl->pctl = devm_pinctrl_register(&pdev->dev, &cygnus_pinctrl_desc, pctl 995 drivers/pinctrl/bcm/pinctrl-cygnus-mux.c if (IS_ERR(pinctrl->pctl)) { pctl 997 drivers/pinctrl/bcm/pinctrl-cygnus-mux.c return PTR_ERR(pinctrl->pctl); pctl 118 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c struct pinctrl_dev *pctl; pctl 753 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c chip->pctl = devm_pinctrl_register(chip->dev, pctldesc, chip); pctl 754 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c if (IS_ERR(chip->pctl)) { pctl 756 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c return PTR_ERR(chip->pctl); pctl 121 drivers/pinctrl/bcm/pinctrl-ns2-mux.c struct pinctrl_dev *pctl; pctl 1088 drivers/pinctrl/bcm/pinctrl-ns2-mux.c pinctrl->pctl = pinctrl_register(&ns2_pinctrl_desc, &pdev->dev, pctl 1090 drivers/pinctrl/bcm/pinctrl-ns2-mux.c if (IS_ERR(pinctrl->pctl)) { pctl 1092 drivers/pinctrl/bcm/pinctrl-ns2-mux.c return PTR_ERR(pinctrl->pctl); pctl 75 drivers/pinctrl/bcm/pinctrl-nsp-gpio.c struct pinctrl_dev *pctl; pctl 599 drivers/pinctrl/bcm/pinctrl-nsp-gpio.c chip->pctl = devm_pinctrl_register(chip->dev, pctldesc, chip); pctl 600 drivers/pinctrl/bcm/pinctrl-nsp-gpio.c if (IS_ERR(chip->pctl)) { pctl 602 drivers/pinctrl/bcm/pinctrl-nsp-gpio.c return PTR_ERR(chip->pctl); pctl 115 drivers/pinctrl/bcm/pinctrl-nsp-mux.c struct pinctrl_dev *pctl; pctl 617 drivers/pinctrl/bcm/pinctrl-nsp-mux.c pinctrl->pctl = devm_pinctrl_register(&pdev->dev, &nsp_pinctrl_desc, pctl 619 drivers/pinctrl/bcm/pinctrl-nsp-mux.c if (IS_ERR(pinctrl->pctl)) { pctl 621 drivers/pinctrl/bcm/pinctrl-nsp-mux.c return PTR_ERR(pinctrl->pctl); pctl 1139 drivers/pinctrl/cirrus/pinctrl-lochnagar.c struct pinctrl_dev *pctl; pctl 1201 drivers/pinctrl/cirrus/pinctrl-lochnagar.c pctl = devm_pinctrl_register(dev, desc, priv); pctl 1202 drivers/pinctrl/cirrus/pinctrl-lochnagar.c if (IS_ERR(pctl)) { pctl 1203 drivers/pinctrl/cirrus/pinctrl-lochnagar.c ret = PTR_ERR(pctl); pctl 1053 drivers/pinctrl/cirrus/pinctrl-madera-core.c &priv->pctl); pctl 1071 drivers/pinctrl/cirrus/pinctrl-madera-core.c ret = pinctrl_enable(priv->pctl); pctl 30 drivers/pinctrl/cirrus/pinctrl-madera.h struct pinctrl_dev *pctl; pctl 332 drivers/pinctrl/freescale/pinctrl-imx.c struct pinctrl_dev *pctl = ipctl->pctl; pctl 340 drivers/pinctrl/freescale/pinctrl-imx.c ret = pinconf_generic_parse_dt_config(np, pctl, &configs, pctl 646 drivers/pinctrl/freescale/pinctrl-imx.c struct pinctrl_dev *pctl = ipctl->pctl; pctl 652 drivers/pinctrl/freescale/pinctrl-imx.c dev_dbg(pctl->dev, "parse function(%d): %pOFn\n", index, np); pctl 654 drivers/pinctrl/freescale/pinctrl-imx.c func = pinmux_generic_get_function(pctl, index); pctl 681 drivers/pinctrl/freescale/pinctrl-imx.c radix_tree_insert(&pctl->pin_group_tree, pctl 724 drivers/pinctrl/freescale/pinctrl-imx.c struct pinctrl_dev *pctl = ipctl->pctl; pctl 752 drivers/pinctrl/freescale/pinctrl-imx.c radix_tree_insert(&pctl->pin_function_tree, i, function); pctl 755 drivers/pinctrl/freescale/pinctrl-imx.c pctl->num_functions = nfuncs; pctl 759 drivers/pinctrl/freescale/pinctrl-imx.c pctl->num_groups = of_get_child_count(np); pctl 761 drivers/pinctrl/freescale/pinctrl-imx.c pctl->num_groups = 0; pctl 763 drivers/pinctrl/freescale/pinctrl-imx.c pctl->num_groups += of_get_child_count(child); pctl 783 drivers/pinctrl/freescale/pinctrl-imx.c if (ipctl->pctl) pctl 784 drivers/pinctrl/freescale/pinctrl-imx.c pinctrl_unregister(ipctl->pctl); pctl 874 drivers/pinctrl/freescale/pinctrl-imx.c &ipctl->pctl); pctl 888 drivers/pinctrl/freescale/pinctrl-imx.c return pinctrl_enable(ipctl->pctl); pctl 900 drivers/pinctrl/freescale/pinctrl-imx.c return pinctrl_force_sleep(ipctl->pctl); pctl 907 drivers/pinctrl/freescale/pinctrl-imx.c return pinctrl_force_default(ipctl->pctl); pctl 109 drivers/pinctrl/freescale/pinctrl-imx.h struct pinctrl_dev *pctl; pctl 30 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct pinctrl_dev *pctl; pctl 546 drivers/pinctrl/freescale/pinctrl-imx1-core.c struct imx1_pinctrl *pctl, struct imx1_pinctrl_soc_info *info) pctl 633 drivers/pinctrl/freescale/pinctrl-imx1-core.c ipctl->pctl = devm_pinctrl_register(&pdev->dev, pctl_desc, ipctl); pctl 634 drivers/pinctrl/freescale/pinctrl-imx1-core.c if (IS_ERR(ipctl->pctl)) { pctl 636 drivers/pinctrl/freescale/pinctrl-imx1-core.c return PTR_ERR(ipctl->pctl); pctl 641 drivers/pinctrl/freescale/pinctrl-imx1-core.c pinctrl_unregister(ipctl->pctl); pctl 23 drivers/pinctrl/freescale/pinctrl-mxs.c struct pinctrl_dev *pctl; pctl 552 drivers/pinctrl/freescale/pinctrl-mxs.c d->pctl = pinctrl_register(&mxs_pinctrl_desc, &pdev->dev, d); pctl 553 drivers/pinctrl/freescale/pinctrl-mxs.c if (IS_ERR(d->pctl)) { pctl 555 drivers/pinctrl/freescale/pinctrl-mxs.c ret = PTR_ERR(d->pctl); pctl 92 drivers/pinctrl/mediatek/mtk-eint.c curr_level = eint->gpio_xlate->get_gpio_state(eint->pctl, hwirq); pctl 102 drivers/pinctrl/mediatek/mtk-eint.c curr_level = eint->gpio_xlate->get_gpio_state(eint->pctl, pctl 231 drivers/pinctrl/mediatek/mtk-eint.c err = eint->gpio_xlate->get_gpio_n(eint->pctl, d->hwirq, pctl 245 drivers/pinctrl/mediatek/mtk-eint.c err = eint->gpio_xlate->set_gpio_as_eint(eint->pctl, d->hwirq); pctl 260 drivers/pinctrl/mediatek/mtk-eint.c eint->gpio_xlate->get_gpio_n(eint->pctl, d->hwirq, &gpio_n, pctl 350 drivers/pinctrl/mediatek/mtk-eint.c eint->gpio_xlate->get_gpio_state(eint->pctl, pctl 67 drivers/pinctrl/mediatek/mtk-eint.h void *pctl; pctl 45 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c static void mtk_w32(struct mtk_pinctrl *pctl, u8 i, u32 reg, u32 val) pctl 47 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c writel_relaxed(val, pctl->base[i] + reg); pctl 50 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c static u32 mtk_r32(struct mtk_pinctrl *pctl, u8 i, u32 reg) pctl 52 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c return readl_relaxed(pctl->base[i] + reg); pctl 55 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c void mtk_rmw(struct mtk_pinctrl *pctl, u8 i, u32 reg, u32 mask, u32 set) pctl 59 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c val = mtk_r32(pctl, i, reg); pctl 62 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c mtk_w32(pctl, i, reg, val); pctl 345 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c hw->eint->pctl = hw; pctl 251 drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h void mtk_rmw(struct mtk_pinctrl *pctl, u8 i, u32 reg, u32 mask, u32 set); pctl 53 drivers/pinctrl/mediatek/pinctrl-mtk-common.c static struct regmap *mtk_get_regmap(struct mtk_pinctrl *pctl, pctl 56 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (pin >= pctl->devdata->type1_start && pin < pctl->devdata->type1_end) pctl 57 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return pctl->regmap2; pctl 58 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return pctl->regmap1; pctl 61 drivers/pinctrl/mediatek/pinctrl-mtk-common.c static unsigned int mtk_get_port(struct mtk_pinctrl *pctl, unsigned long pin) pctl 64 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return ((pin >> 4) & pctl->devdata->port_mask) pctl 65 drivers/pinctrl/mediatek/pinctrl-mtk-common.c << pctl->devdata->port_shf; pctl 74 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 76 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = mtk_get_port(pctl, offset) + pctl->devdata->dir_offset; pctl 79 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (pctl->devdata->spec_dir_set) pctl 80 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->spec_dir_set(®_addr, offset); pctl 84 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = CLR_ADDR(reg_addr, pctl); pctl 86 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = SET_ADDR(reg_addr, pctl); pctl 88 drivers/pinctrl/mediatek/pinctrl-mtk-common.c regmap_write(mtk_get_regmap(pctl, offset), reg_addr, bit); pctl 96 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = gpiochip_get_data(chip); pctl 98 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = mtk_get_port(pctl, offset) + pctl->devdata->dout_offset; pctl 102 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = SET_ADDR(reg_addr, pctl); pctl 104 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = CLR_ADDR(reg_addr, pctl); pctl 106 drivers/pinctrl/mediatek/pinctrl-mtk-common.c regmap_write(mtk_get_regmap(pctl, offset), reg_addr, bit); pctl 109 drivers/pinctrl/mediatek/pinctrl-mtk-common.c static int mtk_pconf_set_ies_smt(struct mtk_pinctrl *pctl, unsigned pin, pctl 119 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (!pctl->devdata->spec_ies_smt_set && pctl 120 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->ies_offset == MTK_PINCTRL_NOT_SUPPORT && pctl 124 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (!pctl->devdata->spec_ies_smt_set && pctl 125 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->smt_offset == MTK_PINCTRL_NOT_SUPPORT && pctl 133 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (pctl->devdata->spec_ies_smt_set) { pctl 134 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return pctl->devdata->spec_ies_smt_set(mtk_get_regmap(pctl, pin), pctl 135 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pin, pctl->devdata->port_align, value, arg); pctl 141 drivers/pinctrl/mediatek/pinctrl-mtk-common.c offset = pctl->devdata->ies_offset; pctl 143 drivers/pinctrl/mediatek/pinctrl-mtk-common.c offset = pctl->devdata->smt_offset; pctl 146 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = SET_ADDR(mtk_get_port(pctl, pin) + offset, pctl); pctl 148 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = CLR_ADDR(mtk_get_port(pctl, pin) + offset, pctl); pctl 150 drivers/pinctrl/mediatek/pinctrl-mtk-common.c regmap_write(mtk_get_regmap(pctl, pin), reg_addr, bit); pctl 181 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl, unsigned long pin) { pctl 184 drivers/pinctrl/mediatek/pinctrl-mtk-common.c for (i = 0; i < pctl->devdata->n_pin_drv_grps; i++) { pctl 186 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->pin_drv_grp + i; pctl 194 drivers/pinctrl/mediatek/pinctrl-mtk-common.c static int mtk_pconf_set_driving(struct mtk_pinctrl *pctl, pctl 202 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (pin >= pctl->devdata->npins) pctl 205 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pin_drv = mtk_find_pin_drv_grp_by_pin(pctl, pin); pctl 206 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (!pin_drv || pin_drv->grp > pctl->devdata->n_grp_cls) pctl 209 drivers/pinctrl/mediatek/pinctrl-mtk-common.c drv_grp = pctl->devdata->grp_desc + pin_drv->grp; pctl 218 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return regmap_update_bits(mtk_get_regmap(pctl, pin), pctl 285 drivers/pinctrl/mediatek/pinctrl-mtk-common.c static int mtk_pconf_set_pull_select(struct mtk_pinctrl *pctl, pctl 296 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (pctl->devdata->spec_pull_set) { pctl 301 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = pctl->devdata->spec_pull_set(mtk_get_regmap(pctl, pin), pctl 302 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pin, pctl->devdata->port_align, isup, r1r0); pctl 309 drivers/pinctrl/mediatek/pinctrl-mtk-common.c dev_err(pctl->dev, "invalid pull-up argument %d on pin %d .\n", pctl 316 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_pullen = SET_ADDR(mtk_get_port(pctl, pin) + pctl 317 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->pullen_offset, pctl); pctl 319 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_pullen = CLR_ADDR(mtk_get_port(pctl, pin) + pctl 320 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->pullen_offset, pctl); pctl 323 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_pullsel = SET_ADDR(mtk_get_port(pctl, pin) + pctl 324 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->pullsel_offset, pctl); pctl 326 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_pullsel = CLR_ADDR(mtk_get_port(pctl, pin) + pctl 327 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->pullsel_offset, pctl); pctl 329 drivers/pinctrl/mediatek/pinctrl-mtk-common.c regmap_write(mtk_get_regmap(pctl, pin), reg_pullen, bit); pctl 330 drivers/pinctrl/mediatek/pinctrl-mtk-common.c regmap_write(mtk_get_regmap(pctl, pin), reg_pullsel, bit); pctl 339 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 343 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = mtk_pconf_set_pull_select(pctl, pin, false, false, arg); pctl 346 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = mtk_pconf_set_pull_select(pctl, pin, true, true, arg); pctl 349 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = mtk_pconf_set_pull_select(pctl, pin, true, false, arg); pctl 353 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = mtk_pconf_set_ies_smt(pctl, pin, arg, param); pctl 356 drivers/pinctrl/mediatek/pinctrl-mtk-common.c mtk_gpio_set(pctl->chip, pin, arg); pctl 361 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = mtk_pconf_set_ies_smt(pctl, pin, arg, param); pctl 364 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = mtk_pconf_set_driving(pctl, pin, arg); pctl 377 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 379 drivers/pinctrl/mediatek/pinctrl-mtk-common.c *config = pctl->groups[group].config; pctl 387 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 388 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl_group *g = &pctl->groups[group]; pctl 410 drivers/pinctrl/mediatek/pinctrl-mtk-common.c mtk_pctrl_find_group_by_pin(struct mtk_pinctrl *pctl, u32 pin) pctl 414 drivers/pinctrl/mediatek/pinctrl-mtk-common.c for (i = 0; i < pctl->ngroups; i++) { pctl 415 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl_group *grp = pctl->groups + i; pctl 425 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl, u32 pin_num, u32 fnum) pctl 427 drivers/pinctrl/mediatek/pinctrl-mtk-common.c const struct mtk_desc_pin *pin = pctl->devdata->pins + pin_num; pctl 439 drivers/pinctrl/mediatek/pinctrl-mtk-common.c static bool mtk_pctrl_is_function_valid(struct mtk_pinctrl *pctl, pctl 444 drivers/pinctrl/mediatek/pinctrl-mtk-common.c for (i = 0; i < pctl->devdata->npins; i++) { pctl 445 drivers/pinctrl/mediatek/pinctrl-mtk-common.c const struct mtk_desc_pin *pin = pctl->devdata->pins + i; pctl 464 drivers/pinctrl/mediatek/pinctrl-mtk-common.c static int mtk_pctrl_dt_node_to_map_func(struct mtk_pinctrl *pctl, pctl 477 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = mtk_pctrl_is_function_valid(pctl, pin, fnum); pctl 479 drivers/pinctrl/mediatek/pinctrl-mtk-common.c dev_err(pctl->dev, "invalid function %d on pin %d .\n", pctl 505 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 509 drivers/pinctrl/mediatek/pinctrl-mtk-common.c dev_err(pctl->dev, "missing pins property in node %pOFn .\n", pctl 551 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (pin >= pctl->devdata->npins || pctl 553 drivers/pinctrl/mediatek/pinctrl-mtk-common.c dev_err(pctl->dev, "invalid pins value.\n"); pctl 558 drivers/pinctrl/mediatek/pinctrl-mtk-common.c grp = mtk_pctrl_find_group_by_pin(pctl, pin); pctl 560 drivers/pinctrl/mediatek/pinctrl-mtk-common.c dev_err(pctl->dev, "unable to match pin %d to group\n", pctl 566 drivers/pinctrl/mediatek/pinctrl-mtk-common.c err = mtk_pctrl_dt_node_to_map_func(pctl, pin, func, grp, map, pctl 615 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 617 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return pctl->ngroups; pctl 623 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 625 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return pctl->groups[group].name; pctl 633 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 635 drivers/pinctrl/mediatek/pinctrl-mtk-common.c *pins = (unsigned *)&pctl->groups[group].pin; pctl 665 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 667 drivers/pinctrl/mediatek/pinctrl-mtk-common.c *groups = pctl->grp_names; pctl 668 drivers/pinctrl/mediatek/pinctrl-mtk-common.c *num_groups = pctl->ngroups; pctl 680 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 682 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (pctl->devdata->spec_pinmux_set) pctl 683 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->spec_pinmux_set(mtk_get_regmap(pctl, pin), pctl 686 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = ((pin / MAX_GPIO_MODE_PER_REG) << pctl->devdata->port_shf) pctl 687 drivers/pinctrl/mediatek/pinctrl-mtk-common.c + pctl->devdata->pinmux_offset; pctl 693 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return regmap_update_bits(mtk_get_regmap(pctl, pin), pctl 698 drivers/pinctrl/mediatek/pinctrl-mtk-common.c mtk_find_pin_by_eint_num(struct mtk_pinctrl *pctl, unsigned int eint_num) pctl 703 drivers/pinctrl/mediatek/pinctrl-mtk-common.c for (i = 0; i < pctl->devdata->npins; i++) { pctl 704 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pin = pctl->devdata->pins + i; pctl 718 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 719 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl_group *g = pctl->groups + group; pctl 721 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = mtk_pctrl_is_function_valid(pctl, g->pin, function); pctl 723 drivers/pinctrl/mediatek/pinctrl-mtk-common.c dev_err(pctl->dev, "invalid function %d on group %d .\n", pctl 728 drivers/pinctrl/mediatek/pinctrl-mtk-common.c desc = mtk_pctrl_find_function_by_pin(pctl, g->pin, function); pctl 735 drivers/pinctrl/mediatek/pinctrl-mtk-common.c static int mtk_pmx_find_gpio_mode(struct mtk_pinctrl *pctl, pctl 738 drivers/pinctrl/mediatek/pinctrl-mtk-common.c const struct mtk_desc_pin *pin = pctl->devdata->pins + offset; pctl 755 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 757 drivers/pinctrl/mediatek/pinctrl-mtk-common.c muxval = mtk_pmx_find_gpio_mode(pctl, offset); pctl 760 drivers/pinctrl/mediatek/pinctrl-mtk-common.c dev_err(pctl->dev, "invalid gpio pin %d.\n", offset); pctl 765 drivers/pinctrl/mediatek/pinctrl-mtk-common.c mtk_pconf_set_ies_smt(pctl, offset, 1, PIN_CONFIG_INPUT_ENABLE); pctl 798 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = gpiochip_get_data(chip); pctl 800 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = mtk_get_port(pctl, offset) + pctl->devdata->dir_offset; pctl 803 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (pctl->devdata->spec_dir_set) pctl 804 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->spec_dir_set(®_addr, offset); pctl 806 drivers/pinctrl/mediatek/pinctrl-mtk-common.c regmap_read(pctl->regmap1, reg_addr, &read_val); pctl 815 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = gpiochip_get_data(chip); pctl 817 drivers/pinctrl/mediatek/pinctrl-mtk-common.c reg_addr = mtk_get_port(pctl, offset) + pctl 818 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata->din_offset; pctl 821 drivers/pinctrl/mediatek/pinctrl-mtk-common.c regmap_read(pctl->regmap1, reg_addr, &read_val); pctl 827 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = gpiochip_get_data(chip); pctl 831 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pin = pctl->devdata->pins + offset; pctl 837 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return mtk_eint_find_irq(pctl->eint, eint_n); pctl 843 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = gpiochip_get_data(chip); pctl 851 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pin = pctl->devdata->pins + offset; pctl 858 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return mtk_eint_set_debounce(pctl->eint, eint_n, debounce); pctl 877 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = dev_get_drvdata(device); pctl 879 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return mtk_eint_do_suspend(pctl->eint); pctl 884 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = dev_get_drvdata(device); pctl 886 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return mtk_eint_do_resume(pctl->eint); pctl 896 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = platform_get_drvdata(pdev); pctl 899 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->ngroups = pctl->devdata->npins; pctl 902 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->groups = devm_kcalloc(&pdev->dev, pctl->ngroups, pctl 903 drivers/pinctrl/mediatek/pinctrl-mtk-common.c sizeof(*pctl->groups), GFP_KERNEL); pctl 904 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (!pctl->groups) pctl 908 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->grp_names = devm_kcalloc(&pdev->dev, pctl->ngroups, pctl 909 drivers/pinctrl/mediatek/pinctrl-mtk-common.c sizeof(*pctl->grp_names), GFP_KERNEL); pctl 910 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (!pctl->grp_names) pctl 913 drivers/pinctrl/mediatek/pinctrl-mtk-common.c for (i = 0; i < pctl->devdata->npins; i++) { pctl 914 drivers/pinctrl/mediatek/pinctrl-mtk-common.c const struct mtk_desc_pin *pin = pctl->devdata->pins + i; pctl 915 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl_group *group = pctl->groups + i; pctl 920 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->grp_names[i] = pin->pin.name; pctl 930 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = (struct mtk_pinctrl *)data; pctl 933 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pin = mtk_find_pin_by_eint_num(pctl, eint_n); pctl 937 drivers/pinctrl/mediatek/pinctrl-mtk-common.c *gpio_chip = pctl->chip; pctl 945 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = (struct mtk_pinctrl *)data; pctl 948 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pin = mtk_find_pin_by_eint_num(pctl, eint_n); pctl 952 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return mtk_gpio_get(pctl->chip, pin->pin.number); pctl 957 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl = (struct mtk_pinctrl *)data; pctl 960 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pin = mtk_find_pin_by_eint_num(pctl, eint_n); pctl 965 drivers/pinctrl/mediatek/pinctrl-mtk-common.c mtk_pmx_set_mode(pctl->pctl_dev, pin->pin.number, pin->eint.eintmux); pctl 967 drivers/pinctrl/mediatek/pinctrl-mtk-common.c mtk_pmx_gpio_set_direction(pctl->pctl_dev, NULL, pin->pin.number, pctl 970 drivers/pinctrl/mediatek/pinctrl-mtk-common.c mtk_pconf_set_ies_smt(pctl, pin->pin.number, 1, pctl 982 drivers/pinctrl/mediatek/pinctrl-mtk-common.c static int mtk_eint_init(struct mtk_pinctrl *pctl, struct platform_device *pdev) pctl 990 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->eint = devm_kzalloc(pctl->dev, sizeof(*pctl->eint), GFP_KERNEL); pctl 991 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (!pctl->eint) pctl 995 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->eint->base = devm_ioremap_resource(&pdev->dev, res); pctl 996 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (IS_ERR(pctl->eint->base)) pctl 997 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return PTR_ERR(pctl->eint->base); pctl 999 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->eint->irq = irq_of_parse_and_map(np, 0); pctl 1000 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (!pctl->eint->irq) pctl 1003 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->eint->dev = &pdev->dev; pctl 1008 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->eint->regs = pctl->devdata->eint_regs; pctl 1009 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->eint->hw = &pctl->devdata->eint_hw; pctl 1010 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->eint->pctl = pctl; pctl 1011 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->eint->gpio_xlate = &mtk_eint_xt; pctl 1013 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return mtk_eint_do_init(pctl->eint); pctl 1021 drivers/pinctrl/mediatek/pinctrl-mtk-common.c struct mtk_pinctrl *pctl; pctl 1026 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); pctl 1027 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (!pctl) pctl 1030 drivers/pinctrl/mediatek/pinctrl-mtk-common.c platform_set_drvdata(pdev, pctl); pctl 1040 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->regmap1 = syscon_node_to_regmap(node); pctl 1041 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (IS_ERR(pctl->regmap1)) pctl 1042 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return PTR_ERR(pctl->regmap1); pctl 1044 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->regmap1 = regmap; pctl 1053 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->regmap2 = syscon_node_to_regmap(node); pctl 1054 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (IS_ERR(pctl->regmap2)) pctl 1055 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return PTR_ERR(pctl->regmap2); pctl 1058 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->devdata = data; pctl 1065 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pins = devm_kcalloc(&pdev->dev, pctl->devdata->npins, sizeof(*pins), pctl 1070 drivers/pinctrl/mediatek/pinctrl-mtk-common.c for (i = 0; i < pctl->devdata->npins; i++) pctl 1071 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pins[i] = pctl->devdata->pins[i].pin; pctl 1073 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->pctl_desc.name = dev_name(&pdev->dev); pctl 1074 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->pctl_desc.owner = THIS_MODULE; pctl 1075 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->pctl_desc.pins = pins; pctl 1076 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->pctl_desc.npins = pctl->devdata->npins; pctl 1077 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->pctl_desc.confops = &mtk_pconf_ops; pctl 1078 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->pctl_desc.pctlops = &mtk_pctrl_ops; pctl 1079 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->pctl_desc.pmxops = &mtk_pmx_ops; pctl 1080 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->dev = &pdev->dev; pctl 1082 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, &pctl->pctl_desc, pctl 1083 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl); pctl 1084 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (IS_ERR(pctl->pctl_dev)) { pctl 1086 drivers/pinctrl/mediatek/pinctrl-mtk-common.c return PTR_ERR(pctl->pctl_dev); pctl 1089 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->chip = devm_kzalloc(&pdev->dev, sizeof(*pctl->chip), GFP_KERNEL); pctl 1090 drivers/pinctrl/mediatek/pinctrl-mtk-common.c if (!pctl->chip) pctl 1093 drivers/pinctrl/mediatek/pinctrl-mtk-common.c *pctl->chip = mtk_gpio_chip; pctl 1094 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->chip->ngpio = pctl->devdata->npins; pctl 1095 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->chip->label = dev_name(&pdev->dev); pctl 1096 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->chip->parent = &pdev->dev; pctl 1097 drivers/pinctrl/mediatek/pinctrl-mtk-common.c pctl->chip->base = -1; pctl 1099 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = gpiochip_add_data(pctl->chip, pctl); pctl 1104 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = gpiochip_add_pin_range(pctl->chip, dev_name(&pdev->dev), pctl 1105 drivers/pinctrl/mediatek/pinctrl-mtk-common.c 0, 0, pctl->devdata->npins); pctl 1111 drivers/pinctrl/mediatek/pinctrl-mtk-common.c ret = mtk_eint_init(pctl, pdev); pctl 1118 drivers/pinctrl/mediatek/pinctrl-mtk-common.c gpiochip_remove(pctl->chip); pctl 397 drivers/pinctrl/mediatek/pinctrl-paris.c static int mtk_pctrl_dt_node_to_map_func(struct mtk_pinctrl *pctl, pctl 412 drivers/pinctrl/mediatek/pinctrl-paris.c ret = mtk_pctrl_is_function_valid(pctl, pin, fnum); pctl 414 drivers/pinctrl/mediatek/pinctrl-paris.c dev_err(pctl->dev, "invalid function %d on pin %d .\n", pctl 932 drivers/pinctrl/mediatek/pinctrl-paris.c struct mtk_pinctrl *pctl = dev_get_drvdata(device); pctl 934 drivers/pinctrl/mediatek/pinctrl-paris.c return mtk_eint_do_suspend(pctl->eint); pctl 939 drivers/pinctrl/mediatek/pinctrl-paris.c struct mtk_pinctrl *pctl = dev_get_drvdata(device); pctl 941 drivers/pinctrl/mediatek/pinctrl-paris.c return mtk_eint_do_resume(pctl->eint); pctl 103 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c struct pinctrl_desc pctl; pctl 956 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c struct pinctrl_desc *ctrldesc = &info->pctl; pctl 83 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl, unsigned pid) pctl 86 drivers/pinctrl/mvebu/pinctrl-mvebu.c for (n = 0; n < pctl->num_groups; n++) { pctl 87 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (pid >= pctl->groups[n].pins[0] && pctl 88 drivers/pinctrl/mvebu/pinctrl-mvebu.c pid < pctl->groups[n].pins[0] + pctl 89 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[n].npins) pctl 90 drivers/pinctrl/mvebu/pinctrl-mvebu.c return &pctl->groups[n]; pctl 96 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl, const char *name) pctl 99 drivers/pinctrl/mvebu/pinctrl-mvebu.c for (n = 0; n < pctl->num_groups; n++) { pctl 100 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (strcmp(name, pctl->groups[n].name) == 0) pctl 101 drivers/pinctrl/mvebu/pinctrl-mvebu.c return &pctl->groups[n]; pctl 107 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl, struct mvebu_pinctrl_group *grp, pctl 113 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (!pctl->variant || (pctl->variant & pctl 122 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl, struct mvebu_pinctrl_group *grp, pctl 128 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (!pctl->variant || (pctl->variant & pctl 137 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl, struct mvebu_pinctrl_group *grp) pctl 143 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (!pctl->variant || (pctl->variant & pctl 152 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl, const char *name) pctl 155 drivers/pinctrl/mvebu/pinctrl-mvebu.c for (n = 0; n < pctl->num_functions; n++) { pctl 156 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (strcmp(name, pctl->functions[n].name) == 0) pctl 157 drivers/pinctrl/mvebu/pinctrl-mvebu.c return &pctl->functions[n]; pctl 165 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 166 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; pctl 178 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 179 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; pctl 197 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 198 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; pctl 206 drivers/pinctrl/mvebu/pinctrl-mvebu.c curr = mvebu_pinctrl_find_setting_by_val(pctl, grp, config); pctl 231 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (pctl->variant && pctl 232 drivers/pinctrl/mvebu/pinctrl-mvebu.c !(pctl->variant & grp->settings[n].variant)) pctl 260 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 262 drivers/pinctrl/mvebu/pinctrl-mvebu.c return pctl->num_functions; pctl 268 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 270 drivers/pinctrl/mvebu/pinctrl-mvebu.c return pctl->functions[fid].name; pctl 277 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 279 drivers/pinctrl/mvebu/pinctrl-mvebu.c *groups = pctl->functions[fid].groups; pctl 280 drivers/pinctrl/mvebu/pinctrl-mvebu.c *num_groups = pctl->functions[fid].num_groups; pctl 287 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 288 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl_function *func = &pctl->functions[fid]; pctl 289 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; pctl 294 drivers/pinctrl/mvebu/pinctrl-mvebu.c setting = mvebu_pinctrl_find_setting_by_name(pctl, grp, pctl 297 drivers/pinctrl/mvebu/pinctrl-mvebu.c dev_err(pctl->dev, pctl 306 drivers/pinctrl/mvebu/pinctrl-mvebu.c dev_err(pctl->dev, "cannot set group %s to %s\n", pctl 317 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 322 drivers/pinctrl/mvebu/pinctrl-mvebu.c grp = mvebu_pinctrl_find_group_by_pid(pctl, offset); pctl 329 drivers/pinctrl/mvebu/pinctrl-mvebu.c setting = mvebu_pinctrl_find_gpio_setting(pctl, grp); pctl 341 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 345 drivers/pinctrl/mvebu/pinctrl-mvebu.c grp = mvebu_pinctrl_find_group_by_pid(pctl, offset); pctl 352 drivers/pinctrl/mvebu/pinctrl-mvebu.c setting = mvebu_pinctrl_find_gpio_setting(pctl, grp); pctl 374 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 375 drivers/pinctrl/mvebu/pinctrl-mvebu.c return pctl->num_groups; pctl 381 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 382 drivers/pinctrl/mvebu/pinctrl-mvebu.c return pctl->groups[gid].name; pctl 389 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 390 drivers/pinctrl/mvebu/pinctrl-mvebu.c *pins = pctl->groups[gid].pins; pctl 391 drivers/pinctrl/mvebu/pinctrl-mvebu.c *num_pins = pctl->groups[gid].npins; pctl 400 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 411 drivers/pinctrl/mvebu/pinctrl-mvebu.c dev_err(pctl->dev, pctl 418 drivers/pinctrl/mvebu/pinctrl-mvebu.c dev_err(pctl->dev, pctl 430 drivers/pinctrl/mvebu/pinctrl-mvebu.c mvebu_pinctrl_find_group_by_name(pctl, group); pctl 433 drivers/pinctrl/mvebu/pinctrl-mvebu.c dev_err(pctl->dev, "unknown pin %s", group); pctl 437 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (!mvebu_pinctrl_find_setting_by_name(pctl, grp, function)) { pctl 438 drivers/pinctrl/mvebu/pinctrl-mvebu.c dev_err(pctl->dev, "unsupported function %s on pin %s", pctl 492 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl) pctl 495 drivers/pinctrl/mvebu/pinctrl-mvebu.c int num = 0, funcsize = pctl->desc.npins; pctl 506 drivers/pinctrl/mvebu/pinctrl-mvebu.c for (n = 0; n < pctl->num_groups; n++) { pctl 507 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl_group *grp = &pctl->groups[n]; pctl 512 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (pctl->variant && pctl 513 drivers/pinctrl/mvebu/pinctrl-mvebu.c !(pctl->variant & grp->settings[s].variant)) pctl 522 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->desc.npins); pctl 530 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->num_functions = num; pctl 531 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->functions = funcs; pctl 533 drivers/pinctrl/mvebu/pinctrl-mvebu.c for (n = 0; n < pctl->num_groups; n++) { pctl 534 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl_group *grp = &pctl->groups[n]; pctl 540 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (pctl->variant && pctl 541 drivers/pinctrl/mvebu/pinctrl-mvebu.c !(pctl->variant & grp->settings[s].variant)) pctl 544 drivers/pinctrl/mvebu/pinctrl-mvebu.c f = mvebu_pinctrl_find_function_by_name(pctl, pctl 571 drivers/pinctrl/mvebu/pinctrl-mvebu.c struct mvebu_pinctrl *pctl; pctl 584 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_pinctrl), pctl 586 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (!pctl) pctl 589 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->desc.name = dev_name(&pdev->dev); pctl 590 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->desc.owner = THIS_MODULE; pctl 591 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->desc.pctlops = &mvebu_pinctrl_ops; pctl 592 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->desc.pmxops = &mvebu_pinmux_ops; pctl 593 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->desc.confops = &mvebu_pinconf_ops; pctl 594 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->variant = soc->variant; pctl 595 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->dev = &pdev->dev; pctl 596 drivers/pinctrl/mvebu/pinctrl-mvebu.c platform_set_drvdata(pdev, pctl); pctl 600 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->num_groups = 0; pctl 601 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->desc.npins = 0; pctl 605 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->desc.npins += ctrl->npins; pctl 616 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->num_groups += ctrl->npins; pctl 619 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->num_groups += 1; pctl 624 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->desc.npins, pctl 630 drivers/pinctrl/mvebu/pinctrl-mvebu.c for (n = 0; n < pctl->desc.npins; n++) pctl 632 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->desc.pins = pdesc; pctl 637 drivers/pinctrl/mvebu/pinctrl-mvebu.c size = pctl->num_groups * sizeof(*pctl->groups) + noname * 8; pctl 642 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups = p; pctl 643 drivers/pinctrl/mvebu/pinctrl-mvebu.c noname_buf = p + pctl->num_groups * sizeof(*pctl->groups); pctl 652 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].gid = gid; pctl 653 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].ctrl = ctrl; pctl 654 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].data = data; pctl 655 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].name = ctrl->name; pctl 656 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].pins = ctrl->pins; pctl 657 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].npins = ctrl->npins; pctl 665 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].name = noname_buf; pctl 666 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].npins = 1; pctl 672 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].gid = gid; pctl 673 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].ctrl = ctrl; pctl 674 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].data = data; pctl 675 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].name = noname_buf; pctl 676 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].pins = &ctrl->pins[k]; pctl 677 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->groups[gid].npins = 1; pctl 700 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (pctl->variant && !(pctl->variant & set->variant)) pctl 719 drivers/pinctrl/mvebu/pinctrl-mvebu.c grp = mvebu_pinctrl_find_group_by_pid(pctl, mode->pid); pctl 730 drivers/pinctrl/mvebu/pinctrl-mvebu.c ret = mvebu_pinctrl_build_functions(pdev, pctl); pctl 736 drivers/pinctrl/mvebu/pinctrl-mvebu.c pctl->pctldev = devm_pinctrl_register(&pdev->dev, &pctl->desc, pctl); pctl 737 drivers/pinctrl/mvebu/pinctrl-mvebu.c if (IS_ERR(pctl->pctldev)) { pctl 739 drivers/pinctrl/mvebu/pinctrl-mvebu.c return PTR_ERR(pctl->pctldev); pctl 746 drivers/pinctrl/mvebu/pinctrl-mvebu.c pinctrl_add_gpio_range(pctl->pctldev, &soc->gpioranges[n]); pctl 278 drivers/pinctrl/nomadik/pinctrl-nomadik.c struct pinctrl_dev *pctl; pctl 1859 drivers/pinctrl/nomadik/pinctrl-nomadik.c return pinctrl_force_sleep(npct->pctl); pctl 1870 drivers/pinctrl/nomadik/pinctrl-nomadik.c return pinctrl_force_default(npct->pctl); pctl 1943 drivers/pinctrl/nomadik/pinctrl-nomadik.c npct->pctl = devm_pinctrl_register(&pdev->dev, &nmk_pinctrl_desc, npct); pctl 1944 drivers/pinctrl/nomadik/pinctrl-nomadik.c if (IS_ERR(npct->pctl)) { pctl 1946 drivers/pinctrl/nomadik/pinctrl-nomadik.c return PTR_ERR(npct->pctl); pctl 57 drivers/pinctrl/pinctrl-artpec6.c struct pinctrl_dev *pctl; pctl 961 drivers/pinctrl/pinctrl-artpec6.c pmx->pctl = pinctrl_register(&artpec6_desc, &pdev->dev, pmx); pctl 963 drivers/pinctrl/pinctrl-artpec6.c if (IS_ERR(pmx->pctl)) { pctl 965 drivers/pinctrl/pinctrl-artpec6.c return PTR_ERR(pmx->pctl); pctl 979 drivers/pinctrl/pinctrl-artpec6.c pinctrl_unregister(pmx->pctl); pctl 79 drivers/pinctrl/pinctrl-as3722.c struct pinctrl_dev *pctl; pctl 572 drivers/pinctrl/pinctrl-as3722.c as_pci->pctl = devm_pinctrl_register(&pdev->dev, &as3722_pinctrl_desc, pctl 574 drivers/pinctrl/pinctrl-as3722.c if (IS_ERR(as_pci->pctl)) { pctl 576 drivers/pinctrl/pinctrl-as3722.c return PTR_ERR(as_pci->pctl); pctl 194 drivers/pinctrl/pinctrl-at91.c struct pinctrl_dev *pctl; pctl 1391 drivers/pinctrl/pinctrl-at91.c info->pctl = devm_pinctrl_register(&pdev->dev, &at91_pinctrl_desc, pctl 1394 drivers/pinctrl/pinctrl-at91.c if (IS_ERR(info->pctl)) { pctl 1396 drivers/pinctrl/pinctrl-at91.c return PTR_ERR(info->pctl); pctl 1402 drivers/pinctrl/pinctrl-at91.c pinctrl_add_gpio_range(info->pctl, &gpio_chips[i]->range); pctl 120 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = gpiochip_get_data(chip); pctl 124 drivers/pinctrl/pinctrl-axp209.c ret = regmap_read(pctl->regmap, AXP20X_GPIO20_SS, &val); pctl 128 drivers/pinctrl/pinctrl-axp209.c return !!(val & BIT(offset + pctl->desc->gpio_status_offset)); pctl 134 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = gpiochip_get_data(chip); pctl 142 drivers/pinctrl/pinctrl-axp209.c ret = regmap_read(pctl->regmap, reg, &val); pctl 172 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = gpiochip_get_data(chip); pctl 179 drivers/pinctrl/pinctrl-axp209.c regmap_update_bits(pctl->regmap, reg, pctl 188 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 195 drivers/pinctrl/pinctrl-axp209.c return regmap_update_bits(pctl->regmap, reg, AXP20X_GPIO_FUNCTIONS, pctl 201 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 203 drivers/pinctrl/pinctrl-axp209.c return ARRAY_SIZE(pctl->funcs); pctl 209 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 211 drivers/pinctrl/pinctrl-axp209.c return pctl->funcs[selector].name; pctl 219 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 221 drivers/pinctrl/pinctrl-axp209.c *groups = pctl->funcs[selector].groups; pctl 222 drivers/pinctrl/pinctrl-axp209.c *num_groups = pctl->funcs[selector].ngroups; pctl 230 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 236 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[function].muxval); pctl 239 drivers/pinctrl/pinctrl-axp209.c mask = pctl->desc->ldo_mask; pctl 241 drivers/pinctrl/pinctrl-axp209.c mask = pctl->desc->adc_mask; pctl 255 drivers/pinctrl/pinctrl-axp209.c return axp20x_pmx_set(pctldev, group, pctl->funcs[function].muxval); pctl 262 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 266 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[AXP20X_FUNC_GPIO_IN].muxval); pctl 269 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[AXP20X_FUNC_GPIO_OUT].muxval); pctl 283 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 285 drivers/pinctrl/pinctrl-axp209.c return pctl->desc->npins; pctl 291 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 293 drivers/pinctrl/pinctrl-axp209.c *pins = (unsigned int *)&pctl->desc->pins[selector]; pctl 302 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 304 drivers/pinctrl/pinctrl-axp209.c return pctl->desc->pins[selector].name; pctl 344 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl = platform_get_drvdata(pdev); pctl 345 drivers/pinctrl/pinctrl-axp209.c int i, ret, pin, npins = pctl->desc->npins; pctl 347 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[AXP20X_FUNC_GPIO_OUT].name = "gpio_out"; pctl 348 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[AXP20X_FUNC_GPIO_OUT].muxval = AXP20X_MUX_GPIO_OUT; pctl 349 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[AXP20X_FUNC_GPIO_IN].name = "gpio_in"; pctl 350 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[AXP20X_FUNC_GPIO_IN].muxval = AXP20X_MUX_GPIO_IN; pctl 351 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[AXP20X_FUNC_LDO].name = "ldo"; pctl 356 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[AXP20X_FUNC_ADC].name = "adc"; pctl 357 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[AXP20X_FUNC_ADC].muxval = pctl->desc->adc_mux; pctl 361 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[i].ngroups = npins; pctl 362 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[i].groups = devm_kcalloc(&pdev->dev, pctl 365 drivers/pinctrl/pinctrl-axp209.c if (!pctl->funcs[i].groups) pctl 368 drivers/pinctrl/pinctrl-axp209.c pctl->funcs[i].groups[pin] = pctl->desc->pins[pin].name; pctl 371 drivers/pinctrl/pinctrl-axp209.c ret = axp20x_funcs_groups_from_mask(&pdev->dev, pctl->desc->ldo_mask, pctl 372 drivers/pinctrl/pinctrl-axp209.c npins, &pctl->funcs[AXP20X_FUNC_LDO], pctl 373 drivers/pinctrl/pinctrl-axp209.c pctl->desc->pins); pctl 377 drivers/pinctrl/pinctrl-axp209.c ret = axp20x_funcs_groups_from_mask(&pdev->dev, pctl->desc->adc_mask, pctl 378 drivers/pinctrl/pinctrl-axp209.c npins, &pctl->funcs[AXP20X_FUNC_ADC], pctl 379 drivers/pinctrl/pinctrl-axp209.c pctl->desc->pins); pctl 396 drivers/pinctrl/pinctrl-axp209.c struct axp20x_pctl *pctl; pctl 409 drivers/pinctrl/pinctrl-axp209.c pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); pctl 410 drivers/pinctrl/pinctrl-axp209.c if (!pctl) pctl 413 drivers/pinctrl/pinctrl-axp209.c pctl->chip.base = -1; pctl 414 drivers/pinctrl/pinctrl-axp209.c pctl->chip.can_sleep = true; pctl 415 drivers/pinctrl/pinctrl-axp209.c pctl->chip.request = gpiochip_generic_request; pctl 416 drivers/pinctrl/pinctrl-axp209.c pctl->chip.free = gpiochip_generic_free; pctl 417 drivers/pinctrl/pinctrl-axp209.c pctl->chip.parent = &pdev->dev; pctl 418 drivers/pinctrl/pinctrl-axp209.c pctl->chip.label = dev_name(&pdev->dev); pctl 419 drivers/pinctrl/pinctrl-axp209.c pctl->chip.owner = THIS_MODULE; pctl 420 drivers/pinctrl/pinctrl-axp209.c pctl->chip.get = axp20x_gpio_get; pctl 421 drivers/pinctrl/pinctrl-axp209.c pctl->chip.get_direction = axp20x_gpio_get_direction; pctl 422 drivers/pinctrl/pinctrl-axp209.c pctl->chip.set = axp20x_gpio_set; pctl 423 drivers/pinctrl/pinctrl-axp209.c pctl->chip.direction_input = axp20x_gpio_input; pctl 424 drivers/pinctrl/pinctrl-axp209.c pctl->chip.direction_output = axp20x_gpio_output; pctl 426 drivers/pinctrl/pinctrl-axp209.c pctl->desc = of_device_get_match_data(dev); pctl 428 drivers/pinctrl/pinctrl-axp209.c pctl->chip.ngpio = pctl->desc->npins; pctl 430 drivers/pinctrl/pinctrl-axp209.c pctl->regmap = axp20x->regmap; pctl 431 drivers/pinctrl/pinctrl-axp209.c pctl->dev = &pdev->dev; pctl 433 drivers/pinctrl/pinctrl-axp209.c platform_set_drvdata(pdev, pctl); pctl 447 drivers/pinctrl/pinctrl-axp209.c pctrl_desc->pins = pctl->desc->pins; pctl 448 drivers/pinctrl/pinctrl-axp209.c pctrl_desc->npins = pctl->desc->npins; pctl 452 drivers/pinctrl/pinctrl-axp209.c pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, pctrl_desc, pctl); pctl 453 drivers/pinctrl/pinctrl-axp209.c if (IS_ERR(pctl->pctl_dev)) { pctl 455 drivers/pinctrl/pinctrl-axp209.c return PTR_ERR(pctl->pctl_dev); pctl 458 drivers/pinctrl/pinctrl-axp209.c ret = devm_gpiochip_add_data(&pdev->dev, &pctl->chip, pctl); pctl 464 drivers/pinctrl/pinctrl-axp209.c ret = gpiochip_add_pin_range(&pctl->chip, dev_name(&pdev->dev), pctl 465 drivers/pinctrl/pinctrl-axp209.c pctl->desc->pins->number, pctl 466 drivers/pinctrl/pinctrl-axp209.c pctl->desc->pins->number, pctl 467 drivers/pinctrl/pinctrl-axp209.c pctl->desc->npins); pctl 42 drivers/pinctrl/pinctrl-digicolor.c struct pinctrl_dev *pctl; pctl 325 drivers/pinctrl/pinctrl-digicolor.c pmap->pctl = devm_pinctrl_register(&pdev->dev, pctl_desc, pmap); pctl 326 drivers/pinctrl/pinctrl-digicolor.c if (IS_ERR(pmap->pctl)) { pctl 328 drivers/pinctrl/pinctrl-digicolor.c return PTR_ERR(pmap->pctl); pctl 52 drivers/pinctrl/pinctrl-gemini.c struct pinctrl_dev *pctl; pctl 2597 drivers/pinctrl/pinctrl-gemini.c pmx->pctl = devm_pinctrl_register(dev, &gemini_pmx_desc, pmx); pctl 2598 drivers/pinctrl/pinctrl-gemini.c if (IS_ERR(pmx->pctl)) { pctl 2600 drivers/pinctrl/pinctrl-gemini.c return PTR_ERR(pmx->pctl); pctl 80 drivers/pinctrl/pinctrl-ingenic.c struct pinctrl_dev *pctl; pctl 2093 drivers/pinctrl/pinctrl-ingenic.c jzpc->pctl = devm_pinctrl_register(dev, pctl_desc, jzpc); pctl 2094 drivers/pinctrl/pinctrl-ingenic.c if (IS_ERR(jzpc->pctl)) { pctl 2096 drivers/pinctrl/pinctrl-ingenic.c return PTR_ERR(jzpc->pctl); pctl 2102 drivers/pinctrl/pinctrl-ingenic.c err = pinctrl_generic_add_group(jzpc->pctl, group->name, pctl 2114 drivers/pinctrl/pinctrl-ingenic.c err = pinmux_generic_add_function(jzpc->pctl, func->name, pctl 187 drivers/pinctrl/pinctrl-lpc18xx.c struct pinctrl_dev *pctl; pctl 1359 drivers/pinctrl/pinctrl-lpc18xx.c scu->pctl = devm_pinctrl_register(&pdev->dev, &lpc18xx_scu_desc, scu); pctl 1360 drivers/pinctrl/pinctrl-lpc18xx.c if (IS_ERR(scu->pctl)) { pctl 1363 drivers/pinctrl/pinctrl-lpc18xx.c return PTR_ERR(scu->pctl); pctl 103 drivers/pinctrl/pinctrl-max77620.c struct pinctrl_dev *pctl; pctl 586 drivers/pinctrl/pinctrl-max77620.c mpci->pctl = devm_pinctrl_register(&pdev->dev, &max77620_pinctrl_desc, pctl 588 drivers/pinctrl/pinctrl-max77620.c if (IS_ERR(mpci->pctl)) { pctl 590 drivers/pinctrl/pinctrl-max77620.c return PTR_ERR(mpci->pctl); pctl 145 drivers/pinctrl/pinctrl-ocelot.c struct pinctrl_dev *pctl; pctl 567 drivers/pinctrl/pinctrl-ocelot.c info->pctl = devm_pinctrl_register(&pdev->dev, info->desc, info); pctl 568 drivers/pinctrl/pinctrl-ocelot.c if (IS_ERR(info->pctl)) { pctl 570 drivers/pinctrl/pinctrl-ocelot.c return PTR_ERR(info->pctl); pctl 101 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl; pctl 517 drivers/pinctrl/pinctrl-oxnas.c static inline struct oxnas_gpio_bank *pctl_to_bank(struct oxnas_pinctrl *pctl, pctl 520 drivers/pinctrl/pinctrl-oxnas.c return &pctl->gpio_banks[pin / PINS_PER_BANK]; pctl 525 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 527 drivers/pinctrl/pinctrl-oxnas.c return pctl->ngroups; pctl 533 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 535 drivers/pinctrl/pinctrl-oxnas.c return pctl->groups[group].name; pctl 543 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 545 drivers/pinctrl/pinctrl-oxnas.c *pins = &pctl->groups[group].pin; pctl 561 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 563 drivers/pinctrl/pinctrl-oxnas.c return pctl->nfunctions; pctl 569 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 571 drivers/pinctrl/pinctrl-oxnas.c return pctl->functions[func].name; pctl 579 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 581 drivers/pinctrl/pinctrl-oxnas.c *groups = pctl->functions[func].groups; pctl 582 drivers/pinctrl/pinctrl-oxnas.c *num_groups = pctl->functions[func].ngroups; pctl 590 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 591 drivers/pinctrl/pinctrl-oxnas.c const struct oxnas_pin_group *pg = &pctl->groups[group]; pctl 592 drivers/pinctrl/pinctrl-oxnas.c const struct oxnas_function *pf = &pctl->functions[func]; pctl 599 drivers/pinctrl/pinctrl-oxnas.c dev_dbg(pctl->dev, pctl 604 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 611 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 618 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 632 drivers/pinctrl/pinctrl-oxnas.c dev_err(pctl->dev, "cannot mux pin %u to function %u\n", group, func); pctl 640 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 641 drivers/pinctrl/pinctrl-oxnas.c const struct oxnas_pin_group *pg = &pctl->groups[group]; pctl 642 drivers/pinctrl/pinctrl-oxnas.c const struct oxnas_function *pf = &pctl->functions[func]; pctl 650 drivers/pinctrl/pinctrl-oxnas.c dev_dbg(pctl->dev, pctl 655 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 660 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 665 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 670 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 675 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 687 drivers/pinctrl/pinctrl-oxnas.c dev_err(pctl->dev, "cannot mux pin %u to function %u\n", group, func); pctl 696 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 700 drivers/pinctrl/pinctrl-oxnas.c dev_dbg(pctl->dev, "requesting gpio %d in bank %d (id %d) with mask 0x%x\n", pctl 703 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 708 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 713 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 726 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 731 drivers/pinctrl/pinctrl-oxnas.c dev_dbg(pctl->dev, "requesting gpio %d in bank %d (id %d) with mask 0x%x\n", pctl 734 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 737 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 740 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 743 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 746 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 840 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 841 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_gpio_bank *bank = pctl_to_bank(pctl, pin); pctl 849 drivers/pinctrl/pinctrl-oxnas.c ret = regmap_read(pctl->regmap, pctl 871 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 872 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_gpio_bank *bank = pctl_to_bank(pctl, pin); pctl 881 drivers/pinctrl/pinctrl-oxnas.c ret = regmap_read(pctl->regmap, pctl 902 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 903 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_gpio_bank *bank = pctl_to_bank(pctl, pin); pctl 909 drivers/pinctrl/pinctrl-oxnas.c dev_dbg(pctl->dev, "setting pin %d bank %d mask 0x%x\n", pctl 917 drivers/pinctrl/pinctrl-oxnas.c dev_dbg(pctl->dev, " pullup\n"); pctl 918 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 925 drivers/pinctrl/pinctrl-oxnas.c dev_err(pctl->dev, "Property %u not supported\n", pctl 938 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 939 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_gpio_bank *bank = pctl_to_bank(pctl, pin); pctl 946 drivers/pinctrl/pinctrl-oxnas.c dev_dbg(pctl->dev, "setting pin %d bank %d mask 0x%x\n", pctl 954 drivers/pinctrl/pinctrl-oxnas.c dev_dbg(pctl->dev, " pullup\n"); pctl 955 drivers/pinctrl/pinctrl-oxnas.c regmap_write_bits(pctl->regmap, pctl 960 drivers/pinctrl/pinctrl-oxnas.c dev_err(pctl->dev, "Property %u not supported\n", pctl 1131 drivers/pinctrl/pinctrl-oxnas.c .pctl = &ox810se_pinctrl, pctl 1136 drivers/pinctrl/pinctrl-oxnas.c .pctl = &ox820_pinctrl, pctl 1153 drivers/pinctrl/pinctrl-oxnas.c struct oxnas_pinctrl *pctl; pctl 1160 drivers/pinctrl/pinctrl-oxnas.c if (!data || !data->pctl || !data->desc) pctl 1163 drivers/pinctrl/pinctrl-oxnas.c pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); pctl 1164 drivers/pinctrl/pinctrl-oxnas.c if (!pctl) pctl 1166 drivers/pinctrl/pinctrl-oxnas.c pctl->dev = &pdev->dev; pctl 1167 drivers/pinctrl/pinctrl-oxnas.c dev_set_drvdata(&pdev->dev, pctl); pctl 1169 drivers/pinctrl/pinctrl-oxnas.c pctl->regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, pctl 1171 drivers/pinctrl/pinctrl-oxnas.c if (IS_ERR(pctl->regmap)) { pctl 1176 drivers/pinctrl/pinctrl-oxnas.c pctl->functions = data->pctl->functions; pctl 1177 drivers/pinctrl/pinctrl-oxnas.c pctl->nfunctions = data->pctl->nfunctions; pctl 1178 drivers/pinctrl/pinctrl-oxnas.c pctl->groups = data->pctl->groups; pctl 1179 drivers/pinctrl/pinctrl-oxnas.c pctl->ngroups = data->pctl->ngroups; pctl 1180 drivers/pinctrl/pinctrl-oxnas.c pctl->gpio_banks = data->pctl->gpio_banks; pctl 1181 drivers/pinctrl/pinctrl-oxnas.c pctl->nbanks = data->pctl->nbanks; pctl 1183 drivers/pinctrl/pinctrl-oxnas.c pctl->pctldev = pinctrl_register(data->desc, &pdev->dev, pctl); pctl 1184 drivers/pinctrl/pinctrl-oxnas.c if (IS_ERR(pctl->pctldev)) { pctl 1186 drivers/pinctrl/pinctrl-oxnas.c return PTR_ERR(pctl->pctldev); pctl 77 drivers/pinctrl/pinctrl-palmas.c struct pinctrl_dev *pctl; pctl 1042 drivers/pinctrl/pinctrl-palmas.c pci->pctl = devm_pinctrl_register(&pdev->dev, &palmas_pinctrl_desc, pctl 1044 drivers/pinctrl/pinctrl-palmas.c if (IS_ERR(pci->pctl)) { pctl 1046 drivers/pinctrl/pinctrl-palmas.c return PTR_ERR(pci->pctl); pctl 1699 drivers/pinctrl/pinctrl-pic32.c static inline struct pic32_gpio_bank *pctl_to_bank(struct pic32_pinctrl *pctl, pctl 1702 drivers/pinctrl/pinctrl-pic32.c return &pctl->gpio_banks[pin / PINS_PER_BANK]; pctl 1707 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1709 drivers/pinctrl/pinctrl-pic32.c return pctl->ngroups; pctl 1715 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1717 drivers/pinctrl/pinctrl-pic32.c return pctl->groups[group].name; pctl 1725 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1727 drivers/pinctrl/pinctrl-pic32.c *pins = &pctl->groups[group].pin; pctl 1743 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1745 drivers/pinctrl/pinctrl-pic32.c return pctl->nfunctions; pctl 1751 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1753 drivers/pinctrl/pinctrl-pic32.c return pctl->functions[func].name; pctl 1761 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1763 drivers/pinctrl/pinctrl-pic32.c *groups = pctl->functions[func].groups; pctl 1764 drivers/pinctrl/pinctrl-pic32.c *num_groups = pctl->functions[func].ngroups; pctl 1772 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1773 drivers/pinctrl/pinctrl-pic32.c const struct pic32_pin_group *pg = &pctl->groups[group]; pctl 1774 drivers/pinctrl/pinctrl-pic32.c const struct pic32_function *pf = &pctl->functions[func]; pctl 1780 drivers/pinctrl/pinctrl-pic32.c dev_dbg(pctl->dev, pctl 1784 drivers/pinctrl/pinctrl-pic32.c writel(functions->muxval, pctl->reg_base + functions->muxreg); pctl 1792 drivers/pinctrl/pinctrl-pic32.c dev_err(pctl->dev, "cannot mux pin %u to function %u\n", group, func); pctl 1801 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1805 drivers/pinctrl/pinctrl-pic32.c dev_dbg(pctl->dev, "requesting gpio %d in bank %d with mask 0x%x\n", pctl 1881 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1882 drivers/pinctrl/pinctrl-pic32.c struct pic32_gpio_bank *bank = pctl_to_bank(pctl, pin); pctl 1910 drivers/pinctrl/pinctrl-pic32.c dev_err(pctl->dev, "Property %u not supported\n", param); pctl 1922 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1923 drivers/pinctrl/pinctrl-pic32.c struct pic32_gpio_bank *bank = pctl_to_bank(pctl, pin); pctl 1930 drivers/pinctrl/pinctrl-pic32.c dev_dbg(pctl->dev, "setting pin %d bank %d mask 0x%x\n", pctl 1939 drivers/pinctrl/pinctrl-pic32.c dev_dbg(pctl->dev, " pullup\n"); pctl 1943 drivers/pinctrl/pinctrl-pic32.c dev_dbg(pctl->dev, " pulldown\n"); pctl 1947 drivers/pinctrl/pinctrl-pic32.c dev_dbg(pctl->dev, " digital\n"); pctl 1951 drivers/pinctrl/pinctrl-pic32.c dev_dbg(pctl->dev, " analog\n"); pctl 1955 drivers/pinctrl/pinctrl-pic32.c dev_dbg(pctl->dev, " opendrain\n"); pctl 1966 drivers/pinctrl/pinctrl-pic32.c dev_err(pctl->dev, "Property %u not supported\n", pctl 2147 drivers/pinctrl/pinctrl-pic32.c struct pic32_pinctrl *pctl; pctl 2151 drivers/pinctrl/pinctrl-pic32.c pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); pctl 2152 drivers/pinctrl/pinctrl-pic32.c if (!pctl) pctl 2154 drivers/pinctrl/pinctrl-pic32.c pctl->dev = &pdev->dev; pctl 2155 drivers/pinctrl/pinctrl-pic32.c dev_set_drvdata(&pdev->dev, pctl); pctl 2158 drivers/pinctrl/pinctrl-pic32.c pctl->reg_base = devm_ioremap_resource(&pdev->dev, res); pctl 2159 drivers/pinctrl/pinctrl-pic32.c if (IS_ERR(pctl->reg_base)) pctl 2160 drivers/pinctrl/pinctrl-pic32.c return PTR_ERR(pctl->reg_base); pctl 2162 drivers/pinctrl/pinctrl-pic32.c pctl->clk = devm_clk_get(&pdev->dev, NULL); pctl 2163 drivers/pinctrl/pinctrl-pic32.c if (IS_ERR(pctl->clk)) { pctl 2164 drivers/pinctrl/pinctrl-pic32.c ret = PTR_ERR(pctl->clk); pctl 2169 drivers/pinctrl/pinctrl-pic32.c ret = clk_prepare_enable(pctl->clk); pctl 2175 drivers/pinctrl/pinctrl-pic32.c pctl->pins = pic32_pins; pctl 2176 drivers/pinctrl/pinctrl-pic32.c pctl->npins = ARRAY_SIZE(pic32_pins); pctl 2177 drivers/pinctrl/pinctrl-pic32.c pctl->functions = pic32_functions; pctl 2178 drivers/pinctrl/pinctrl-pic32.c pctl->nfunctions = ARRAY_SIZE(pic32_functions); pctl 2179 drivers/pinctrl/pinctrl-pic32.c pctl->groups = pic32_groups; pctl 2180 drivers/pinctrl/pinctrl-pic32.c pctl->ngroups = ARRAY_SIZE(pic32_groups); pctl 2181 drivers/pinctrl/pinctrl-pic32.c pctl->gpio_banks = pic32_gpio_banks; pctl 2182 drivers/pinctrl/pinctrl-pic32.c pctl->nbanks = ARRAY_SIZE(pic32_gpio_banks); pctl 2184 drivers/pinctrl/pinctrl-pic32.c pic32_pinctrl_desc.pins = pctl->pins; pctl 2185 drivers/pinctrl/pinctrl-pic32.c pic32_pinctrl_desc.npins = pctl->npins; pctl 2189 drivers/pinctrl/pinctrl-pic32.c pctl->pctldev = devm_pinctrl_register(&pdev->dev, &pic32_pinctrl_desc, pctl 2190 drivers/pinctrl/pinctrl-pic32.c pctl); pctl 2191 drivers/pinctrl/pinctrl-pic32.c if (IS_ERR(pctl->pctldev)) { pctl 2193 drivers/pinctrl/pinctrl-pic32.c return PTR_ERR(pctl->pctldev); pctl 94 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl; pctl 831 drivers/pinctrl/pinctrl-pistachio.c static inline u32 pctl_readl(struct pistachio_pinctrl *pctl, u32 reg) pctl 833 drivers/pinctrl/pinctrl-pistachio.c return readl(pctl->base + reg); pctl 836 drivers/pinctrl/pinctrl-pistachio.c static inline void pctl_writel(struct pistachio_pinctrl *pctl, u32 val, u32 reg) pctl 838 drivers/pinctrl/pinctrl-pistachio.c writel(val, pctl->base + reg); pctl 881 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 883 drivers/pinctrl/pinctrl-pistachio.c return pctl->ngroups; pctl 889 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 891 drivers/pinctrl/pinctrl-pistachio.c return pctl->groups[group].name; pctl 899 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 901 drivers/pinctrl/pinctrl-pistachio.c *pins = &pctl->groups[group].pin; pctl 917 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 919 drivers/pinctrl/pinctrl-pistachio.c return pctl->nfunctions; pctl 925 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 927 drivers/pinctrl/pinctrl-pistachio.c return pctl->functions[func].name; pctl 935 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 937 drivers/pinctrl/pinctrl-pistachio.c *groups = pctl->functions[func].groups; pctl 938 drivers/pinctrl/pinctrl-pistachio.c *num_groups = pctl->functions[func].ngroups; pctl 946 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 947 drivers/pinctrl/pinctrl-pistachio.c const struct pistachio_pin_group *pg = &pctl->groups[group]; pctl 948 drivers/pinctrl/pinctrl-pistachio.c const struct pistachio_function *pf = &pctl->functions[func]; pctl 959 drivers/pinctrl/pinctrl-pistachio.c dev_err(pctl->dev, "Cannot mux pin %u to function %u\n", pctl 964 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, pg->mux_reg); pctl 967 drivers/pinctrl/pinctrl-pistachio.c pctl_writel(pctl, val, pg->mux_reg); pctl 977 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, pf->scenario_reg); pctl 980 drivers/pinctrl/pinctrl-pistachio.c pctl_writel(pctl, val, pf->scenario_reg); pctl 984 drivers/pinctrl/pinctrl-pistachio.c range = pinctrl_find_gpio_range_from_pin(pctl->pctldev, pg->pin); pctl 1001 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1007 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_SCHMITT_EN_REG(pin)); pctl 1011 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_PU_PD_REG(pin)) >> pctl 1016 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_PU_PD_REG(pin)) >> pctl 1021 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_PU_PD_REG(pin)) >> pctl 1026 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_PU_PD_REG(pin)) >> pctl 1031 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_SLEW_RATE_REG(pin)); pctl 1035 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_DRIVE_STRENGTH_REG(pin)) >> pctl 1054 drivers/pinctrl/pinctrl-pistachio.c dev_dbg(pctl->dev, "Property %u not supported\n", param); pctl 1066 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1077 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_SCHMITT_EN_REG(pin)); pctl 1082 drivers/pinctrl/pinctrl-pistachio.c pctl_writel(pctl, val, PADS_SCHMITT_EN_REG(pin)); pctl 1085 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_PU_PD_REG(pin)); pctl 1088 drivers/pinctrl/pinctrl-pistachio.c pctl_writel(pctl, val, PADS_PU_PD_REG(pin)); pctl 1091 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_PU_PD_REG(pin)); pctl 1094 drivers/pinctrl/pinctrl-pistachio.c pctl_writel(pctl, val, PADS_PU_PD_REG(pin)); pctl 1097 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_PU_PD_REG(pin)); pctl 1100 drivers/pinctrl/pinctrl-pistachio.c pctl_writel(pctl, val, PADS_PU_PD_REG(pin)); pctl 1103 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_PU_PD_REG(pin)); pctl 1106 drivers/pinctrl/pinctrl-pistachio.c pctl_writel(pctl, val, PADS_PU_PD_REG(pin)); pctl 1109 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_SLEW_RATE_REG(pin)); pctl 1114 drivers/pinctrl/pinctrl-pistachio.c pctl_writel(pctl, val, PADS_SLEW_RATE_REG(pin)); pctl 1117 drivers/pinctrl/pinctrl-pistachio.c val = pctl_readl(pctl, PADS_DRIVE_STRENGTH_REG(pin)); pctl 1134 drivers/pinctrl/pinctrl-pistachio.c dev_err(pctl->dev, pctl 1140 drivers/pinctrl/pinctrl-pistachio.c pctl_writel(pctl, val, PADS_DRIVE_STRENGTH_REG(pin)); pctl 1143 drivers/pinctrl/pinctrl-pistachio.c dev_err(pctl->dev, "Property %u not supported\n", pctl 1345 drivers/pinctrl/pinctrl-pistachio.c static int pistachio_gpio_register(struct pistachio_pinctrl *pctl) pctl 1347 drivers/pinctrl/pinctrl-pistachio.c struct device_node *node = pctl->dev->of_node; pctl 1352 drivers/pinctrl/pinctrl-pistachio.c for (i = 0; i < pctl->nbanks; i++) { pctl 1359 drivers/pinctrl/pinctrl-pistachio.c dev_err(pctl->dev, "No node for bank %u\n", i); pctl 1365 drivers/pinctrl/pinctrl-pistachio.c dev_err(pctl->dev, pctl 1374 drivers/pinctrl/pinctrl-pistachio.c dev_err(pctl->dev, "No IRQ for bank %u: %d\n", i, irq); pctl 1380 drivers/pinctrl/pinctrl-pistachio.c bank = &pctl->gpio_banks[i]; pctl 1381 drivers/pinctrl/pinctrl-pistachio.c bank->pctl = pctl; pctl 1382 drivers/pinctrl/pinctrl-pistachio.c bank->base = pctl->base + GPIO_BANK_BASE(i); pctl 1384 drivers/pinctrl/pinctrl-pistachio.c bank->gpio_chip.parent = pctl->dev; pctl 1388 drivers/pinctrl/pinctrl-pistachio.c dev_err(pctl->dev, "Failed to add GPIO chip %u: %d\n", pctl 1396 drivers/pinctrl/pinctrl-pistachio.c dev_err(pctl->dev, "Failed to add IRQ chip %u: %d\n", pctl 1405 drivers/pinctrl/pinctrl-pistachio.c dev_name(pctl->dev), 0, pctl 1408 drivers/pinctrl/pinctrl-pistachio.c dev_err(pctl->dev, "Failed to add GPIO range %u: %d\n", pctl 1418 drivers/pinctrl/pinctrl-pistachio.c bank = &pctl->gpio_banks[i - 1]; pctl 1431 drivers/pinctrl/pinctrl-pistachio.c struct pistachio_pinctrl *pctl; pctl 1434 drivers/pinctrl/pinctrl-pistachio.c pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); pctl 1435 drivers/pinctrl/pinctrl-pistachio.c if (!pctl) pctl 1437 drivers/pinctrl/pinctrl-pistachio.c pctl->dev = &pdev->dev; pctl 1438 drivers/pinctrl/pinctrl-pistachio.c dev_set_drvdata(&pdev->dev, pctl); pctl 1441 drivers/pinctrl/pinctrl-pistachio.c pctl->base = devm_ioremap_resource(&pdev->dev, res); pctl 1442 drivers/pinctrl/pinctrl-pistachio.c if (IS_ERR(pctl->base)) pctl 1443 drivers/pinctrl/pinctrl-pistachio.c return PTR_ERR(pctl->base); pctl 1445 drivers/pinctrl/pinctrl-pistachio.c pctl->pins = pistachio_pins; pctl 1446 drivers/pinctrl/pinctrl-pistachio.c pctl->npins = ARRAY_SIZE(pistachio_pins); pctl 1447 drivers/pinctrl/pinctrl-pistachio.c pctl->functions = pistachio_functions; pctl 1448 drivers/pinctrl/pinctrl-pistachio.c pctl->nfunctions = ARRAY_SIZE(pistachio_functions); pctl 1449 drivers/pinctrl/pinctrl-pistachio.c pctl->groups = pistachio_groups; pctl 1450 drivers/pinctrl/pinctrl-pistachio.c pctl->ngroups = ARRAY_SIZE(pistachio_groups); pctl 1451 drivers/pinctrl/pinctrl-pistachio.c pctl->gpio_banks = pistachio_gpio_banks; pctl 1452 drivers/pinctrl/pinctrl-pistachio.c pctl->nbanks = ARRAY_SIZE(pistachio_gpio_banks); pctl 1454 drivers/pinctrl/pinctrl-pistachio.c pistachio_pinctrl_desc.pins = pctl->pins; pctl 1455 drivers/pinctrl/pinctrl-pistachio.c pistachio_pinctrl_desc.npins = pctl->npins; pctl 1457 drivers/pinctrl/pinctrl-pistachio.c pctl->pctldev = devm_pinctrl_register(&pdev->dev, &pistachio_pinctrl_desc, pctl 1458 drivers/pinctrl/pinctrl-pistachio.c pctl); pctl 1459 drivers/pinctrl/pinctrl-pistachio.c if (IS_ERR(pctl->pctldev)) { pctl 1461 drivers/pinctrl/pinctrl-pistachio.c return PTR_ERR(pctl->pctldev); pctl 1464 drivers/pinctrl/pinctrl-pistachio.c return pistachio_gpio_register(pctl); pctl 67 drivers/pinctrl/pinctrl-rk805.c struct pinctrl_dev *pctl; pctl 462 drivers/pinctrl/pinctrl-rk805.c pci->pctl = devm_pinctrl_register(&pdev->dev, &pci->pinctrl_desc, pci); pctl 463 drivers/pinctrl/pinctrl-rk805.c if (IS_ERR(pci->pctl)) { pctl 465 drivers/pinctrl/pinctrl-rk805.c return PTR_ERR(pci->pctl); pctl 394 drivers/pinctrl/pinctrl-rockchip.c struct pinctrl_desc pctl; pctl 2630 drivers/pinctrl/pinctrl-rockchip.c struct pinctrl_desc *ctrldesc = &info->pctl; pctl 494 drivers/pinctrl/pinctrl-rza1.c struct pinctrl_dev *pctl; pctl 893 drivers/pinctrl/pinctrl-rza1.c struct pinctrl_dev *pctldev = rza1_pctl->pctl; pctl 1236 drivers/pinctrl/pinctrl-rza1.c pinctrl_add_gpio_range(rza1_pctl->pctl, range); pctl 1342 drivers/pinctrl/pinctrl-rza1.c rza1_pctl, &rza1_pctl->pctl); pctl 1349 drivers/pinctrl/pinctrl-rza1.c ret = pinctrl_enable(rza1_pctl->pctl); pctl 46 drivers/pinctrl/pinctrl-rza2.c struct pinctrl_dev *pctl; pctl 272 drivers/pinctrl/pinctrl-rza2.c pinctrl_add_gpio_range(priv->pctl, &priv->gpio_range); pctl 299 drivers/pinctrl/pinctrl-rza2.c &priv->pctl); pctl 305 drivers/pinctrl/pinctrl-rza2.c ret = pinctrl_enable(priv->pctl); pctl 110 drivers/pinctrl/pinctrl-rzn1.c struct pinctrl_dev *pctl; pctl 901 drivers/pinctrl/pinctrl-rzn1.c ipctl, &ipctl->pctl); pctl 907 drivers/pinctrl/pinctrl-rzn1.c ret = pinctrl_enable(ipctl->pctl); pctl 180 drivers/pinctrl/pinctrl-single.c struct pinctrl_dev *pctl; pctl 777 drivers/pinctrl/pinctrl-single.c selector = pinmux_generic_add_function(pcs->pctl, name, pctl 1047 drivers/pinctrl/pinctrl-single.c gsel = pinctrl_generic_add_group(pcs->pctl, np->name, pins, found, pcs); pctl 1070 drivers/pinctrl/pinctrl-single.c pinctrl_generic_remove_group(pcs->pctl, gsel); pctl 1073 drivers/pinctrl/pinctrl-single.c pinmux_generic_remove_function(pcs->pctl, fsel); pctl 1189 drivers/pinctrl/pinctrl-single.c gsel = pinctrl_generic_add_group(pcs->pctl, np->name, pins, found, pcs); pctl 1210 drivers/pinctrl/pinctrl-single.c pinctrl_generic_remove_group(pcs->pctl, gsel); pctl 1213 drivers/pinctrl/pinctrl-single.c pinmux_generic_remove_function(pcs->pctl, fsel); pctl 1308 drivers/pinctrl/pinctrl-single.c pinctrl_unregister(pcs->pctl); pctl 1684 drivers/pinctrl/pinctrl-single.c return pinctrl_force_sleep(pcs->pctl); pctl 1698 drivers/pinctrl/pinctrl-single.c return pinctrl_force_default(pcs->pctl); pctl 1861 drivers/pinctrl/pinctrl-single.c ret = pinctrl_register_and_init(&pcs->desc, pcs->dev, pcs, &pcs->pctl); pctl 1894 drivers/pinctrl/pinctrl-single.c return pinctrl_enable(pcs->pctl); pctl 323 drivers/pinctrl/pinctrl-st.c struct pinctrl_dev *pctl; pctl 1689 drivers/pinctrl/pinctrl-st.c info->pctl = devm_pinctrl_register(&pdev->dev, pctl_desc, info); pctl 1690 drivers/pinctrl/pinctrl-st.c if (IS_ERR(info->pctl)) { pctl 1692 drivers/pinctrl/pinctrl-st.c return PTR_ERR(info->pctl); pctl 1696 drivers/pinctrl/pinctrl-st.c pinctrl_add_gpio_range(info->pctl, &info->banks[i].range); pctl 105 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = gpiochip_get_data(gc); pctl 111 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_read(pctl->stmfx->map, reg, &value); pctl 118 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = gpiochip_get_data(gc); pctl 122 drivers/pinctrl/pinctrl-stmfx.c regmap_write_bits(pctl->stmfx->map, reg + get_reg(offset), pctl 128 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = gpiochip_get_data(gc); pctl 134 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_read(pctl->stmfx->map, reg, &val); pctl 145 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = gpiochip_get_data(gc); pctl 149 drivers/pinctrl/pinctrl-stmfx.c return regmap_write_bits(pctl->stmfx->map, reg, mask, 0); pctl 155 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = gpiochip_get_data(gc); pctl 161 drivers/pinctrl/pinctrl-stmfx.c return regmap_write_bits(pctl->stmfx->map, reg, mask, mask); pctl 164 drivers/pinctrl/pinctrl-stmfx.c static int stmfx_pinconf_get_pupd(struct stmfx_pinctrl *pctl, pctl 171 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_read(pctl->stmfx->map, reg, &pupd); pctl 178 drivers/pinctrl/pinctrl-stmfx.c static int stmfx_pinconf_set_pupd(struct stmfx_pinctrl *pctl, pctl 184 drivers/pinctrl/pinctrl-stmfx.c return regmap_write_bits(pctl->stmfx->map, reg, mask, pupd ? mask : 0); pctl 187 drivers/pinctrl/pinctrl-stmfx.c static int stmfx_pinconf_get_type(struct stmfx_pinctrl *pctl, pctl 194 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_read(pctl->stmfx->map, reg, &type); pctl 201 drivers/pinctrl/pinctrl-stmfx.c static int stmfx_pinconf_set_type(struct stmfx_pinctrl *pctl, pctl 207 drivers/pinctrl/pinctrl-stmfx.c return regmap_write_bits(pctl->stmfx->map, reg, mask, type ? mask : 0); pctl 213 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 223 drivers/pinctrl/pinctrl-stmfx.c dir = stmfx_gpio_get_direction(&pctl->gpio_chip, pin); pctl 226 drivers/pinctrl/pinctrl-stmfx.c type = stmfx_pinconf_get_type(pctl, pin); pctl 229 drivers/pinctrl/pinctrl-stmfx.c pupd = stmfx_pinconf_get_pupd(pctl, pin); pctl 258 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_gpio_get(&pctl->gpio_chip, pin); pctl 276 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 288 drivers/pinctrl/pinctrl-stmfx.c dir = stmfx_gpio_get_direction(&pctl->gpio_chip, pin); pctl 300 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_pinconf_set_type(pctl, pin, 0); pctl 305 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_pinconf_set_type(pctl, pin, 1); pctl 308 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_pinconf_set_pupd(pctl, pin, 0); pctl 313 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_pinconf_set_type(pctl, pin, 1); pctl 316 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_pinconf_set_pupd(pctl, pin, 1); pctl 321 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_pinconf_set_type(pctl, pin, 1); pctl 326 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_gpio_direction_output(&pctl->gpio_chip, pctl 342 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 350 drivers/pinctrl/pinctrl-stmfx.c dir = stmfx_gpio_get_direction(&pctl->gpio_chip, offset); pctl 353 drivers/pinctrl/pinctrl-stmfx.c type = stmfx_pinconf_get_type(pctl, offset); pctl 356 drivers/pinctrl/pinctrl-stmfx.c pupd = stmfx_pinconf_get_pupd(pctl, offset); pctl 359 drivers/pinctrl/pinctrl-stmfx.c val = stmfx_gpio_get(&pctl->gpio_chip, offset); pctl 416 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = gpiochip_get_data(gpio_chip); pctl 420 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_src[reg] &= ~mask; pctl 426 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = gpiochip_get_data(gpio_chip); pctl 430 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_src[reg] |= mask; pctl 436 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = gpiochip_get_data(gpio_chip); pctl 444 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_evt[reg] |= mask; pctl 447 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_evt[reg] &= ~mask; pctl 452 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_type[reg] |= mask; pctl 454 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_type[reg] &= ~mask; pctl 464 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_toggle_edge[reg] |= mask; pctl 466 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_toggle_edge[reg] &= mask; pctl 474 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = gpiochip_get_data(gpio_chip); pctl 476 drivers/pinctrl/pinctrl-stmfx.c mutex_lock(&pctl->lock); pctl 482 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = gpiochip_get_data(gpio_chip); pctl 491 drivers/pinctrl/pinctrl-stmfx.c if (pctl->irq_toggle_edge[reg] & mask) { pctl 493 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_type[reg] &= ~mask; pctl 495 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_type[reg] |= mask; pctl 498 drivers/pinctrl/pinctrl-stmfx.c regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_EVT, pctl 499 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_evt, NR_GPIO_REGS); pctl 500 drivers/pinctrl/pinctrl-stmfx.c regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_TYPE, pctl 501 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_type, NR_GPIO_REGS); pctl 502 drivers/pinctrl/pinctrl-stmfx.c regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC, pctl 503 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_src, NR_GPIO_REGS); pctl 505 drivers/pinctrl/pinctrl-stmfx.c mutex_unlock(&pctl->lock); pctl 508 drivers/pinctrl/pinctrl-stmfx.c static void stmfx_pinctrl_irq_toggle_trigger(struct stmfx_pinctrl *pctl, pctl 515 drivers/pinctrl/pinctrl-stmfx.c if (!(pctl->irq_toggle_edge[reg] & mask)) pctl 518 drivers/pinctrl/pinctrl-stmfx.c val = stmfx_gpio_get(&pctl->gpio_chip, offset); pctl 523 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_type[reg] &= mask; pctl 524 drivers/pinctrl/pinctrl-stmfx.c regmap_write_bits(pctl->stmfx->map, pctl 529 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_type[reg] |= mask; pctl 530 drivers/pinctrl/pinctrl-stmfx.c regmap_write_bits(pctl->stmfx->map, pctl 538 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = (struct stmfx_pinctrl *)dev_id; pctl 539 drivers/pinctrl/pinctrl-stmfx.c struct gpio_chip *gc = &pctl->gpio_chip; pctl 545 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_IRQ_GPI_PENDING, pctl 550 drivers/pinctrl/pinctrl-stmfx.c regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC, pctl 556 drivers/pinctrl/pinctrl-stmfx.c stmfx_pinctrl_irq_toggle_trigger(pctl, n); pctl 559 drivers/pinctrl/pinctrl-stmfx.c regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC, pctl 560 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_src, NR_GPIO_REGS); pctl 565 drivers/pinctrl/pinctrl-stmfx.c static int stmfx_pinctrl_gpio_function_enable(struct stmfx_pinctrl *pctl) pctl 568 drivers/pinctrl/pinctrl-stmfx.c struct pinctrl_dev *pctl_dev = pctl->pctl_dev; pctl 571 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_valid_mask = GENMASK(15, 0); pctl 576 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_valid_mask |= GENMASK(19, 16); pctl 582 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_valid_mask |= GENMASK(23, 20); pctl 585 drivers/pinctrl/pinctrl-stmfx.c return stmfx_function_enable(pctl->stmfx, func); pctl 592 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl; pctl 595 drivers/pinctrl/pinctrl-stmfx.c pctl = devm_kzalloc(stmfx->dev, sizeof(*pctl), GFP_KERNEL); pctl 596 drivers/pinctrl/pinctrl-stmfx.c if (!pctl) pctl 599 drivers/pinctrl/pinctrl-stmfx.c platform_set_drvdata(pdev, pctl); pctl 601 drivers/pinctrl/pinctrl-stmfx.c pctl->dev = &pdev->dev; pctl 602 drivers/pinctrl/pinctrl-stmfx.c pctl->stmfx = stmfx; pctl 605 drivers/pinctrl/pinctrl-stmfx.c dev_err(pctl->dev, "missing required gpio-ranges property\n"); pctl 613 drivers/pinctrl/pinctrl-stmfx.c mutex_init(&pctl->lock); pctl 616 drivers/pinctrl/pinctrl-stmfx.c pctl->pctl_desc.name = "stmfx-pinctrl"; pctl 617 drivers/pinctrl/pinctrl-stmfx.c pctl->pctl_desc.pctlops = &stmfx_pinctrl_ops; pctl 618 drivers/pinctrl/pinctrl-stmfx.c pctl->pctl_desc.confops = &stmfx_pinconf_ops; pctl 619 drivers/pinctrl/pinctrl-stmfx.c pctl->pctl_desc.pins = stmfx_pins; pctl 620 drivers/pinctrl/pinctrl-stmfx.c pctl->pctl_desc.npins = ARRAY_SIZE(stmfx_pins); pctl 621 drivers/pinctrl/pinctrl-stmfx.c pctl->pctl_desc.owner = THIS_MODULE; pctl 622 drivers/pinctrl/pinctrl-stmfx.c pctl->pctl_desc.link_consumers = true; pctl 624 drivers/pinctrl/pinctrl-stmfx.c ret = devm_pinctrl_register_and_init(pctl->dev, &pctl->pctl_desc, pctl 625 drivers/pinctrl/pinctrl-stmfx.c pctl, &pctl->pctl_dev); pctl 627 drivers/pinctrl/pinctrl-stmfx.c dev_err(pctl->dev, "pinctrl registration failed\n"); pctl 631 drivers/pinctrl/pinctrl-stmfx.c ret = pinctrl_enable(pctl->pctl_dev); pctl 633 drivers/pinctrl/pinctrl-stmfx.c dev_err(pctl->dev, "pinctrl enable failed\n"); pctl 638 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.label = "stmfx-gpio"; pctl 639 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.parent = pctl->dev; pctl 640 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.get_direction = stmfx_gpio_get_direction; pctl 641 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.direction_input = stmfx_gpio_direction_input; pctl 642 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.direction_output = stmfx_gpio_direction_output; pctl 643 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.get = stmfx_gpio_get; pctl 644 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.set = stmfx_gpio_set; pctl 645 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.set_config = gpiochip_generic_config; pctl 646 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.base = -1; pctl 647 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.ngpio = pctl->pctl_desc.npins; pctl 648 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.can_sleep = true; pctl 649 drivers/pinctrl/pinctrl-stmfx.c pctl->gpio_chip.of_node = np; pctl 651 drivers/pinctrl/pinctrl-stmfx.c ret = devm_gpiochip_add_data(pctl->dev, &pctl->gpio_chip, pctl); pctl 653 drivers/pinctrl/pinctrl-stmfx.c dev_err(pctl->dev, "gpio_chip registration failed\n"); pctl 657 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_pinctrl_gpio_function_enable(pctl); pctl 661 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_chip.name = dev_name(pctl->dev); pctl 662 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_chip.irq_mask = stmfx_pinctrl_irq_mask; pctl 663 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_chip.irq_unmask = stmfx_pinctrl_irq_unmask; pctl 664 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_chip.irq_set_type = stmfx_pinctrl_irq_set_type; pctl 665 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_chip.irq_bus_lock = stmfx_pinctrl_irq_bus_lock; pctl 666 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_chip.irq_bus_sync_unlock = stmfx_pinctrl_irq_bus_sync_unlock; pctl 668 drivers/pinctrl/pinctrl-stmfx.c ret = gpiochip_irqchip_add_nested(&pctl->gpio_chip, &pctl->irq_chip, pctl 671 drivers/pinctrl/pinctrl-stmfx.c dev_err(pctl->dev, "cannot add irqchip to gpiochip\n"); pctl 675 drivers/pinctrl/pinctrl-stmfx.c ret = devm_request_threaded_irq(pctl->dev, irq, NULL, pctl 678 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_chip.name, pctl); pctl 680 drivers/pinctrl/pinctrl-stmfx.c dev_err(pctl->dev, "cannot request irq%d\n", irq); pctl 684 drivers/pinctrl/pinctrl-stmfx.c gpiochip_set_nested_irqchip(&pctl->gpio_chip, &pctl->irq_chip, irq); pctl 686 drivers/pinctrl/pinctrl-stmfx.c dev_info(pctl->dev, pctl 687 drivers/pinctrl/pinctrl-stmfx.c "%ld GPIOs available\n", hweight_long(pctl->gpio_valid_mask)); pctl 703 drivers/pinctrl/pinctrl-stmfx.c static int stmfx_pinctrl_backup_regs(struct stmfx_pinctrl *pctl) pctl 707 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_STATE, pctl 708 drivers/pinctrl/pinctrl-stmfx.c &pctl->bkp_gpio_state, NR_GPIO_REGS); pctl 711 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_DIR, pctl 712 drivers/pinctrl/pinctrl-stmfx.c &pctl->bkp_gpio_dir, NR_GPIO_REGS); pctl 715 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_TYPE, pctl 716 drivers/pinctrl/pinctrl-stmfx.c &pctl->bkp_gpio_type, NR_GPIO_REGS); pctl 719 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_read(pctl->stmfx->map, STMFX_REG_GPIO_PUPD, pctl 720 drivers/pinctrl/pinctrl-stmfx.c &pctl->bkp_gpio_pupd, NR_GPIO_REGS); pctl 727 drivers/pinctrl/pinctrl-stmfx.c static int stmfx_pinctrl_restore_regs(struct stmfx_pinctrl *pctl) pctl 731 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_DIR, pctl 732 drivers/pinctrl/pinctrl-stmfx.c pctl->bkp_gpio_dir, NR_GPIO_REGS); pctl 735 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_TYPE, pctl 736 drivers/pinctrl/pinctrl-stmfx.c pctl->bkp_gpio_type, NR_GPIO_REGS); pctl 739 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPIO_PUPD, pctl 740 drivers/pinctrl/pinctrl-stmfx.c pctl->bkp_gpio_pupd, NR_GPIO_REGS); pctl 743 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_GPO_SET, pctl 744 drivers/pinctrl/pinctrl-stmfx.c pctl->bkp_gpio_state, NR_GPIO_REGS); pctl 747 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_EVT, pctl 748 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_evt, NR_GPIO_REGS); pctl 751 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_TYPE, pctl 752 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_type, NR_GPIO_REGS); pctl 755 drivers/pinctrl/pinctrl-stmfx.c ret = regmap_bulk_write(pctl->stmfx->map, STMFX_REG_IRQ_GPI_SRC, pctl 756 drivers/pinctrl/pinctrl-stmfx.c pctl->irq_gpi_src, NR_GPIO_REGS); pctl 765 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = dev_get_drvdata(dev); pctl 768 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_pinctrl_backup_regs(pctl); pctl 770 drivers/pinctrl/pinctrl-stmfx.c dev_err(pctl->dev, "registers backup failure\n"); pctl 779 drivers/pinctrl/pinctrl-stmfx.c struct stmfx_pinctrl *pctl = dev_get_drvdata(dev); pctl 782 drivers/pinctrl/pinctrl-stmfx.c ret = stmfx_pinctrl_restore_regs(pctl); pctl 784 drivers/pinctrl/pinctrl-stmfx.c dev_err(pctl->dev, "registers restoration failure\n"); pctl 374 drivers/pinctrl/pinctrl-sx150x.c static bool sx150x_pin_is_oscio(struct sx150x_pinctrl *pctl, unsigned int pin) pctl 376 drivers/pinctrl/pinctrl-sx150x.c if (pin >= pctl->data->npins) pctl 380 drivers/pinctrl/pinctrl-sx150x.c if (pctl->data->model != SX150X_789) pctl 383 drivers/pinctrl/pinctrl-sx150x.c return !strcmp(pctl->data->pins[pin].name, "oscio"); pctl 389 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = gpiochip_get_data(chip); pctl 393 drivers/pinctrl/pinctrl-sx150x.c if (sx150x_pin_is_oscio(pctl, offset)) pctl 396 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_read(pctl->regmap, pctl->data->reg_dir, &value); pctl 405 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = gpiochip_get_data(chip); pctl 409 drivers/pinctrl/pinctrl-sx150x.c if (sx150x_pin_is_oscio(pctl, offset)) pctl 412 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_read(pctl->regmap, pctl->data->reg_data, &value); pctl 419 drivers/pinctrl/pinctrl-sx150x.c static int __sx150x_gpio_set(struct sx150x_pinctrl *pctl, unsigned int offset, pctl 422 drivers/pinctrl/pinctrl-sx150x.c return regmap_write_bits(pctl->regmap, pctl->data->reg_data, pctl 426 drivers/pinctrl/pinctrl-sx150x.c static int sx150x_gpio_oscio_set(struct sx150x_pinctrl *pctl, pctl 429 drivers/pinctrl/pinctrl-sx150x.c return regmap_write(pctl->regmap, pctl 430 drivers/pinctrl/pinctrl-sx150x.c pctl->data->pri.x789.reg_clock, pctl 437 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = gpiochip_get_data(chip); pctl 439 drivers/pinctrl/pinctrl-sx150x.c if (sx150x_pin_is_oscio(pctl, offset)) pctl 440 drivers/pinctrl/pinctrl-sx150x.c sx150x_gpio_oscio_set(pctl, value); pctl 442 drivers/pinctrl/pinctrl-sx150x.c __sx150x_gpio_set(pctl, offset, value); pctl 450 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = gpiochip_get_data(chip); pctl 452 drivers/pinctrl/pinctrl-sx150x.c regmap_write_bits(pctl->regmap, pctl->data->reg_data, *mask, *bits); pctl 458 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = gpiochip_get_data(chip); pctl 460 drivers/pinctrl/pinctrl-sx150x.c if (sx150x_pin_is_oscio(pctl, offset)) pctl 463 drivers/pinctrl/pinctrl-sx150x.c return regmap_write_bits(pctl->regmap, pctl 464 drivers/pinctrl/pinctrl-sx150x.c pctl->data->reg_dir, pctl 471 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = gpiochip_get_data(chip); pctl 474 drivers/pinctrl/pinctrl-sx150x.c if (sx150x_pin_is_oscio(pctl, offset)) pctl 475 drivers/pinctrl/pinctrl-sx150x.c return sx150x_gpio_oscio_set(pctl, value); pctl 477 drivers/pinctrl/pinctrl-sx150x.c ret = __sx150x_gpio_set(pctl, offset, value); pctl 481 drivers/pinctrl/pinctrl-sx150x.c return regmap_write_bits(pctl->regmap, pctl 482 drivers/pinctrl/pinctrl-sx150x.c pctl->data->reg_dir, pctl 488 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = pctl 492 drivers/pinctrl/pinctrl-sx150x.c pctl->irq.masked |= BIT(n); pctl 497 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = pctl 501 drivers/pinctrl/pinctrl-sx150x.c pctl->irq.masked &= ~BIT(n); pctl 504 drivers/pinctrl/pinctrl-sx150x.c static void sx150x_irq_set_sense(struct sx150x_pinctrl *pctl, pctl 515 drivers/pinctrl/pinctrl-sx150x.c pctl->irq.sense &= mask; pctl 516 drivers/pinctrl/pinctrl-sx150x.c pctl->irq.sense |= sense << n; pctl 521 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = pctl 535 drivers/pinctrl/pinctrl-sx150x.c sx150x_irq_set_sense(pctl, n, val); pctl 541 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = (struct sx150x_pinctrl *)dev_id; pctl 546 drivers/pinctrl/pinctrl-sx150x.c err = regmap_read(pctl->regmap, pctl->data->reg_irq_src, &val); pctl 550 drivers/pinctrl/pinctrl-sx150x.c err = regmap_write(pctl->regmap, pctl->data->reg_irq_src, val); pctl 555 drivers/pinctrl/pinctrl-sx150x.c for_each_set_bit(n, &status, pctl->data->ngpios) pctl 556 drivers/pinctrl/pinctrl-sx150x.c handle_nested_irq(irq_find_mapping(pctl->gpio.irq.domain, n)); pctl 563 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = pctl 566 drivers/pinctrl/pinctrl-sx150x.c mutex_lock(&pctl->lock); pctl 571 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = pctl 574 drivers/pinctrl/pinctrl-sx150x.c regmap_write(pctl->regmap, pctl->data->reg_irq_mask, pctl->irq.masked); pctl 575 drivers/pinctrl/pinctrl-sx150x.c regmap_write(pctl->regmap, pctl->data->reg_sense, pctl->irq.sense); pctl 576 drivers/pinctrl/pinctrl-sx150x.c mutex_unlock(&pctl->lock); pctl 582 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 588 drivers/pinctrl/pinctrl-sx150x.c if (sx150x_pin_is_oscio(pctl, pin)) { pctl 592 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_read(pctl->regmap, pctl 593 drivers/pinctrl/pinctrl-sx150x.c pctl->data->pri.x789.reg_clock, pctl 619 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_read(pctl->regmap, pctl 620 drivers/pinctrl/pinctrl-sx150x.c pctl->data->reg_pulldn, pctl 634 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_read(pctl->regmap, pctl 635 drivers/pinctrl/pinctrl-sx150x.c pctl->data->reg_pullup, pctl 649 drivers/pinctrl/pinctrl-sx150x.c if (pctl->data->model != SX150X_789) pctl 652 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_read(pctl->regmap, pctl 653 drivers/pinctrl/pinctrl-sx150x.c pctl->data->pri.x789.reg_drain, pctl 667 drivers/pinctrl/pinctrl-sx150x.c if (pctl->data->model != SX150X_789) pctl 670 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_read(pctl->regmap, pctl 671 drivers/pinctrl/pinctrl-sx150x.c pctl->data->pri.x789.reg_drain, pctl 686 drivers/pinctrl/pinctrl-sx150x.c ret = sx150x_gpio_get_direction(&pctl->gpio, pin); pctl 693 drivers/pinctrl/pinctrl-sx150x.c ret = sx150x_gpio_get(&pctl->gpio, pin); pctl 713 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 723 drivers/pinctrl/pinctrl-sx150x.c if (sx150x_pin_is_oscio(pctl, pin)) { pctl 725 drivers/pinctrl/pinctrl-sx150x.c ret = sx150x_gpio_direction_output(&pctl->gpio, pctl 738 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_write_bits(pctl->regmap, pctl 739 drivers/pinctrl/pinctrl-sx150x.c pctl->data->reg_pulldn, pctl 744 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_write_bits(pctl->regmap, pctl 745 drivers/pinctrl/pinctrl-sx150x.c pctl->data->reg_pullup, pctl 753 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_write_bits(pctl->regmap, pctl 754 drivers/pinctrl/pinctrl-sx150x.c pctl->data->reg_pullup, pctl 762 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_write_bits(pctl->regmap, pctl 763 drivers/pinctrl/pinctrl-sx150x.c pctl->data->reg_pulldn, pctl 771 drivers/pinctrl/pinctrl-sx150x.c if (pctl->data->model != SX150X_789 || pctl 772 drivers/pinctrl/pinctrl-sx150x.c sx150x_pin_is_oscio(pctl, pin)) pctl 775 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_write_bits(pctl->regmap, pctl 776 drivers/pinctrl/pinctrl-sx150x.c pctl->data->pri.x789.reg_drain, pctl 784 drivers/pinctrl/pinctrl-sx150x.c if (pctl->data->model != SX150X_789 || pctl 785 drivers/pinctrl/pinctrl-sx150x.c sx150x_pin_is_oscio(pctl, pin)) pctl 788 drivers/pinctrl/pinctrl-sx150x.c ret = regmap_write_bits(pctl->regmap, pctl 789 drivers/pinctrl/pinctrl-sx150x.c pctl->data->pri.x789.reg_drain, pctl 797 drivers/pinctrl/pinctrl-sx150x.c ret = sx150x_gpio_direction_output(&pctl->gpio, pctl 844 drivers/pinctrl/pinctrl-sx150x.c static int sx150x_reset(struct sx150x_pinctrl *pctl) pctl 848 drivers/pinctrl/pinctrl-sx150x.c err = i2c_smbus_write_byte_data(pctl->client, pctl 849 drivers/pinctrl/pinctrl-sx150x.c pctl->data->pri.x789.reg_reset, pctl 854 drivers/pinctrl/pinctrl-sx150x.c err = i2c_smbus_write_byte_data(pctl->client, pctl 855 drivers/pinctrl/pinctrl-sx150x.c pctl->data->pri.x789.reg_reset, pctl 860 drivers/pinctrl/pinctrl-sx150x.c static int sx150x_init_misc(struct sx150x_pinctrl *pctl) pctl 864 drivers/pinctrl/pinctrl-sx150x.c switch (pctl->data->model) { pctl 866 drivers/pinctrl/pinctrl-sx150x.c reg = pctl->data->pri.x789.reg_misc; pctl 870 drivers/pinctrl/pinctrl-sx150x.c reg = pctl->data->pri.x456.reg_advanced; pctl 881 drivers/pinctrl/pinctrl-sx150x.c reg = pctl->data->pri.x123.reg_advanced; pctl 885 drivers/pinctrl/pinctrl-sx150x.c WARN(1, "Unknown chip model %d\n", pctl->data->model); pctl 889 drivers/pinctrl/pinctrl-sx150x.c return regmap_write(pctl->regmap, reg, value); pctl 892 drivers/pinctrl/pinctrl-sx150x.c static int sx150x_init_hw(struct sx150x_pinctrl *pctl) pctl 895 drivers/pinctrl/pinctrl-sx150x.c [SX150X_789] = pctl->data->pri.x789.reg_polarity, pctl 896 drivers/pinctrl/pinctrl-sx150x.c [SX150X_456] = pctl->data->pri.x456.reg_pld_mode, pctl 897 drivers/pinctrl/pinctrl-sx150x.c [SX150X_123] = pctl->data->pri.x123.reg_pld_mode, pctl 901 drivers/pinctrl/pinctrl-sx150x.c if (pctl->data->model == SX150X_789 && pctl 902 drivers/pinctrl/pinctrl-sx150x.c of_property_read_bool(pctl->dev->of_node, "semtech,probe-reset")) { pctl 903 drivers/pinctrl/pinctrl-sx150x.c err = sx150x_reset(pctl); pctl 908 drivers/pinctrl/pinctrl-sx150x.c err = sx150x_init_misc(pctl); pctl 913 drivers/pinctrl/pinctrl-sx150x.c return regmap_write(pctl->regmap, reg[pctl->data->model], 0); pctl 916 drivers/pinctrl/pinctrl-sx150x.c static int sx150x_regmap_reg_width(struct sx150x_pinctrl *pctl, pctl 919 drivers/pinctrl/pinctrl-sx150x.c const struct sx150x_device_data *data = pctl->data; pctl 945 drivers/pinctrl/pinctrl-sx150x.c static unsigned int sx150x_maybe_swizzle(struct sx150x_pinctrl *pctl, pctl 949 drivers/pinctrl/pinctrl-sx150x.c const struct sx150x_device_data *data = pctl->data; pctl 1001 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = context; pctl 1002 drivers/pinctrl/pinctrl-sx150x.c struct i2c_client *i2c = pctl->client; pctl 1003 drivers/pinctrl/pinctrl-sx150x.c const int width = sx150x_regmap_reg_width(pctl, reg); pctl 1045 drivers/pinctrl/pinctrl-sx150x.c *result = sx150x_maybe_swizzle(pctl, reg, val); pctl 1054 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = context; pctl 1055 drivers/pinctrl/pinctrl-sx150x.c struct i2c_client *i2c = pctl->client; pctl 1056 drivers/pinctrl/pinctrl-sx150x.c const int width = sx150x_regmap_reg_width(pctl, reg); pctl 1058 drivers/pinctrl/pinctrl-sx150x.c val = sx150x_maybe_swizzle(pctl, reg, val); pctl 1077 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl = i2c_get_clientdata(to_i2c_client(dev)); pctl 1079 drivers/pinctrl/pinctrl-sx150x.c return reg == pctl->data->reg_irq_src || reg == pctl->data->reg_data; pctl 1101 drivers/pinctrl/pinctrl-sx150x.c struct sx150x_pinctrl *pctl; pctl 1107 drivers/pinctrl/pinctrl-sx150x.c pctl = devm_kzalloc(dev, sizeof(*pctl), GFP_KERNEL); pctl 1108 drivers/pinctrl/pinctrl-sx150x.c if (!pctl) pctl 1111 drivers/pinctrl/pinctrl-sx150x.c i2c_set_clientdata(client, pctl); pctl 1113 drivers/pinctrl/pinctrl-sx150x.c pctl->dev = dev; pctl 1114 drivers/pinctrl/pinctrl-sx150x.c pctl->client = client; pctl 1117 drivers/pinctrl/pinctrl-sx150x.c pctl->data = of_device_get_match_data(dev); pctl 1119 drivers/pinctrl/pinctrl-sx150x.c pctl->data = (struct sx150x_device_data *)id->driver_data; pctl 1121 drivers/pinctrl/pinctrl-sx150x.c if (!pctl->data) pctl 1124 drivers/pinctrl/pinctrl-sx150x.c pctl->regmap = devm_regmap_init(dev, NULL, pctl, pctl 1126 drivers/pinctrl/pinctrl-sx150x.c if (IS_ERR(pctl->regmap)) { pctl 1127 drivers/pinctrl/pinctrl-sx150x.c ret = PTR_ERR(pctl->regmap); pctl 1133 drivers/pinctrl/pinctrl-sx150x.c mutex_init(&pctl->lock); pctl 1135 drivers/pinctrl/pinctrl-sx150x.c ret = sx150x_init_hw(pctl); pctl 1140 drivers/pinctrl/pinctrl-sx150x.c pctl->pinctrl_desc.name = "sx150x-pinctrl"; pctl 1141 drivers/pinctrl/pinctrl-sx150x.c pctl->pinctrl_desc.pctlops = &sx150x_pinctrl_ops; pctl 1142 drivers/pinctrl/pinctrl-sx150x.c pctl->pinctrl_desc.confops = &sx150x_pinconf_ops; pctl 1143 drivers/pinctrl/pinctrl-sx150x.c pctl->pinctrl_desc.pins = pctl->data->pins; pctl 1144 drivers/pinctrl/pinctrl-sx150x.c pctl->pinctrl_desc.npins = pctl->data->npins; pctl 1145 drivers/pinctrl/pinctrl-sx150x.c pctl->pinctrl_desc.owner = THIS_MODULE; pctl 1147 drivers/pinctrl/pinctrl-sx150x.c ret = devm_pinctrl_register_and_init(dev, &pctl->pinctrl_desc, pctl 1148 drivers/pinctrl/pinctrl-sx150x.c pctl, &pctl->pctldev); pctl 1154 drivers/pinctrl/pinctrl-sx150x.c ret = pinctrl_enable(pctl->pctldev); pctl 1161 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.base = -1; pctl 1162 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.ngpio = pctl->data->npins; pctl 1163 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.get_direction = sx150x_gpio_get_direction; pctl 1164 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.direction_input = sx150x_gpio_direction_input; pctl 1165 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.direction_output = sx150x_gpio_direction_output; pctl 1166 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.get = sx150x_gpio_get; pctl 1167 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.set = sx150x_gpio_set; pctl 1168 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.set_config = gpiochip_generic_config; pctl 1169 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.parent = dev; pctl 1171 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.of_node = dev->of_node; pctl 1173 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.can_sleep = true; pctl 1174 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.label = devm_kstrdup(dev, client->name, GFP_KERNEL); pctl 1175 drivers/pinctrl/pinctrl-sx150x.c if (!pctl->gpio.label) pctl 1184 drivers/pinctrl/pinctrl-sx150x.c if (pctl->data->model != SX150X_789) pctl 1185 drivers/pinctrl/pinctrl-sx150x.c pctl->gpio.set_multiple = sx150x_gpio_set_multiple; pctl 1187 drivers/pinctrl/pinctrl-sx150x.c ret = devm_gpiochip_add_data(dev, &pctl->gpio, pctl); pctl 1191 drivers/pinctrl/pinctrl-sx150x.c ret = gpiochip_add_pin_range(&pctl->gpio, dev_name(dev), pctl 1192 drivers/pinctrl/pinctrl-sx150x.c 0, 0, pctl->data->npins); pctl 1198 drivers/pinctrl/pinctrl-sx150x.c pctl->irq_chip.irq_mask = sx150x_irq_mask; pctl 1199 drivers/pinctrl/pinctrl-sx150x.c pctl->irq_chip.irq_unmask = sx150x_irq_unmask; pctl 1200 drivers/pinctrl/pinctrl-sx150x.c pctl->irq_chip.irq_set_type = sx150x_irq_set_type; pctl 1201 drivers/pinctrl/pinctrl-sx150x.c pctl->irq_chip.irq_bus_lock = sx150x_irq_bus_lock; pctl 1202 drivers/pinctrl/pinctrl-sx150x.c pctl->irq_chip.irq_bus_sync_unlock = sx150x_irq_bus_sync_unlock; pctl 1203 drivers/pinctrl/pinctrl-sx150x.c pctl->irq_chip.name = devm_kstrdup(dev, client->name, pctl 1205 drivers/pinctrl/pinctrl-sx150x.c if (!pctl->irq_chip.name) pctl 1208 drivers/pinctrl/pinctrl-sx150x.c pctl->irq.masked = ~0; pctl 1209 drivers/pinctrl/pinctrl-sx150x.c pctl->irq.sense = 0; pctl 1222 drivers/pinctrl/pinctrl-sx150x.c ret = gpiochip_irqchip_add_nested(&pctl->gpio, pctl 1223 drivers/pinctrl/pinctrl-sx150x.c &pctl->irq_chip, 0, pctl 1234 drivers/pinctrl/pinctrl-sx150x.c pctl->irq_chip.name, pctl); pctl 1238 drivers/pinctrl/pinctrl-sx150x.c gpiochip_set_nested_irqchip(&pctl->gpio, pctl 1239 drivers/pinctrl/pinctrl-sx150x.c &pctl->irq_chip, pctl 481 drivers/pinctrl/pinctrl-tb10x.c struct pinctrl_dev *pctl; pctl 515 drivers/pinctrl/pinctrl-tb10x.c static int tb10x_get_groups_count(struct pinctrl_dev *pctl) pctl 517 drivers/pinctrl/pinctrl-tb10x.c struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); pctl 521 drivers/pinctrl/pinctrl-tb10x.c static const char *tb10x_get_group_name(struct pinctrl_dev *pctl, unsigned n) pctl 523 drivers/pinctrl/pinctrl-tb10x.c struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); pctl 527 drivers/pinctrl/pinctrl-tb10x.c static int tb10x_get_group_pins(struct pinctrl_dev *pctl, unsigned n, pctl 531 drivers/pinctrl/pinctrl-tb10x.c struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); pctl 539 drivers/pinctrl/pinctrl-tb10x.c static int tb10x_dt_node_to_map(struct pinctrl_dev *pctl, pctl 556 drivers/pinctrl/pinctrl-tb10x.c ret = pinctrl_utils_reserve_map(pctl, map, &reserved_maps, pctl 561 drivers/pinctrl/pinctrl-tb10x.c ret = pinctrl_utils_add_map_mux(pctl, map, &reserved_maps, pctl 576 drivers/pinctrl/pinctrl-tb10x.c static int tb10x_get_functions_count(struct pinctrl_dev *pctl) pctl 578 drivers/pinctrl/pinctrl-tb10x.c struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); pctl 582 drivers/pinctrl/pinctrl-tb10x.c static const char *tb10x_get_function_name(struct pinctrl_dev *pctl, pctl 585 drivers/pinctrl/pinctrl-tb10x.c struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); pctl 589 drivers/pinctrl/pinctrl-tb10x.c static int tb10x_get_function_groups(struct pinctrl_dev *pctl, pctl 593 drivers/pinctrl/pinctrl-tb10x.c struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); pctl 601 drivers/pinctrl/pinctrl-tb10x.c static int tb10x_gpio_request_enable(struct pinctrl_dev *pctl, pctl 605 drivers/pinctrl/pinctrl-tb10x.c struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); pctl 675 drivers/pinctrl/pinctrl-tb10x.c static void tb10x_gpio_disable_free(struct pinctrl_dev *pctl, pctl 679 drivers/pinctrl/pinctrl-tb10x.c struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); pctl 688 drivers/pinctrl/pinctrl-tb10x.c static int tb10x_pctl_set_mux(struct pinctrl_dev *pctl, pctl 691 drivers/pinctrl/pinctrl-tb10x.c struct tb10x_pinctrl *state = pinctrl_dev_get_drvdata(pctl); pctl 795 drivers/pinctrl/pinctrl-tb10x.c state->pctl = devm_pinctrl_register(dev, &tb10x_pindesc, state); pctl 796 drivers/pinctrl/pinctrl-tb10x.c if (IS_ERR(state->pctl)) { pctl 798 drivers/pinctrl/pinctrl-tb10x.c ret = PTR_ERR(state->pctl); pctl 667 drivers/pinctrl/pinctrl-u300.c struct pinctrl_dev *pctl; pctl 1072 drivers/pinctrl/pinctrl-u300.c upmx->pctl = devm_pinctrl_register(&pdev->dev, &u300_pmx_desc, upmx); pctl 1073 drivers/pinctrl/pinctrl-u300.c if (IS_ERR(upmx->pctl)) { pctl 1075 drivers/pinctrl/pinctrl-u300.c return PTR_ERR(upmx->pctl); pctl 25 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 27 drivers/pinctrl/pxa/pinctrl-pxa2xx.c return pctl->ngroups; pctl 33 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 34 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl_group *group = pctl->groups + tgroup; pctl 44 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 45 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl_group *group = pctl->groups + tgroup; pctl 64 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pxa_desc_by_func_group(struct pxa_pinctrl *pctl, const char *pin_name, pctl 70 drivers/pinctrl/pxa/pinctrl-pxa2xx.c for (i = 0; i < pctl->npins; i++) { pctl 71 drivers/pinctrl/pxa/pinctrl-pxa2xx.c const struct pxa_desc_pin *pin = pctl->ppins + i; pctl 87 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 92 drivers/pinctrl/pxa/pinctrl-pxa2xx.c gpdr = pctl->base_gpdr[pin / 32]; pctl 93 drivers/pinctrl/pxa/pinctrl-pxa2xx.c dev_dbg(pctl->dev, "set_direction(pin=%d): dir=%d\n", pctl 96 drivers/pinctrl/pxa/pinctrl-pxa2xx.c spin_lock_irqsave(&pctl->lock, flags); pctl 102 drivers/pinctrl/pxa/pinctrl-pxa2xx.c spin_unlock_irqrestore(&pctl->lock, flags); pctl 110 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 111 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl_function *pf = pctl->functions + function; pctl 118 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 120 drivers/pinctrl/pxa/pinctrl-pxa2xx.c return pctl->nfuncs; pctl 128 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 129 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl_function *pf = pctl->functions + function; pctl 140 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 141 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl_group *group = pctl->groups + tgroup; pctl 149 drivers/pinctrl/pxa/pinctrl-pxa2xx.c df = pxa_desc_by_func_group(pctl, group->name, pctl 150 drivers/pinctrl/pxa/pinctrl-pxa2xx.c (pctl->functions + function)->name); pctl 155 drivers/pinctrl/pxa/pinctrl-pxa2xx.c gafr = pctl->base_gafr[pin / 16]; pctl 156 drivers/pinctrl/pxa/pinctrl-pxa2xx.c gpdr = pctl->base_gpdr[pin / 32]; pctl 158 drivers/pinctrl/pxa/pinctrl-pxa2xx.c dev_dbg(pctl->dev, "set_mux(pin=%d): af=%d dir=%d\n", pctl 161 drivers/pinctrl/pxa/pinctrl-pxa2xx.c spin_lock_irqsave(&pctl->lock, flags); pctl 171 drivers/pinctrl/pxa/pinctrl-pxa2xx.c spin_unlock_irqrestore(&pctl->lock, flags); pctl 187 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 188 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl_group *g = pctl->groups + group; pctl 191 drivers/pinctrl/pxa/pinctrl-pxa2xx.c void __iomem *pgsr = pctl->base_pgsr[pin / 32]; pctl 194 drivers/pinctrl/pxa/pinctrl-pxa2xx.c spin_lock_irqsave(&pctl->lock, flags); pctl 197 drivers/pinctrl/pxa/pinctrl-pxa2xx.c spin_unlock_irqrestore(&pctl->lock, flags); pctl 199 drivers/pinctrl/pxa/pinctrl-pxa2xx.c dev_dbg(pctl->dev, "get sleep gpio state(pin=%d) %d\n", pctl 209 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 210 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl_group *g = pctl->groups + group; pctl 213 drivers/pinctrl/pxa/pinctrl-pxa2xx.c void __iomem *pgsr = pctl->base_pgsr[pin / 32]; pctl 227 drivers/pinctrl/pxa/pinctrl-pxa2xx.c dev_dbg(pctl->dev, "set sleep gpio state(pin=%d) %d\n", pctl 230 drivers/pinctrl/pxa/pinctrl-pxa2xx.c spin_lock_irqsave(&pctl->lock, flags); pctl 234 drivers/pinctrl/pxa/pinctrl-pxa2xx.c spin_unlock_irqrestore(&pctl->lock, flags); pctl 252 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pxa2xx_find_function(struct pxa_pinctrl *pctl, const char *fname, pctl 264 drivers/pinctrl/pxa/pinctrl-pxa2xx.c static int pxa2xx_build_functions(struct pxa_pinctrl *pctl) pctl 276 drivers/pinctrl/pxa/pinctrl-pxa2xx.c functions = devm_kcalloc(pctl->dev, pctl->npins * 6, pctl 281 drivers/pinctrl/pxa/pinctrl-pxa2xx.c for (i = 0; i < pctl->npins; i++) pctl 282 drivers/pinctrl/pxa/pinctrl-pxa2xx.c for (df = pctl->ppins[i].functions; df->name; df++) pctl 283 drivers/pinctrl/pxa/pinctrl-pxa2xx.c if (!pxa2xx_find_function(pctl, df->name, functions)) pctl 284 drivers/pinctrl/pxa/pinctrl-pxa2xx.c (functions + pctl->nfuncs++)->name = df->name; pctl 285 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->functions = devm_kmemdup(pctl->dev, functions, pctl 286 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->nfuncs * sizeof(*functions), pctl 288 drivers/pinctrl/pxa/pinctrl-pxa2xx.c if (!pctl->functions) pctl 291 drivers/pinctrl/pxa/pinctrl-pxa2xx.c devm_kfree(pctl->dev, functions); pctl 295 drivers/pinctrl/pxa/pinctrl-pxa2xx.c static int pxa2xx_build_groups(struct pxa_pinctrl *pctl) pctl 302 drivers/pinctrl/pxa/pinctrl-pxa2xx.c gtmp = devm_kmalloc_array(pctl->dev, pctl->npins, sizeof(*gtmp), pctl 307 drivers/pinctrl/pxa/pinctrl-pxa2xx.c for (i = 0; i < pctl->nfuncs; i++) { pctl 309 drivers/pinctrl/pxa/pinctrl-pxa2xx.c for (j = 0; j < pctl->npins; j++) pctl 310 drivers/pinctrl/pxa/pinctrl-pxa2xx.c for (df = pctl->ppins[j].functions; df->name; pctl 312 drivers/pinctrl/pxa/pinctrl-pxa2xx.c if (!strcmp(pctl->functions[i].name, pctl 315 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->ppins[j].pin.name; pctl 316 drivers/pinctrl/pxa/pinctrl-pxa2xx.c func = pctl->functions + i; pctl 319 drivers/pinctrl/pxa/pinctrl-pxa2xx.c devm_kmalloc_array(pctl->dev, ngroups, pctl 327 drivers/pinctrl/pxa/pinctrl-pxa2xx.c devm_kfree(pctl->dev, gtmp); pctl 331 drivers/pinctrl/pxa/pinctrl-pxa2xx.c static int pxa2xx_build_state(struct pxa_pinctrl *pctl, pctl 338 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->npins = npins; pctl 339 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->ppins = ppins; pctl 340 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->ngroups = npins; pctl 342 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->desc.npins = npins; pctl 343 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pins = devm_kcalloc(pctl->dev, npins, sizeof(*pins), GFP_KERNEL); pctl 347 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->desc.pins = pins; pctl 351 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->groups = devm_kmalloc_array(pctl->dev, pctl->ngroups, pctl 352 drivers/pinctrl/pxa/pinctrl-pxa2xx.c sizeof(*pctl->groups), GFP_KERNEL); pctl 353 drivers/pinctrl/pxa/pinctrl-pxa2xx.c if (!pctl->groups) pctl 357 drivers/pinctrl/pxa/pinctrl-pxa2xx.c group = pctl->groups + i; pctl 362 drivers/pinctrl/pxa/pinctrl-pxa2xx.c ret = pxa2xx_build_functions(pctl); pctl 366 drivers/pinctrl/pxa/pinctrl-pxa2xx.c ret = pxa2xx_build_groups(pctl); pctl 378 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl; pctl 384 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); pctl 385 drivers/pinctrl/pxa/pinctrl-pxa2xx.c if (!pctl) pctl 387 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->base_gafr = devm_kcalloc(&pdev->dev, roundup(maxpin, 16), pctl 388 drivers/pinctrl/pxa/pinctrl-pxa2xx.c sizeof(*pctl->base_gafr), GFP_KERNEL); pctl 389 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->base_gpdr = devm_kcalloc(&pdev->dev, roundup(maxpin, 32), pctl 390 drivers/pinctrl/pxa/pinctrl-pxa2xx.c sizeof(*pctl->base_gpdr), GFP_KERNEL); pctl 391 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->base_pgsr = devm_kcalloc(&pdev->dev, roundup(maxpin, 32), pctl 392 drivers/pinctrl/pxa/pinctrl-pxa2xx.c sizeof(*pctl->base_pgsr), GFP_KERNEL); pctl 393 drivers/pinctrl/pxa/pinctrl-pxa2xx.c if (!pctl->base_gafr || !pctl->base_gpdr || !pctl->base_pgsr) pctl 396 drivers/pinctrl/pxa/pinctrl-pxa2xx.c platform_set_drvdata(pdev, pctl); pctl 397 drivers/pinctrl/pxa/pinctrl-pxa2xx.c spin_lock_init(&pctl->lock); pctl 399 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->dev = &pdev->dev; pctl 400 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->desc = pxa2xx_pinctrl_desc; pctl 401 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->desc.name = dev_name(&pdev->dev); pctl 402 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->desc.owner = THIS_MODULE; pctl 405 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->base_gafr[i / 16] = base_gafr[i / 16]; pctl 407 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->base_gpdr[i / 32] = base_gpdr[i / 32]; pctl 408 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->base_pgsr[i / 32] = base_pgsr[i / 32]; pctl 411 drivers/pinctrl/pxa/pinctrl-pxa2xx.c ret = pxa2xx_build_state(pctl, ppins, npins); pctl 415 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, &pctl->desc, pctl); pctl 416 drivers/pinctrl/pxa/pinctrl-pxa2xx.c if (IS_ERR(pctl->pctl_dev)) { pctl 418 drivers/pinctrl/pxa/pinctrl-pxa2xx.c return PTR_ERR(pctl->pctl_dev); pctl 429 drivers/pinctrl/pxa/pinctrl-pxa2xx.c struct pxa_pinctrl *pctl = platform_get_drvdata(pdev); pctl 431 drivers/pinctrl/pxa/pinctrl-pxa2xx.c pinctrl_unregister(pctl->pctl_dev); pctl 673 drivers/pinctrl/samsung/pinctrl-samsung.c struct pinctrl_desc *ctrldesc = &drvdata->pctl; pctl 857 drivers/pinctrl/samsung/pinctrl-samsung.c struct pinctrl_desc *ctrldesc = &drvdata->pctl; pctl 276 drivers/pinctrl/samsung/pinctrl-samsung.h struct pinctrl_desc pctl; pctl 35 drivers/pinctrl/sh-pfc/pinctrl.c struct pinctrl_dev *pctl; pctl 824 drivers/pinctrl/sh-pfc/pinctrl.c &pmx->pctl); pctl 831 drivers/pinctrl/sh-pfc/pinctrl.c return pinctrl_enable(pmx->pctl); pctl 364 drivers/pinctrl/sirf/pinctrl-atlas7.c struct pinctrl_dev *pctl; pctl 5453 drivers/pinctrl/sirf/pinctrl-atlas7.c pmx->pctl = pinctrl_register(&pmx->pctl_desc, &pdev->dev, pmx); pctl 5454 drivers/pinctrl/sirf/pinctrl-atlas7.c if (IS_ERR(pmx->pctl)) { pctl 5456 drivers/pinctrl/sirf/pinctrl-atlas7.c ret = PTR_ERR(pmx->pctl); pctl 5554 drivers/pinctrl/sirf/pinctrl-atlas7.c __altas7_pinctrl_set_drive_strength_sel(pmx->pctl, idx, pctl 5559 drivers/pinctrl/sirf/pinctrl-atlas7.c altas7_pinctrl_set_pull_sel(pmx->pctl, idx, pctl 400 drivers/pinctrl/spear/pinctrl-spear.c pmx->pctl = devm_pinctrl_register(&pdev->dev, &spear_pinctrl_desc, pmx); pctl 401 drivers/pinctrl/spear/pinctrl-spear.c if (IS_ERR(pmx->pctl)) { pctl 403 drivers/pinctrl/spear/pinctrl-spear.c return PTR_ERR(pmx->pctl); pctl 179 drivers/pinctrl/spear/pinctrl-spear.h struct pinctrl_dev *pctl; pctl 149 drivers/pinctrl/sprd/pinctrl-sprd.c struct pinctrl_dev *pctl; pctl 208 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 209 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl_soc_info *info = pctl->info; pctl 217 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 218 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl_soc_info *info = pctl->info; pctl 228 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 229 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl_soc_info *info = pctl->info; pctl 245 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 255 drivers/pinctrl/sprd/pinctrl-sprd.c grp = sprd_pinctrl_find_group_by_name(pctl, np->name); pctl 257 drivers/pinctrl/sprd/pinctrl-sprd.c dev_err(pctl->dev, "unable to find group for node %s\n", pctl 274 drivers/pinctrl/sprd/pinctrl-sprd.c dev_err(pctl->dev, pctl 283 drivers/pinctrl/sprd/pinctrl-sprd.c dev_err(pctl->dev, "%s: could not parse node property\n", pctl 373 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 374 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl_soc_info *info = pctl->info; pctl 386 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 387 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl_soc_info *info = pctl->info; pctl 415 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pin *pin = sprd_pinctrl_get_pin_by_id(pctl, pin_id); pctl 439 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 440 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pin *pin = sprd_pinctrl_get_pin_by_id(pctl, pin_id); pctl 578 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 579 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pin *pin = sprd_pinctrl_get_pin_by_id(pctl, pin_id); pctl 707 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 708 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl_soc_info *info = pctl->info; pctl 726 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 727 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl_soc_info *info = pctl->info; pctl 751 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 752 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pin *pin = sprd_pinctrl_get_pin_by_id(pctl, pin_id); pctl 784 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 785 drivers/pinctrl/sprd/pinctrl-sprd.c struct sprd_pinctrl_soc_info *info = pctl->info; pctl 1063 drivers/pinctrl/sprd/pinctrl-sprd.c sprd_pctl->pctl = pinctrl_register(&sprd_pinctrl_desc, pctl 1065 drivers/pinctrl/sprd/pinctrl-sprd.c if (IS_ERR(sprd_pctl->pctl)) { pctl 1067 drivers/pinctrl/sprd/pinctrl-sprd.c return PTR_ERR(sprd_pctl->pctl); pctl 1077 drivers/pinctrl/sprd/pinctrl-sprd.c pinctrl_unregister(sprd_pctl->pctl); pctl 208 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); pctl 212 drivers/pinctrl/stm32/pinctrl-stm32.c range = pinctrl_find_gpio_range_from_pin_nolock(pctl->pctl_dev, pin); pctl 214 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "pin %d not in range.\n", pin); pctl 309 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); pctl 318 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "unable to lock HW IRQ %lu for IRQ\n", pctl 363 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); pctl 371 drivers/pinctrl/stm32/pinctrl-stm32.c spin_lock_irqsave(&pctl->irqmux_lock, flags); pctl 372 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 373 drivers/pinctrl/stm32/pinctrl-stm32.c ret = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); pctl 376 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "Can't get hwspinlock\n"); pctl 380 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->irqmux_map & BIT(irq_data->hwirq)) { pctl 381 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "irq line %ld already requested.\n", pctl 384 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 385 drivers/pinctrl/stm32/pinctrl-stm32.c hwspin_unlock(pctl->hwlock); pctl 388 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->irqmux_map |= BIT(irq_data->hwirq); pctl 391 drivers/pinctrl/stm32/pinctrl-stm32.c regmap_field_write(pctl->irqmux[irq_data->hwirq], bank->bank_ioport_nr); pctl 393 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 394 drivers/pinctrl/stm32/pinctrl-stm32.c hwspin_unlock(pctl->hwlock); pctl 397 drivers/pinctrl/stm32/pinctrl-stm32.c spin_unlock_irqrestore(&pctl->irqmux_lock, flags); pctl 405 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); pctl 408 drivers/pinctrl/stm32/pinctrl-stm32.c spin_lock_irqsave(&pctl->irqmux_lock, flags); pctl 409 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->irqmux_map &= ~BIT(irq_data->hwirq); pctl 410 drivers/pinctrl/stm32/pinctrl-stm32.c spin_unlock_irqrestore(&pctl->irqmux_lock, flags); pctl 444 drivers/pinctrl/stm32/pinctrl-stm32.c stm32_pctrl_find_group_by_pin(struct stm32_pinctrl *pctl, u32 pin) pctl 448 drivers/pinctrl/stm32/pinctrl-stm32.c for (i = 0; i < pctl->ngroups; i++) { pctl 449 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl_group *grp = pctl->groups + i; pctl 458 drivers/pinctrl/stm32/pinctrl-stm32.c static bool stm32_pctrl_is_function_valid(struct stm32_pinctrl *pctl, pctl 463 drivers/pinctrl/stm32/pinctrl-stm32.c for (i = 0; i < pctl->npins; i++) { pctl 464 drivers/pinctrl/stm32/pinctrl-stm32.c const struct stm32_desc_pin *pin = pctl->pins + i; pctl 482 drivers/pinctrl/stm32/pinctrl-stm32.c static int stm32_pctrl_dt_node_to_map_func(struct stm32_pinctrl *pctl, pctl 493 drivers/pinctrl/stm32/pinctrl-stm32.c if (!stm32_pctrl_is_function_valid(pctl, pin, fnum)) { pctl 494 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "invalid function %d on pin %d .\n", pctl 511 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl; pctl 521 drivers/pinctrl/stm32/pinctrl-stm32.c pctl = pinctrl_dev_get_drvdata(pctldev); pctl 525 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "missing pins property in node %pOFn .\n", pctl 567 drivers/pinctrl/stm32/pinctrl-stm32.c if (!stm32_pctrl_is_function_valid(pctl, pin, func)) { pctl 568 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "invalid function.\n"); pctl 573 drivers/pinctrl/stm32/pinctrl-stm32.c grp = stm32_pctrl_find_group_by_pin(pctl, pin); pctl 575 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "unable to match pin %d to group\n", pctl 581 drivers/pinctrl/stm32/pinctrl-stm32.c err = stm32_pctrl_dt_node_to_map_func(pctl, pin, func, grp, map, pctl 628 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 630 drivers/pinctrl/stm32/pinctrl-stm32.c return pctl->ngroups; pctl 636 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 638 drivers/pinctrl/stm32/pinctrl-stm32.c return pctl->groups[group].name; pctl 646 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 648 drivers/pinctrl/stm32/pinctrl-stm32.c *pins = (unsigned *)&pctl->groups[group].pin; pctl 681 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 683 drivers/pinctrl/stm32/pinctrl-stm32.c *groups = pctl->grp_names; pctl 684 drivers/pinctrl/stm32/pinctrl-stm32.c *num_groups = pctl->ngroups; pctl 692 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); pctl 702 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 703 drivers/pinctrl/stm32/pinctrl-stm32.c err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); pctl 706 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "Can't get hwspinlock\n"); pctl 720 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 721 drivers/pinctrl/stm32/pinctrl-stm32.c hwspin_unlock(pctl->hwlock); pctl 760 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 761 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl_group *g = pctl->groups + group; pctl 767 drivers/pinctrl/stm32/pinctrl-stm32.c ret = stm32_pctrl_is_function_valid(pctl, g->pin, function); pctl 769 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "invalid function %d on group %d .\n", pctl 776 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "No gpio range defined.\n"); pctl 813 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); pctl 821 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 822 drivers/pinctrl/stm32/pinctrl-stm32.c err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); pctl 825 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "Can't get hwspinlock\n"); pctl 834 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 835 drivers/pinctrl/stm32/pinctrl-stm32.c hwspin_unlock(pctl->hwlock); pctl 867 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); pctl 875 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 876 drivers/pinctrl/stm32/pinctrl-stm32.c err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); pctl 879 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "Can't get hwspinlock\n"); pctl 888 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 889 drivers/pinctrl/stm32/pinctrl-stm32.c hwspin_unlock(pctl->hwlock); pctl 921 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = dev_get_drvdata(bank->gpio_chip.parent); pctl 929 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 930 drivers/pinctrl/stm32/pinctrl-stm32.c err = hwspin_lock_timeout(pctl->hwlock, HWSPINLOCK_TIMEOUT); pctl 933 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "Can't get hwspinlock\n"); pctl 942 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->hwlock) pctl 943 drivers/pinctrl/stm32/pinctrl-stm32.c hwspin_unlock(pctl->hwlock); pctl 998 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1005 drivers/pinctrl/stm32/pinctrl-stm32.c dev_err(pctl->dev, "No gpio range defined.\n"); pctl 1046 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1048 drivers/pinctrl/stm32/pinctrl-stm32.c *config = pctl->groups[group].config; pctl 1056 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 1057 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl_group *g = &pctl->groups[group]; pctl 1145 drivers/pinctrl/stm32/pinctrl-stm32.c static int stm32_gpiolib_register_bank(struct stm32_pinctrl *pctl, pctl 1148 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_gpio_bank *bank = &pctl->banks[pctl->nbanks]; pctl 1152 drivers/pinctrl/stm32/pinctrl-stm32.c struct device *dev = pctl->dev; pctl 1189 drivers/pinctrl/stm32/pinctrl-stm32.c bank_nr = pctl->nbanks; pctl 1197 drivers/pinctrl/stm32/pinctrl-stm32.c pinctrl_add_gpio_range(pctl->pctl_dev, pctl 1198 drivers/pinctrl/stm32/pinctrl-stm32.c &pctl->banks[bank_nr].range); pctl 1216 drivers/pinctrl/stm32/pinctrl-stm32.c bank->domain = irq_domain_create_hierarchy(pctl->domain, 0, pctl 1254 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl) pctl 1262 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->regmap = syscon_regmap_lookup_by_phandle(np, "st,syscfg"); pctl 1263 drivers/pinctrl/stm32/pinctrl-stm32.c if (IS_ERR(pctl->regmap)) pctl 1264 drivers/pinctrl/stm32/pinctrl-stm32.c return PTR_ERR(pctl->regmap); pctl 1266 drivers/pinctrl/stm32/pinctrl-stm32.c rm = pctl->regmap; pctl 1288 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->irqmux[i] = devm_regmap_field_alloc(dev, rm, mux); pctl 1289 drivers/pinctrl/stm32/pinctrl-stm32.c if (IS_ERR(pctl->irqmux[i])) pctl 1290 drivers/pinctrl/stm32/pinctrl-stm32.c return PTR_ERR(pctl->irqmux[i]); pctl 1298 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = platform_get_drvdata(pdev); pctl 1301 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->ngroups = pctl->npins; pctl 1304 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->groups = devm_kcalloc(&pdev->dev, pctl->ngroups, pctl 1305 drivers/pinctrl/stm32/pinctrl-stm32.c sizeof(*pctl->groups), GFP_KERNEL); pctl 1306 drivers/pinctrl/stm32/pinctrl-stm32.c if (!pctl->groups) pctl 1310 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->grp_names = devm_kcalloc(&pdev->dev, pctl->ngroups, pctl 1311 drivers/pinctrl/stm32/pinctrl-stm32.c sizeof(*pctl->grp_names), GFP_KERNEL); pctl 1312 drivers/pinctrl/stm32/pinctrl-stm32.c if (!pctl->grp_names) pctl 1315 drivers/pinctrl/stm32/pinctrl-stm32.c for (i = 0; i < pctl->npins; i++) { pctl 1316 drivers/pinctrl/stm32/pinctrl-stm32.c const struct stm32_desc_pin *pin = pctl->pins + i; pctl 1317 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl_group *group = pctl->groups + i; pctl 1321 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->grp_names[i] = pin->pin.name; pctl 1327 drivers/pinctrl/stm32/pinctrl-stm32.c static int stm32_pctrl_create_pins_tab(struct stm32_pinctrl *pctl, pctl 1333 drivers/pinctrl/stm32/pinctrl-stm32.c for (i = 0; i < pctl->match_data->npins; i++) { pctl 1334 drivers/pinctrl/stm32/pinctrl-stm32.c p = pctl->match_data->pins + i; pctl 1335 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->pkg && !(pctl->pkg & p->pkg)) pctl 1343 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->npins = nb_pins_available; pctl 1349 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl) pctl 1351 drivers/pinctrl/stm32/pinctrl-stm32.c if (of_property_read_u32(np, "st,package", &pctl->pkg)) { pctl 1352 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pkg = 0; pctl 1353 drivers/pinctrl/stm32/pinctrl-stm32.c dev_warn(pctl->dev, "No package detected, use default one\n"); pctl 1355 drivers/pinctrl/stm32/pinctrl-stm32.c dev_dbg(pctl->dev, "package detected: %x\n", pctl->pkg); pctl 1365 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl; pctl 1381 drivers/pinctrl/stm32/pinctrl-stm32.c pctl = devm_kzalloc(dev, sizeof(*pctl), GFP_KERNEL); pctl 1382 drivers/pinctrl/stm32/pinctrl-stm32.c if (!pctl) pctl 1385 drivers/pinctrl/stm32/pinctrl-stm32.c platform_set_drvdata(pdev, pctl); pctl 1388 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->domain = stm32_pctrl_get_irq_domain(np); pctl 1389 drivers/pinctrl/stm32/pinctrl-stm32.c if (IS_ERR(pctl->domain)) pctl 1390 drivers/pinctrl/stm32/pinctrl-stm32.c return PTR_ERR(pctl->domain); pctl 1398 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->hwlock = hwspin_lock_request_specific(hwlock_id); pctl 1401 drivers/pinctrl/stm32/pinctrl-stm32.c spin_lock_init(&pctl->irqmux_lock); pctl 1403 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->dev = dev; pctl 1404 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->match_data = match->data; pctl 1407 drivers/pinctrl/stm32/pinctrl-stm32.c stm32_pctl_get_package(np, pctl); pctl 1409 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pins = devm_kcalloc(pctl->dev, pctl->match_data->npins, pctl 1410 drivers/pinctrl/stm32/pinctrl-stm32.c sizeof(*pctl->pins), GFP_KERNEL); pctl 1411 drivers/pinctrl/stm32/pinctrl-stm32.c if (!pctl->pins) pctl 1414 drivers/pinctrl/stm32/pinctrl-stm32.c ret = stm32_pctrl_create_pins_tab(pctl, pctl->pins); pctl 1424 drivers/pinctrl/stm32/pinctrl-stm32.c if (pctl->domain) { pctl 1425 drivers/pinctrl/stm32/pinctrl-stm32.c ret = stm32_pctrl_dt_setup_irq(pdev, pctl); pctl 1430 drivers/pinctrl/stm32/pinctrl-stm32.c pins = devm_kcalloc(&pdev->dev, pctl->npins, sizeof(*pins), pctl 1435 drivers/pinctrl/stm32/pinctrl-stm32.c for (i = 0; i < pctl->npins; i++) pctl 1436 drivers/pinctrl/stm32/pinctrl-stm32.c pins[i] = pctl->pins[i].pin; pctl 1438 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pctl_desc.name = dev_name(&pdev->dev); pctl 1439 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pctl_desc.owner = THIS_MODULE; pctl 1440 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pctl_desc.pins = pins; pctl 1441 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pctl_desc.npins = pctl->npins; pctl 1442 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pctl_desc.link_consumers = true; pctl 1443 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pctl_desc.confops = &stm32_pconf_ops; pctl 1444 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pctl_desc.pctlops = &stm32_pctrl_ops; pctl 1445 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pctl_desc.pmxops = &stm32_pmx_ops; pctl 1446 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->dev = &pdev->dev; pctl 1448 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, &pctl->pctl_desc, pctl 1449 drivers/pinctrl/stm32/pinctrl-stm32.c pctl); pctl 1451 drivers/pinctrl/stm32/pinctrl-stm32.c if (IS_ERR(pctl->pctl_dev)) { pctl 1453 drivers/pinctrl/stm32/pinctrl-stm32.c return PTR_ERR(pctl->pctl_dev); pctl 1464 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->banks = devm_kcalloc(dev, banks, sizeof(*pctl->banks), pctl 1466 drivers/pinctrl/stm32/pinctrl-stm32.c if (!pctl->banks) pctl 1471 drivers/pinctrl/stm32/pinctrl-stm32.c ret = stm32_gpiolib_register_bank(pctl, child); pctl 1477 drivers/pinctrl/stm32/pinctrl-stm32.c pctl->nbanks++; pctl 1487 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl, u32 pin) pctl 1489 drivers/pinctrl/stm32/pinctrl-stm32.c const struct pin_desc *desc = pin_desc_get(pctl->pctl_dev, pin); pctl 1496 drivers/pinctrl/stm32/pinctrl-stm32.c range = pinctrl_find_gpio_range_from_pin(pctl->pctl_dev, pin); pctl 1541 drivers/pinctrl/stm32/pinctrl-stm32.c regmap_field_write(pctl->irqmux[offset], bank->bank_ioport_nr); pctl 1548 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl *pctl = dev_get_drvdata(dev); pctl 1549 drivers/pinctrl/stm32/pinctrl-stm32.c struct stm32_pinctrl_group *g = pctl->groups; pctl 1552 drivers/pinctrl/stm32/pinctrl-stm32.c for (i = g->pin; i < g->pin + pctl->ngroups; i++) pctl 1553 drivers/pinctrl/stm32/pinctrl-stm32.c stm32_pinctrl_restore_gpio_regs(pctl, i); pctl 42 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pinctrl_find_group_by_name(struct sunxi_pinctrl *pctl, const char *group) pctl 46 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->ngroups; i++) { pctl 47 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl_group *grp = pctl->groups + i; pctl 57 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pinctrl_find_function_by_name(struct sunxi_pinctrl *pctl, pctl 60 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl_function *func = pctl->functions; pctl 63 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->nfunctions; i++) { pctl 75 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pinctrl_desc_find_function_by_name(struct sunxi_pinctrl *pctl, pctl 81 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->desc->npins; i++) { pctl 82 drivers/pinctrl/sunxi/pinctrl-sunxi.c const struct sunxi_desc_pin *pin = pctl->desc->pins + i; pctl 90 drivers/pinctrl/sunxi/pinctrl-sunxi.c func->variant & pctl->variant)) pctl 102 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pinctrl_desc_find_function_by_pin(struct sunxi_pinctrl *pctl, pctl 108 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->desc->npins; i++) { pctl 109 drivers/pinctrl/sunxi/pinctrl-sunxi.c const struct sunxi_desc_pin *pin = pctl->desc->pins + i; pctl 128 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 130 drivers/pinctrl/sunxi/pinctrl-sunxi.c return pctl->ngroups; pctl 136 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 138 drivers/pinctrl/sunxi/pinctrl-sunxi.c return pctl->groups[group].name; pctl 146 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 148 drivers/pinctrl/sunxi/pinctrl-sunxi.c *pins = (unsigned *)&pctl->groups[group].pin; pctl 324 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 336 drivers/pinctrl/sunxi/pinctrl-sunxi.c dev_err(pctl->dev, "missing function property in node %pOFn\n", pctl 343 drivers/pinctrl/sunxi/pinctrl-sunxi.c dev_err(pctl->dev, "missing pins property in node %pOFn\n", pctl 368 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pinctrl_find_group_by_name(pctl, group); pctl 371 drivers/pinctrl/sunxi/pinctrl-sunxi.c dev_err(pctl->dev, "unknown pin %s", group); pctl 375 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (!sunxi_pinctrl_desc_find_function_by_name(pctl, pctl 378 drivers/pinctrl/sunxi/pinctrl-sunxi.c dev_err(pctl->dev, "unsupported function %s on pin %s", pctl 474 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 480 drivers/pinctrl/sunxi/pinctrl-sunxi.c pin -= pctl->desc->pin_base; pctl 486 drivers/pinctrl/sunxi/pinctrl-sunxi.c val = (readl(pctl->membase + offset) >> shift) & mask; pctl 526 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 527 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl_group *g = &pctl->groups[group]; pctl 536 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 585 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_lock_irqsave(&pctl->lock, flags); pctl 586 drivers/pinctrl/sunxi/pinctrl-sunxi.c reg = readl(pctl->membase + offset); pctl 588 drivers/pinctrl/sunxi/pinctrl-sunxi.c writel(reg | val << shift, pctl->membase + offset); pctl 589 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_unlock_irqrestore(&pctl->lock, flags); pctl 598 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 599 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl_group *g = &pctl->groups[group]; pctl 613 drivers/pinctrl/sunxi/pinctrl-sunxi.c static int sunxi_pinctrl_set_io_bias_cfg(struct sunxi_pinctrl *pctl, pctl 622 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (!pctl->desc->io_bias_cfg_variant) pctl 633 drivers/pinctrl/sunxi/pinctrl-sunxi.c switch (pctl->desc->io_bias_cfg_variant) { pctl 650 drivers/pinctrl/sunxi/pinctrl-sunxi.c pin -= pctl->desc->pin_base; pctl 652 drivers/pinctrl/sunxi/pinctrl-sunxi.c reg = readl(pctl->membase + sunxi_grp_config_reg(pin)); pctl 654 drivers/pinctrl/sunxi/pinctrl-sunxi.c writel(reg | val, pctl->membase + sunxi_grp_config_reg(pin)); pctl 659 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_lock_irqsave(&pctl->lock, flags); pctl 660 drivers/pinctrl/sunxi/pinctrl-sunxi.c reg = readl(pctl->membase + PIO_POW_MOD_SEL_REG); pctl 662 drivers/pinctrl/sunxi/pinctrl-sunxi.c writel(reg | val << bank, pctl->membase + PIO_POW_MOD_SEL_REG); pctl 663 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_unlock_irqrestore(&pctl->lock, flags); pctl 672 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 674 drivers/pinctrl/sunxi/pinctrl-sunxi.c return pctl->nfunctions; pctl 680 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 682 drivers/pinctrl/sunxi/pinctrl-sunxi.c return pctl->functions[function].name; pctl 690 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 692 drivers/pinctrl/sunxi/pinctrl-sunxi.c *groups = pctl->functions[function].groups; pctl 693 drivers/pinctrl/sunxi/pinctrl-sunxi.c *num_groups = pctl->functions[function].ngroups; pctl 702 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 706 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_lock_irqsave(&pctl->lock, flags); pctl 708 drivers/pinctrl/sunxi/pinctrl-sunxi.c pin -= pctl->desc->pin_base; pctl 709 drivers/pinctrl/sunxi/pinctrl-sunxi.c val = readl(pctl->membase + sunxi_mux_reg(pin)); pctl 712 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->membase + sunxi_mux_reg(pin)); pctl 714 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_unlock_irqrestore(&pctl->lock, flags); pctl 721 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 722 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl_group *g = pctl->groups + group; pctl 723 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl_function *func = pctl->functions + function; pctl 725 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pinctrl_desc_find_function_by_name(pctl, pctl 743 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 752 drivers/pinctrl/sunxi/pinctrl-sunxi.c desc = sunxi_pinctrl_desc_find_function_by_pin(pctl, offset, func); pctl 763 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 765 drivers/pinctrl/sunxi/pinctrl-sunxi.c unsigned short bank_offset = bank - pctl->desc->pin_base / pctl 767 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl_regulator *s_reg = &pctl->regulators[bank_offset]; pctl 778 drivers/pinctrl/sunxi/pinctrl-sunxi.c reg = regulator_get(pctl->dev, supply); pctl 780 drivers/pinctrl/sunxi/pinctrl-sunxi.c dev_err(pctl->dev, "Couldn't get bank P%c regulator\n", pctl 787 drivers/pinctrl/sunxi/pinctrl-sunxi.c dev_err(pctl->dev, pctl 792 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pinctrl_set_io_bias_cfg(pctl, offset, reg); pctl 807 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = pinctrl_dev_get_drvdata(pctldev); pctl 809 drivers/pinctrl/sunxi/pinctrl-sunxi.c unsigned short bank_offset = bank - pctl->desc->pin_base / pctl 811 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl_regulator *s_reg = &pctl->regulators[bank_offset]; pctl 842 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = gpiochip_get_data(chip); pctl 845 drivers/pinctrl/sunxi/pinctrl-sunxi.c bool set_mux = pctl->desc->irq_read_needs_mux && pctl 851 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pmx_set(pctl->pctl_dev, pin, SUN4I_FUNC_INPUT); pctl 853 drivers/pinctrl/sunxi/pinctrl-sunxi.c val = (readl(pctl->membase + reg) >> index) & DATA_PINS_MASK; pctl 856 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pmx_set(pctl->pctl_dev, pin, SUN4I_FUNC_IRQ); pctl 864 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = gpiochip_get_data(chip); pctl 870 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_lock_irqsave(&pctl->lock, flags); pctl 872 drivers/pinctrl/sunxi/pinctrl-sunxi.c regval = readl(pctl->membase + reg); pctl 879 drivers/pinctrl/sunxi/pinctrl-sunxi.c writel(regval, pctl->membase + reg); pctl 881 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_unlock_irqrestore(&pctl->lock, flags); pctl 911 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = gpiochip_get_data(chip); pctl 913 drivers/pinctrl/sunxi/pinctrl-sunxi.c unsigned pinnum = pctl->desc->pin_base + offset; pctl 919 drivers/pinctrl/sunxi/pinctrl-sunxi.c desc = sunxi_pinctrl_desc_find_function_by_pin(pctl, pinnum, "irq"); pctl 928 drivers/pinctrl/sunxi/pinctrl-sunxi.c return irq_find_mapping(pctl->domain, irqnum); pctl 933 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = irq_data_get_irq_chip_data(d); pctl 937 drivers/pinctrl/sunxi/pinctrl-sunxi.c func = sunxi_pinctrl_desc_find_function_by_pin(pctl, pctl 938 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->irq_array[d->hwirq], "irq"); pctl 942 drivers/pinctrl/sunxi/pinctrl-sunxi.c ret = gpiochip_lock_as_irq(pctl->chip, pctl 943 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->irq_array[d->hwirq] - pctl->desc->pin_base); pctl 945 drivers/pinctrl/sunxi/pinctrl-sunxi.c dev_err(pctl->dev, "unable to lock HW IRQ %lu for IRQ\n", pctl 951 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pmx_set(pctl->pctl_dev, pctl->irq_array[d->hwirq], func->muxval); pctl 958 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = irq_data_get_irq_chip_data(d); pctl 960 drivers/pinctrl/sunxi/pinctrl-sunxi.c gpiochip_unlock_as_irq(pctl->chip, pctl 961 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->irq_array[d->hwirq] - pctl->desc->pin_base); pctl 966 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = irq_data_get_irq_chip_data(d); pctl 967 drivers/pinctrl/sunxi/pinctrl-sunxi.c u32 reg = sunxi_irq_cfg_reg(pctl->desc, d->hwirq); pctl 993 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_lock_irqsave(&pctl->lock, flags); pctl 1002 drivers/pinctrl/sunxi/pinctrl-sunxi.c regval = readl(pctl->membase + reg); pctl 1004 drivers/pinctrl/sunxi/pinctrl-sunxi.c writel(regval | (mode << index), pctl->membase + reg); pctl 1006 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_unlock_irqrestore(&pctl->lock, flags); pctl 1013 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = irq_data_get_irq_chip_data(d); pctl 1014 drivers/pinctrl/sunxi/pinctrl-sunxi.c u32 status_reg = sunxi_irq_status_reg(pctl->desc, d->hwirq); pctl 1018 drivers/pinctrl/sunxi/pinctrl-sunxi.c writel(1 << status_idx, pctl->membase + status_reg); pctl 1023 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = irq_data_get_irq_chip_data(d); pctl 1024 drivers/pinctrl/sunxi/pinctrl-sunxi.c u32 reg = sunxi_irq_ctrl_reg(pctl->desc, d->hwirq); pctl 1029 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_lock_irqsave(&pctl->lock, flags); pctl 1032 drivers/pinctrl/sunxi/pinctrl-sunxi.c val = readl(pctl->membase + reg); pctl 1033 drivers/pinctrl/sunxi/pinctrl-sunxi.c writel(val & ~(1 << idx), pctl->membase + reg); pctl 1035 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_unlock_irqrestore(&pctl->lock, flags); pctl 1040 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = irq_data_get_irq_chip_data(d); pctl 1041 drivers/pinctrl/sunxi/pinctrl-sunxi.c u32 reg = sunxi_irq_ctrl_reg(pctl->desc, d->hwirq); pctl 1046 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_lock_irqsave(&pctl->lock, flags); pctl 1049 drivers/pinctrl/sunxi/pinctrl-sunxi.c val = readl(pctl->membase + reg); pctl 1050 drivers/pinctrl/sunxi/pinctrl-sunxi.c writel(val | (1 << idx), pctl->membase + reg); pctl 1052 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_unlock_irqrestore(&pctl->lock, flags); pctl 1095 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = d->host_data; pctl 1103 drivers/pinctrl/sunxi/pinctrl-sunxi.c pin = pctl->desc->pin_base + base + intspec[1]; pctl 1105 drivers/pinctrl/sunxi/pinctrl-sunxi.c desc = sunxi_pinctrl_desc_find_function_by_pin(pctl, pin, "irq"); pctl 1123 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = irq_desc_get_handler_data(desc); pctl 1126 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (bank = 0; bank < pctl->desc->irq_banks; bank++) pctl 1127 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (irq == pctl->irq[bank]) pctl 1130 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (bank == pctl->desc->irq_banks) pctl 1133 drivers/pinctrl/sunxi/pinctrl-sunxi.c reg = sunxi_irq_status_reg_from_bank(pctl->desc, bank); pctl 1134 drivers/pinctrl/sunxi/pinctrl-sunxi.c val = readl(pctl->membase + reg); pctl 1141 drivers/pinctrl/sunxi/pinctrl-sunxi.c int pin_irq = irq_find_mapping(pctl->domain, pctl 1149 drivers/pinctrl/sunxi/pinctrl-sunxi.c static int sunxi_pinctrl_add_function(struct sunxi_pinctrl *pctl, pctl 1152 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl_function *func = pctl->functions; pctl 1166 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->nfunctions++; pctl 1173 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl = platform_get_drvdata(pdev); pctl 1188 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->groups = devm_kcalloc(&pdev->dev, pctl 1189 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->desc->npins, sizeof(*pctl->groups), pctl 1191 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (!pctl->groups) pctl 1194 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->desc->npins; i++) { pctl 1195 drivers/pinctrl/sunxi/pinctrl-sunxi.c const struct sunxi_desc_pin *pin = pctl->desc->pins + i; pctl 1196 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl_group *group = pctl->groups + pctl->ngroups; pctl 1198 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (pin->variant && !(pctl->variant & pin->variant)) pctl 1205 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->ngroups++; pctl 1212 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->functions = kcalloc(pctl->ngroups, pctl 1213 drivers/pinctrl/sunxi/pinctrl-sunxi.c sizeof(*pctl->functions), pctl 1215 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (!pctl->functions) pctl 1219 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->desc->npins; i++) { pctl 1220 drivers/pinctrl/sunxi/pinctrl-sunxi.c const struct sunxi_desc_pin *pin = pctl->desc->pins + i; pctl 1223 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (pin->variant && !(pctl->variant & pin->variant)) pctl 1227 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (func->variant && !(pctl->variant & func->variant)) pctl 1233 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->irq_array[irqnum] = pin->pin.number; pctl 1236 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pinctrl_add_function(pctl, func->name); pctl 1241 drivers/pinctrl/sunxi/pinctrl-sunxi.c ptr = krealloc(pctl->functions, pctl 1242 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->nfunctions * sizeof(*pctl->functions), pctl 1245 drivers/pinctrl/sunxi/pinctrl-sunxi.c kfree(pctl->functions); pctl 1246 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->functions = NULL; pctl 1249 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->functions = ptr; pctl 1251 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->desc->npins; i++) { pctl 1252 drivers/pinctrl/sunxi/pinctrl-sunxi.c const struct sunxi_desc_pin *pin = pctl->desc->pins + i; pctl 1255 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (pin->variant && !(pctl->variant & pin->variant)) pctl 1262 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (func->variant && !(pctl->variant & func->variant)) pctl 1265 drivers/pinctrl/sunxi/pinctrl-sunxi.c func_item = sunxi_pinctrl_find_function_by_name(pctl, pctl 1268 drivers/pinctrl/sunxi/pinctrl-sunxi.c kfree(pctl->functions); pctl 1279 drivers/pinctrl/sunxi/pinctrl-sunxi.c kfree(pctl->functions); pctl 1317 drivers/pinctrl/sunxi/pinctrl-sunxi.c static int sunxi_pinctrl_setup_debounce(struct sunxi_pinctrl *pctl, pctl 1334 drivers/pinctrl/sunxi/pinctrl-sunxi.c losc = devm_clk_get(pctl->dev, "losc"); pctl 1338 drivers/pinctrl/sunxi/pinctrl-sunxi.c hosc = devm_clk_get(pctl->dev, "hosc"); pctl 1342 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->desc->irq_banks; i++) { pctl 1372 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->membase + pctl 1373 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_irq_debounce_reg_from_bank(pctl->desc, i)); pctl 1386 drivers/pinctrl/sunxi/pinctrl-sunxi.c struct sunxi_pinctrl *pctl; pctl 1392 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl = devm_kzalloc(&pdev->dev, sizeof(*pctl), GFP_KERNEL); pctl 1393 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (!pctl) pctl 1395 drivers/pinctrl/sunxi/pinctrl-sunxi.c platform_set_drvdata(pdev, pctl); pctl 1397 drivers/pinctrl/sunxi/pinctrl-sunxi.c raw_spin_lock_init(&pctl->lock); pctl 1400 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->membase = devm_ioremap_resource(&pdev->dev, res); pctl 1401 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (IS_ERR(pctl->membase)) pctl 1402 drivers/pinctrl/sunxi/pinctrl-sunxi.c return PTR_ERR(pctl->membase); pctl 1404 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->dev = &pdev->dev; pctl 1405 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->desc = desc; pctl 1406 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->variant = variant; pctl 1408 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->irq_array = devm_kcalloc(&pdev->dev, pctl 1409 drivers/pinctrl/sunxi/pinctrl-sunxi.c IRQ_PER_BANK * pctl->desc->irq_banks, pctl 1410 drivers/pinctrl/sunxi/pinctrl-sunxi.c sizeof(*pctl->irq_array), pctl 1412 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (!pctl->irq_array) pctl 1422 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->desc->npins, sizeof(*pins), pctl 1427 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0, pin_idx = 0; i < pctl->desc->npins; i++) { pctl 1428 drivers/pinctrl/sunxi/pinctrl-sunxi.c const struct sunxi_desc_pin *pin = pctl->desc->pins + i; pctl 1430 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (pin->variant && !(pctl->variant & pin->variant)) pctl 1445 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctrl_desc->npins = pctl->ngroups; pctl 1459 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->pctl_dev = devm_pinctrl_register(&pdev->dev, pctrl_desc, pctl); pctl 1460 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (IS_ERR(pctl->pctl_dev)) { pctl 1462 drivers/pinctrl/sunxi/pinctrl-sunxi.c return PTR_ERR(pctl->pctl_dev); pctl 1465 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip = devm_kzalloc(&pdev->dev, sizeof(*pctl->chip), GFP_KERNEL); pctl 1466 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (!pctl->chip) pctl 1469 drivers/pinctrl/sunxi/pinctrl-sunxi.c last_pin = pctl->desc->pins[pctl->desc->npins - 1].pin.number; pctl 1470 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->owner = THIS_MODULE; pctl 1471 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->request = gpiochip_generic_request; pctl 1472 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->free = gpiochip_generic_free; pctl 1473 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->set_config = gpiochip_generic_config; pctl 1474 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->direction_input = sunxi_pinctrl_gpio_direction_input; pctl 1475 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->direction_output = sunxi_pinctrl_gpio_direction_output; pctl 1476 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->get = sunxi_pinctrl_gpio_get; pctl 1477 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->set = sunxi_pinctrl_gpio_set; pctl 1478 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->of_xlate = sunxi_pinctrl_gpio_of_xlate; pctl 1479 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->to_irq = sunxi_pinctrl_gpio_to_irq; pctl 1480 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->of_gpio_n_cells = 3; pctl 1481 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->can_sleep = false; pctl 1482 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->ngpio = round_up(last_pin, PINS_PER_BANK) - pctl 1483 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->desc->pin_base; pctl 1484 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->label = dev_name(&pdev->dev); pctl 1485 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->parent = &pdev->dev; pctl 1486 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->chip->base = pctl->desc->pin_base; pctl 1488 drivers/pinctrl/sunxi/pinctrl-sunxi.c ret = gpiochip_add_data(pctl->chip, pctl); pctl 1492 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->desc->npins; i++) { pctl 1493 drivers/pinctrl/sunxi/pinctrl-sunxi.c const struct sunxi_desc_pin *pin = pctl->desc->pins + i; pctl 1495 drivers/pinctrl/sunxi/pinctrl-sunxi.c ret = gpiochip_add_pin_range(pctl->chip, dev_name(&pdev->dev), pctl 1496 drivers/pinctrl/sunxi/pinctrl-sunxi.c pin->pin.number - pctl->desc->pin_base, pctl 1513 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->irq = devm_kcalloc(&pdev->dev, pctl 1514 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->desc->irq_banks, pctl 1515 drivers/pinctrl/sunxi/pinctrl-sunxi.c sizeof(*pctl->irq), pctl 1517 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (!pctl->irq) { pctl 1522 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->desc->irq_banks; i++) { pctl 1523 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->irq[i] = platform_get_irq(pdev, i); pctl 1524 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (pctl->irq[i] < 0) { pctl 1525 drivers/pinctrl/sunxi/pinctrl-sunxi.c ret = pctl->irq[i]; pctl 1530 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->domain = irq_domain_add_linear(node, pctl 1531 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->desc->irq_banks * IRQ_PER_BANK, pctl 1533 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl); pctl 1534 drivers/pinctrl/sunxi/pinctrl-sunxi.c if (!pctl->domain) { pctl 1540 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < (pctl->desc->irq_banks * IRQ_PER_BANK); i++) { pctl 1541 drivers/pinctrl/sunxi/pinctrl-sunxi.c int irqno = irq_create_mapping(pctl->domain, i); pctl 1545 drivers/pinctrl/sunxi/pinctrl-sunxi.c irq_set_chip_data(irqno, pctl); pctl 1548 drivers/pinctrl/sunxi/pinctrl-sunxi.c for (i = 0; i < pctl->desc->irq_banks; i++) { pctl 1550 drivers/pinctrl/sunxi/pinctrl-sunxi.c writel(0, pctl->membase + pctl 1551 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_irq_ctrl_reg_from_bank(pctl->desc, i)); pctl 1553 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl->membase + pctl 1554 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_irq_status_reg_from_bank(pctl->desc, i)); pctl 1556 drivers/pinctrl/sunxi/pinctrl-sunxi.c irq_set_chained_handler_and_data(pctl->irq[i], pctl 1558 drivers/pinctrl/sunxi/pinctrl-sunxi.c pctl); pctl 1561 drivers/pinctrl/sunxi/pinctrl-sunxi.c sunxi_pinctrl_setup_debounce(pctl, node); pctl 1570 drivers/pinctrl/sunxi/pinctrl-sunxi.c gpiochip_remove(pctl->chip); pctl 662 drivers/pinctrl/tegra/pinctrl-tegra.c return pinctrl_force_sleep(pmx->pctl); pctl 790 drivers/pinctrl/tegra/pinctrl-tegra.c pmx->pctl = devm_pinctrl_register(&pdev->dev, &tegra_pinctrl_desc, pmx); pctl 791 drivers/pinctrl/tegra/pinctrl-tegra.c if (IS_ERR(pmx->pctl)) { pctl 793 drivers/pinctrl/tegra/pinctrl-tegra.c return PTR_ERR(pmx->pctl); pctl 799 drivers/pinctrl/tegra/pinctrl-tegra.c pinctrl_add_gpio_range(pmx->pctl, &tegra_pinctrl_gpio_range); pctl 13 drivers/pinctrl/tegra/pinctrl-tegra.h struct pinctrl_dev *pctl; pctl 150 drivers/pinctrl/ti/pinctrl-ti-iodelay.c struct pinctrl_dev *pctl; pctl 380 drivers/pinctrl/ti/pinctrl-ti-iodelay.c g = pinctrl_generic_get_group(iod->pctl, selector); pctl 541 drivers/pinctrl/ti/pinctrl-ti-iodelay.c error = pinctrl_generic_add_group(iod->pctl, np->name, pins, i, g); pctl 884 drivers/pinctrl/ti/pinctrl-ti-iodelay.c ret = pinctrl_register_and_init(&iod->desc, dev, iod, &iod->pctl); pctl 892 drivers/pinctrl/ti/pinctrl-ti-iodelay.c return pinctrl_enable(iod->pctl); pctl 912 drivers/pinctrl/ti/pinctrl-ti-iodelay.c if (iod->pctl) pctl 913 drivers/pinctrl/ti/pinctrl-ti-iodelay.c pinctrl_unregister(iod->pctl); pctl 1638 drivers/soc/tegra/pmc.c static const char *tegra_io_pad_pinctrl_get_group_name(struct pinctrl_dev *pctl, pctl 1641 drivers/soc/tegra/pmc.c struct tegra_pmc *pmc = pinctrl_dev_get_drvdata(pctl); pctl 797 drivers/usb/chipidea/core.c platdata->pctl = devm_pinctrl_get(dev); pctl 798 drivers/usb/chipidea/core.c if (!IS_ERR(platdata->pctl)) { pctl 801 drivers/usb/chipidea/core.c p = pinctrl_lookup_state(platdata->pctl, "default"); pctl 805 drivers/usb/chipidea/core.c p = pinctrl_lookup_state(platdata->pctl, "host"); pctl 809 drivers/usb/chipidea/core.c p = pinctrl_lookup_state(platdata->pctl, "device"); pctl 160 drivers/usb/chipidea/host.c pinctrl_select_state(ci->platdata->pctl, pctl 214 drivers/usb/chipidea/host.c pinctrl_select_state(ci->platdata->pctl, pctl 2005 drivers/usb/chipidea/udc.c pinctrl_select_state(ci->platdata->pctl, pctl 2028 drivers/usb/chipidea/udc.c pinctrl_select_state(ci->platdata->pctl, pctl 599 fs/xfs/xfs_iwalk.c struct xfs_pwork_ctl pctl; pctl 608 fs/xfs/xfs_iwalk.c error = xfs_pwork_init(mp, &pctl, xfs_iwalk_ag_work, "xfs_iwalk", pctl 616 fs/xfs/xfs_iwalk.c if (xfs_pwork_ctl_want_abort(&pctl)) pctl 625 fs/xfs/xfs_iwalk.c xfs_pwork_queue(&pctl, &iwag->pwork); pctl 632 fs/xfs/xfs_iwalk.c xfs_pwork_poll(&pctl); pctl 633 fs/xfs/xfs_iwalk.c return xfs_pwork_destroy(&pctl); pctl 42 fs/xfs/xfs_pwork.c struct xfs_pwork_ctl *pctl; pctl 46 fs/xfs/xfs_pwork.c pctl = pwork->pctl; pctl 47 fs/xfs/xfs_pwork.c error = pctl->work_fn(pctl->mp, pwork); pctl 48 fs/xfs/xfs_pwork.c if (error && !pctl->error) pctl 49 fs/xfs/xfs_pwork.c pctl->error = error; pctl 50 fs/xfs/xfs_pwork.c if (atomic_dec_and_test(&pctl->nr_work)) pctl 51 fs/xfs/xfs_pwork.c wake_up(&pctl->poll_wait); pctl 62 fs/xfs/xfs_pwork.c struct xfs_pwork_ctl *pctl, pctl 73 fs/xfs/xfs_pwork.c pctl->wq = alloc_workqueue("%s-%d", WQ_FREEZABLE, nr_threads, tag, pctl 75 fs/xfs/xfs_pwork.c if (!pctl->wq) pctl 77 fs/xfs/xfs_pwork.c pctl->work_fn = work_fn; pctl 78 fs/xfs/xfs_pwork.c pctl->error = 0; pctl 79 fs/xfs/xfs_pwork.c pctl->mp = mp; pctl 80 fs/xfs/xfs_pwork.c atomic_set(&pctl->nr_work, 0); pctl 81 fs/xfs/xfs_pwork.c init_waitqueue_head(&pctl->poll_wait); pctl 89 fs/xfs/xfs_pwork.c struct xfs_pwork_ctl *pctl, pctl 93 fs/xfs/xfs_pwork.c pwork->pctl = pctl; pctl 94 fs/xfs/xfs_pwork.c atomic_inc(&pctl->nr_work); pctl 95 fs/xfs/xfs_pwork.c queue_work(pctl->wq, &pwork->work); pctl 101 fs/xfs/xfs_pwork.c struct xfs_pwork_ctl *pctl) pctl 103 fs/xfs/xfs_pwork.c destroy_workqueue(pctl->wq); pctl 104 fs/xfs/xfs_pwork.c pctl->wq = NULL; pctl 105 fs/xfs/xfs_pwork.c return pctl->error; pctl 114 fs/xfs/xfs_pwork.c struct xfs_pwork_ctl *pctl) pctl 116 fs/xfs/xfs_pwork.c while (wait_event_timeout(pctl->poll_wait, pctl 117 fs/xfs/xfs_pwork.c atomic_read(&pctl->nr_work) == 0, HZ) == 0) pctl 32 fs/xfs/xfs_pwork.h struct xfs_pwork_ctl *pctl; pctl 35 fs/xfs/xfs_pwork.h #define XFS_PWORK_SINGLE_THREADED { .pctl = NULL } pctl 40 fs/xfs/xfs_pwork.h struct xfs_pwork_ctl *pctl) pctl 42 fs/xfs/xfs_pwork.h return pctl && pctl->error; pctl 50 fs/xfs/xfs_pwork.h return xfs_pwork_ctl_want_abort(pwork->pctl); pctl 53 fs/xfs/xfs_pwork.h int xfs_pwork_init(struct xfs_mount *mp, struct xfs_pwork_ctl *pctl, pctl 56 fs/xfs/xfs_pwork.h void xfs_pwork_queue(struct xfs_pwork_ctl *pctl, struct xfs_pwork *pwork); pctl 57 fs/xfs/xfs_pwork.h int xfs_pwork_destroy(struct xfs_pwork_ctl *pctl); pctl 58 fs/xfs/xfs_pwork.h void xfs_pwork_poll(struct xfs_pwork_ctl *pctl); pctl 86 include/linux/usb/chipidea.h struct pinctrl *pctl; pctl 28 sound/soc/soc-ac97.c struct pinctrl *pctl; pctl 270 sound/soc/soc-ac97.c struct pinctrl *pctl = snd_ac97_rst_cfg.pctl; pctl 272 sound/soc/soc-ac97.c pinctrl_select_state(pctl, snd_ac97_rst_cfg.pstate_warm_reset); pctl 280 sound/soc/soc-ac97.c pinctrl_select_state(pctl, snd_ac97_rst_cfg.pstate_run); pctl 286 sound/soc/soc-ac97.c struct pinctrl *pctl = snd_ac97_rst_cfg.pctl; pctl 288 sound/soc/soc-ac97.c pinctrl_select_state(pctl, snd_ac97_rst_cfg.pstate_reset); pctl 298 sound/soc/soc-ac97.c pinctrl_select_state(pctl, snd_ac97_rst_cfg.pstate_run); pctl 315 sound/soc/soc-ac97.c cfg->pctl = p;