/linux/drivers/pinctrl/qcom/ |
H A D | pinctrl-msm.c | 43 * @pctrl: pinctrl handle. 63 struct pinctrl_dev *pctrl; member 86 static u32 msm_readl_##name(struct msm_pinctrl *pctrl, \ 89 return readl(pctrl->regs[g->tile] + g->name##_reg); \ 91 static void msm_writel_##name(u32 val, struct msm_pinctrl *pctrl, \ 94 writel(val, pctrl->regs[g->tile] + g->name##_reg); \ 103 static void msm_ack_intr_status(struct msm_pinctrl *pctrl, in MSM_ACCESSOR() 108 msm_writel_intr_status(val, pctrl, g); in MSM_ACCESSOR() 113 struct msm_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in msm_get_groups_count() local 115 return pctrl->soc->ngroups; in msm_get_groups_count() [all …]
|
H A D | pinctrl-lpass-lpi.c | 65 struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in lpi_gpio_get_functions_count() local 67 return pctrl->data->nfunctions; in lpi_gpio_get_functions_count() 73 struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in lpi_gpio_get_function_name() local 75 return pctrl->data->functions[function].name; in lpi_gpio_get_function_name() 83 struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in lpi_gpio_get_function_groups() local 85 *groups = pctrl->data->functions[function].groups; in lpi_gpio_get_function_groups() 86 *num_qgroups = pctrl->data->functions[function].ngroups; in lpi_gpio_get_function_groups() 94 struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in lpi_gpio_set_mux() local 95 const struct lpi_pingroup *g = &pctrl->data->groups[group]; in lpi_gpio_set_mux() 107 mutex_lock(&pctrl->lock); in lpi_gpio_set_mux() [all …]
|
H A D | pinctrl-ssbi-gpio.c | 91 struct pinctrl_dev *pctrl; member 127 static int pm8xxx_read_bank(struct pm8xxx_gpio *pctrl, in pm8xxx_read_bank() argument 133 ret = regmap_write(pctrl->regmap, pin->reg, val); in pm8xxx_read_bank() 135 dev_err(pctrl->dev, "failed to select bank %d\n", bank); in pm8xxx_read_bank() 139 ret = regmap_read(pctrl->regmap, pin->reg, &val); in pm8xxx_read_bank() 141 dev_err(pctrl->dev, "failed to read register %d\n", bank); in pm8xxx_read_bank() 148 static int pm8xxx_write_bank(struct pm8xxx_gpio *pctrl, in pm8xxx_write_bank() argument 158 ret = regmap_write(pctrl->regmap, pin->reg, val); in pm8xxx_write_bank() 160 dev_err(pctrl->dev, "failed to write register\n"); in pm8xxx_write_bank() 167 struct pm8xxx_gpio *pctrl = pinctrl_dev_get_drvdata(pctldev); in pm8xxx_get_groups_count() local [all …]
|
H A D | pinctrl-ssbi-mpp.c | 127 struct pinctrl_dev *pctrl; member 166 static int pm8xxx_mpp_update(struct pm8xxx_mpp *pctrl, in pm8xxx_mpp_update() argument 235 ret = regmap_write(pctrl->regmap, pin->reg, val); in pm8xxx_mpp_update() 237 dev_err(pctrl->dev, "failed to write register\n"); in pm8xxx_mpp_update() 244 struct pm8xxx_mpp *pctrl = pinctrl_dev_get_drvdata(pctldev); in pm8xxx_get_groups_count() local 246 return pctrl->npins; in pm8xxx_get_groups_count() 261 struct pm8xxx_mpp *pctrl = pinctrl_dev_get_drvdata(pctldev); in pm8xxx_get_group_pins() local 263 *pins = &pctrl->desc.pins[group].number; in pm8xxx_get_group_pins() 293 struct pm8xxx_mpp *pctrl = pinctrl_dev_get_drvdata(pctldev); in pm8xxx_get_function_groups() local 296 *num_groups = pctrl->npins; in pm8xxx_get_function_groups() [all …]
|
/linux/drivers/pinctrl/actions/ |
H A D | pinctrl-owl.c | 69 static u32 owl_read_field(struct owl_pinctrl *pctrl, u32 reg, in owl_read_field() argument 74 tmp = readl_relaxed(pctrl->base + reg); in owl_read_field() 80 static void owl_write_field(struct owl_pinctrl *pctrl, u32 reg, u32 arg, in owl_write_field() argument 88 owl_update_bits(pctrl->base + reg, mask, (arg << bit)); in owl_write_field() 93 struct owl_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrldev); in owl_get_groups_count() local 95 return pctrl->soc->ngroups; in owl_get_groups_count() 101 struct owl_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrldev); in owl_get_group_name() local 103 return pctrl->soc->groups[group].name; in owl_get_group_name() 111 struct owl_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrldev); in owl_get_group_pins() local 113 *pins = pctrl->soc->groups[group].pads; in owl_get_group_pins() [all …]
|
/linux/drivers/pinctrl/intel/ |
H A D | pinctrl-intel.c | 129 #define for_each_intel_pin_community(pctrl, community) \ argument 131 __ci < pctrl->ncommunities && (community = &pctrl->communities[__ci]); \ 139 #define for_each_intel_pad_group(pctrl, community, grp) \ argument 140 for_each_intel_pin_community(pctrl, community) \ 143 #define for_each_intel_gpio_group(pctrl, community, grp) \ argument 144 for_each_intel_pad_group(pctrl, community, grp) \ 147 const struct intel_community *intel_get_community(const struct intel_pinctrl *pctrl, in intel_get_community() argument 152 for_each_intel_pin_community(pctrl, community) { in intel_get_community() 158 dev_warn(pctrl->dev, "failed to find community for pin %u\n", pin); in intel_get_community() 177 static void __iomem *intel_get_padcfg(struct intel_pinctrl *pctrl, in intel_get_padcfg() argument [all …]
|
H A D | pinctrl-cherryview.c | 572 static u32 chv_pctrl_readl(struct intel_pinctrl *pctrl, unsigned int offset) in chv_pctrl_readl() argument 574 const struct intel_community *community = &pctrl->communities[0]; in chv_pctrl_readl() 579 static void chv_pctrl_writel(struct intel_pinctrl *pctrl, unsigned int offset, u32 value) in chv_pctrl_writel() argument 581 const struct intel_community *community = &pctrl->communities[0]; in chv_pctrl_writel() 589 static void __iomem *chv_padreg(struct intel_pinctrl *pctrl, unsigned int offset, in chv_padreg() argument 592 const struct intel_community *community = &pctrl->communities[0]; in chv_padreg() 601 static u32 chv_readl(struct intel_pinctrl *pctrl, unsigned int pin, unsigned int offset) in chv_readl() argument 603 return readl(chv_padreg(pctrl, pin, offset)); in chv_readl() 606 static void chv_writel(struct intel_pinctrl *pctrl, unsigned int pin, unsigned int offset, u32 valu… in chv_writel() argument 608 void __iomem *reg = chv_padreg(pctrl, pin, offset); in chv_writel() [all …]
|
/linux/drivers/pinctrl/berlin/ |
H A D | berlin.c | 37 struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev); in berlin_pinctrl_get_group_count() local 39 return pctrl->desc->ngroups; in berlin_pinctrl_get_group_count() 45 struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev); in berlin_pinctrl_get_group_name() local 47 return pctrl->desc->groups[group].name; in berlin_pinctrl_get_group_name() 55 struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev); in berlin_pinctrl_dt_node_to_map() local 66 dev_err(pctrl->dev, in berlin_pinctrl_dt_node_to_map() 73 dev_err(pctrl->dev, in berlin_pinctrl_dt_node_to_map() 81 dev_err(pctrl->dev, "can't reserve map: %d\n", ret); in berlin_pinctrl_dt_node_to_map() 90 dev_err(pctrl->dev, "can't add map: %d\n", ret); in berlin_pinctrl_dt_node_to_map() 107 struct berlin_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctrl_dev); in berlin_pinmux_get_functions_count() local [all …]
|
/linux/drivers/pinctrl/sophgo/ |
H A D | pinctrl-cv18xx.c | 66 #define cv1800_pinctrl_get_component_addr(pctrl, _comp) \ argument 67 ((pctrl)->regs[(_comp)->area] + (_comp)->offset) 78 static int cv1800_set_power_cfg(struct cv1800_pinctrl *pctrl, in cv1800_set_power_cfg() argument 81 if (domain >= pctrl->data->npd) in cv1800_set_power_cfg() 84 if (pctrl->power_cfg[domain] && pctrl->power_cfg[domain] != cfg) in cv1800_set_power_cfg() 87 pctrl->power_cfg[domain] = cfg; in cv1800_set_power_cfg() 92 static int cv1800_get_power_cfg(struct cv1800_pinctrl *pctrl, in cv1800_get_power_cfg() argument 95 return pctrl->power_cfg[domain]; in cv1800_get_power_cfg() 98 static struct cv1800_pin *cv1800_get_pin(struct cv1800_pinctrl *pctrl, in cv1800_get_pin() argument 101 return bsearch((void *)pin, pctrl->data->pindata, pctrl->data->npins, in cv1800_get_pin() [all …]
|
/linux/drivers/pinctrl/renesas/ |
H A D | pinctrl-rzv2m.c | 142 static void rzv2m_pinctrl_set_pfc_mode(struct rzv2m_pinctrl *pctrl, in rzv2m_pinctrl_set_pfc_mode() argument 148 rzv2m_writel_we(pctrl->base + DI_MSK(port), pin, 1); in rzv2m_pinctrl_set_pfc_mode() 149 rzv2m_writel_we(pctrl->base + EN_MSK(port), pin, 1); in rzv2m_pinctrl_set_pfc_mode() 152 addr = pctrl->base + PFSEL(port) + (pin / 4) * 4; in rzv2m_pinctrl_set_pfc_mode() 156 rzv2m_writel_we(pctrl->base + EN_MSK(port), pin, 0); in rzv2m_pinctrl_set_pfc_mode() 157 rzv2m_writel_we(pctrl->base + DI_MSK(port), pin, 0); in rzv2m_pinctrl_set_pfc_mode() 164 struct rzv2m_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in rzv2m_pinctrl_set_mux() local 181 dev_dbg(pctrl->dev, "port:%u pin: %u PSEL:%u\n", in rzv2m_pinctrl_set_mux() 184 rzv2m_pinctrl_set_pfc_mode(pctrl, RZV2M_PIN_ID_TO_PORT(pins[i]), in rzv2m_pinctrl_set_mux() 218 struct rzv2m_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in rzv2m_dt_subnode_to_map() local [all …]
|
/linux/drivers/pinctrl/nuvoton/ |
H A D | pinctrl-wpcm450.c | 51 struct wpcm450_pinctrl *pctrl; member 129 struct wpcm450_pinctrl *pctrl = gpio->pctrl; in wpcm450_gpio_irq_ack() local 137 raw_spin_lock_irqsave(&pctrl->lock, flags); in wpcm450_gpio_irq_ack() 138 iowrite32(BIT(bit), pctrl->gpio_base + WPCM450_GPEVST); in wpcm450_gpio_irq_ack() 139 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in wpcm450_gpio_irq_ack() 146 struct wpcm450_pinctrl *pctrl = gpio->pctrl; in wpcm450_gpio_irq_mask() local 155 raw_spin_lock_irqsave(&pctrl->lock, flags); in wpcm450_gpio_irq_mask() 156 even = ioread32(pctrl->gpio_base + WPCM450_GPEVEN); in wpcm450_gpio_irq_mask() 158 iowrite32(even, pctrl->gpio_base + WPCM450_GPEVEN); in wpcm450_gpio_irq_mask() 159 raw_spin_unlock_irqrestore(&pctrl->lock, flags); in wpcm450_gpio_irq_mask() [all …]
|
H A D | pinctrl-npcm7xx.c | 1849 static int npcm7xx_gpio_of(struct npcm7xx_pinctrl *pctrl) in npcm7xx_gpio_of() argument 1853 struct device *dev = pctrl->dev; in npcm7xx_gpio_of() 1867 pctrl->gpio_bank[id].base = ioremap(res.start, resource_size(&res)); in npcm7xx_gpio_of() 1868 if (!pctrl->gpio_bank[id].base) in npcm7xx_gpio_of() 1871 ret = bgpio_init(&pctrl->gpio_bank[id].gc, dev, 4, in npcm7xx_gpio_of() 1872 pctrl->gpio_bank[id].base + NPCM7XX_GP_N_DIN, in npcm7xx_gpio_of() 1873 pctrl->gpio_bank[id].base + NPCM7XX_GP_N_DOUT, in npcm7xx_gpio_of() 1876 pctrl->gpio_bank[id].base + NPCM7XX_GP_N_IEM, in npcm7xx_gpio_of() 1894 pctrl->gpio_bank[id].irq = ret; in npcm7xx_gpio_of() 1895 pctrl->gpio_bank[id].irqbase = id * NPCM7XX_GPIO_PER_BANK; in npcm7xx_gpio_of() [all …]
|
H A D | pinctrl-npcm8xx.c | 2336 static int npcm8xx_gpio_fw(struct npcm8xx_pinctrl *pctrl) in npcm8xx_gpio_fw() argument 2339 struct device *dev = pctrl->dev; in npcm8xx_gpio_fw() 2345 pctrl->gpio_bank[id].base = fwnode_iomap(child, 0); in npcm8xx_gpio_fw() 2346 if (!pctrl->gpio_bank[id].base) in npcm8xx_gpio_fw() 2349 ret = bgpio_init(&pctrl->gpio_bank[id].gc, dev, 4, in npcm8xx_gpio_fw() 2350 pctrl->gpio_bank[id].base + NPCM8XX_GP_N_DIN, in npcm8xx_gpio_fw() 2351 pctrl->gpio_bank[id].base + NPCM8XX_GP_N_DOUT, in npcm8xx_gpio_fw() 2354 pctrl->gpio_bank[id].base + NPCM8XX_GP_N_IEM, in npcm8xx_gpio_fw() 2367 pctrl->gpio_bank[id].irq = ret; in npcm8xx_gpio_fw() 2368 pctrl->gpio_bank[id].irq_chip = npcmgpio_irqchip; in npcm8xx_gpio_fw() [all …]
|
/linux/drivers/pinctrl/spacemit/ |
H A D | pinctrl-k1.c | 125 static inline void __iomem *spacemit_pin_to_reg(struct spacemit_pinctrl *pctrl, in spacemit_pin_to_reg() argument 128 return pctrl->regs + spacemit_pin_to_offset(pin); in spacemit_pin_to_reg() 141 static const struct spacemit_pin *spacemit_get_pin(struct spacemit_pinctrl *pctrl, in spacemit_get_pin() argument 144 const struct spacemit_pin *pdata = pctrl->data->data; in spacemit_get_pin() 147 for (i = 0; i < pctrl->data->npins; i++) { in spacemit_get_pin() 172 struct spacemit_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in spacemit_pctrl_dbg_show() local 173 const struct spacemit_pin *spin = spacemit_get_pin(pctrl, pin); in spacemit_pctrl_dbg_show() 181 reg = spacemit_pin_to_reg(pctrl, pin); in spacemit_pctrl_dbg_show() 268 struct spacemit_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in spacemit_pctrl_check_power() local 269 struct device *dev = pctrl->dev; in spacemit_pctrl_check_power() [all …]
|
/linux/drivers/pinctrl/ |
H A D | pinctrl-eyeq5.c | 201 static void eq5p_update_bits(const struct eq5p_pinctrl *pctrl, in eq5p_update_bits() argument 205 void __iomem *ptr = pctrl->base + eq5p_regs[bank][reg]; in eq5p_update_bits() 210 static bool eq5p_test_bit(const struct eq5p_pinctrl *pctrl, in eq5p_test_bit() argument 213 u32 val = readl(pctrl->base + eq5p_regs[bank][reg]); in eq5p_test_bit() 262 struct eq5p_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in eq5p_pinconf_get() local 268 pd = eq5p_test_bit(pctrl, bank, EQ5P_PD, offset); in eq5p_pinconf_get() 269 pu = eq5p_test_bit(pctrl, bank, EQ5P_PU, offset); in eq5p_pinconf_get() 284 val_ds = readl(pctrl->base + eq5p_regs[bank][EQ5P_DS_HIGH]); in eq5p_pinconf_get() 287 val_ds = readl(pctrl->base + eq5p_regs[bank][EQ5P_DS_LOW]); in eq5p_pinconf_get() 303 struct eq5p_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in eq5p_pinctrl_pin_dbg_show() local [all …]
|
H A D | pinctrl-zynqmp.c | 71 * @pctrl: Pin control device 82 struct pinctrl_dev *pctrl; member 107 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pctrl_get_groups_count() local 109 return pctrl->ngroups + zynqmp_desc.npins; in zynqmp_pctrl_get_groups_count() 115 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pctrl_get_group_name() local 117 if (selector < pctrl->ngroups) in zynqmp_pctrl_get_group_name() 118 return pctrl->groups[selector].name; in zynqmp_pctrl_get_group_name() 120 return zynqmp_desc.pins[selector - pctrl->ngroups].name; in zynqmp_pctrl_get_group_name() 128 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pctrl_get_group_pins() local 130 if (selector < pctrl->ngroups) { in zynqmp_pctrl_get_group_pins() [all …]
|
H A D | pinctrl-zynq.c | 33 * @pctrl: Pinctrl device 42 struct pinctrl_dev *pctrl; member 827 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pctrl_get_groups_count() local 829 return pctrl->ngroups; in zynq_pctrl_get_groups_count() 835 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pctrl_get_group_name() local 837 return pctrl->groups[selector].name; in zynq_pctrl_get_group_name() 845 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pctrl_get_group_pins() local 847 *pins = pctrl->groups[selector].pins; in zynq_pctrl_get_group_pins() 848 *num_pins = pctrl->groups[selector].npins; in zynq_pctrl_get_group_pins() 864 struct zynq_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynq_pmux_get_functions_count() local [all …]
|
H A D | pinctrl-bm1880.c | 921 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_groups_count() local 923 return pctrl->ngroups; in bm1880_pctrl_get_groups_count() 929 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_group_name() local 931 return pctrl->groups[selector].name; in bm1880_pctrl_get_group_name() 939 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_group_pins() local 941 *pins = pctrl->groups[selector].pins; in bm1880_pctrl_get_group_pins() 942 *num_pins = pctrl->groups[selector].npins; in bm1880_pctrl_get_group_pins() 958 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pmux_get_functions_count() local 960 return pctrl->nfuncs; in bm1880_pmux_get_functions_count() 966 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pmux_get_function_name() local [all …]
|
/linux/drivers/phy/hisilicon/ |
H A D | phy-hi3660-usb3.c | 61 struct regmap *pctrl; member 79 ret = regmap_write(priv->pctrl, PCTRL_PERI_CTRL3, val); in hi3660_phy_init() 155 ret = regmap_write(priv->pctrl, PCTRL_PERI_CTRL3, val); in hi3660_phy_exit() 190 priv->pctrl = syscon_regmap_lookup_by_phandle(dev->of_node, in hi3660_phy_probe() 191 "hisilicon,pctrl-syscon"); in hi3660_phy_probe() 192 if (IS_ERR(priv->pctrl)) { in hi3660_phy_probe() 193 dev_err(dev, "no hisilicon,pctrl-syscon\n"); in hi3660_phy_probe() 194 return PTR_ERR(priv->pctrl); in hi3660_phy_probe()
|
H A D | phy-hi3670-usb3.c | 129 struct regmap *pctrl; member 356 ret = regmap_write(priv->pctrl, PCTRL_PERI_CTRL3, in hi3670_config_phy_clock() 362 ret = regmap_update_bits(priv->pctrl, in hi3670_config_phy_clock() 567 ret = regmap_write(priv->pctrl, PCTRL_PERI_CTRL3, in hi3670_phy_exit() 607 priv->pctrl = syscon_regmap_lookup_by_phandle(dev->of_node, in hi3670_phy_probe() 608 "hisilicon,pctrl-syscon"); in hi3670_phy_probe() 609 if (IS_ERR(priv->pctrl)) { in hi3670_phy_probe() 610 dev_err(dev, "no hisilicon,pctrl-syscon\n"); in hi3670_phy_probe() 611 return PTR_ERR(priv->pctrl); in hi3670_phy_probe()
|
/linux/Documentation/devicetree/bindings/arm/hisilicon/controller/ |
H A D | pctrl.yaml | 4 $id: http://devicetree.org/schemas/arm/hisilicon/controller/pctrl.yaml# 17 - const: hisilicon,pctrl 30 pctrl@fca09000 { 31 compatible = "hisilicon,pctrl";
|
/linux/Documentation/devicetree/bindings/phy/ |
H A D | hisilicon,hi3660-usb3.yaml | 25 hisilicon,pctrl-syscon: 37 - hisilicon,pctrl-syscon 49 hisilicon,pctrl-syscon = <&pctrl>;
|
H A D | hisilicon,hi3670-usb3.yaml | 26 hisilicon,pctrl-syscon: 46 - hisilicon,pctrl-syscon 60 hisilicon,pctrl-syscon = <&pctrl>;
|
/linux/Documentation/devicetree/bindings/gpio/ |
H A D | loongson,ls-gpio.yaml | 70 gpio-ranges = <&pctrl 0 0 15>, 71 <&pctrl 16 16 15>, 72 <&pctrl 32 32 10>, 73 <&pctrl 44 44 20>;
|
/linux/Documentation/devicetree/bindings/soc/hisilicon/ |
H A D | hisilicon,hi3660-usb3-otg-bc.yaml | 43 hisilicon,pctrl-syscon = <&pctrl>;
|