Home
last modified time | relevance | path

Searched full:pctrl (Results 1 – 25 of 64) sorted by relevance

123

/openbmc/linux/drivers/pinctrl/qcom/
H A Dpinctrl-msm.c43 * @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 Dpinctrl-lpass-lpi.c65 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 Dpinctrl-ssbi-gpio.c91 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 Dpinctrl-ssbi-mpp.c127 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 …]
/openbmc/linux/drivers/pinctrl/actions/
H A Dpinctrl-owl.c69 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 …]
/openbmc/linux/drivers/pinctrl/intel/
H A Dpinctrl-intel.c110 struct intel_community *intel_get_community(struct intel_pinctrl *pctrl, unsigned int pin) in intel_get_community() argument
115 for (i = 0; i < pctrl->ncommunities; i++) { in intel_get_community()
116 community = &pctrl->communities[i]; in intel_get_community()
122 dev_warn(pctrl->dev, "failed to find community for pin %u\n", pin); in intel_get_community()
143 static void __iomem *intel_get_padcfg(struct intel_pinctrl *pctrl, in intel_get_padcfg() argument
150 community = intel_get_community(pctrl, pin); in intel_get_padcfg()
163 static bool intel_pad_owned_by_host(struct intel_pinctrl *pctrl, unsigned int pin) in intel_pad_owned_by_host() argument
170 community = intel_get_community(pctrl, pin); in intel_pad_owned_by_host()
188 static bool intel_pad_acpi_mode(struct intel_pinctrl *pctrl, unsigned int pin) in intel_pad_acpi_mode() argument
195 community = intel_get_community(pctrl, pin); in intel_pad_acpi_mode()
[all …]
H A Dpinctrl-cherryview.c571 static u32 chv_pctrl_readl(struct intel_pinctrl *pctrl, unsigned int offset) in chv_pctrl_readl() argument
573 const struct intel_community *community = &pctrl->communities[0]; in chv_pctrl_readl()
578 static void chv_pctrl_writel(struct intel_pinctrl *pctrl, unsigned int offset, u32 value) in chv_pctrl_writel() argument
580 const struct intel_community *community = &pctrl->communities[0]; in chv_pctrl_writel()
588 static void __iomem *chv_padreg(struct intel_pinctrl *pctrl, unsigned int offset, in chv_padreg() argument
591 const struct intel_community *community = &pctrl->communities[0]; in chv_padreg()
600 static u32 chv_readl(struct intel_pinctrl *pctrl, unsigned int pin, unsigned int offset) in chv_readl() argument
602 return readl(chv_padreg(pctrl, pin, offset)); in chv_readl()
605 static void chv_writel(struct intel_pinctrl *pctrl, unsigned int pin, unsigned int offset, u32 valu… in chv_writel() argument
607 void __iomem *reg = chv_padreg(pctrl, pin, offset); in chv_writel()
[all …]
/openbmc/linux/drivers/pinctrl/berlin/
H A Dberlin.c37 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 …]
/openbmc/linux/drivers/pinctrl/renesas/
H A Dpinctrl-rzv2m.c142 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()
219 struct rzv2m_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in rzv2m_dt_subnode_to_map() local
[all …]
H A Dpinctrl-rzg2l.c163 static void rzg2l_pinctrl_set_pfc_mode(struct rzg2l_pinctrl *pctrl, in rzg2l_pinctrl_set_pfc_mode() argument
169 spin_lock_irqsave(&pctrl->lock, flags); in rzg2l_pinctrl_set_pfc_mode()
172 reg = readw(pctrl->base + PM(port)); in rzg2l_pinctrl_set_pfc_mode()
174 writew(reg, pctrl->base + PM(port)); in rzg2l_pinctrl_set_pfc_mode()
177 reg = readb(pctrl->base + PMC(port)); in rzg2l_pinctrl_set_pfc_mode()
178 writeb(reg & ~BIT(pin), pctrl->base + PMC(port)); in rzg2l_pinctrl_set_pfc_mode()
181 writel(0x0, pctrl->base + PWPR); /* B0WI=0, PFCWE=0 */ in rzg2l_pinctrl_set_pfc_mode()
182 writel(PWPR_PFCWE, pctrl->base + PWPR); /* B0WI=0, PFCWE=1 */ in rzg2l_pinctrl_set_pfc_mode()
185 reg = readl(pctrl->base + PFC(port)); in rzg2l_pinctrl_set_pfc_mode()
187 writel(reg | (func << (pin * 4)), pctrl->base + PFC(port)); in rzg2l_pinctrl_set_pfc_mode()
[all …]
/openbmc/linux/drivers/pinctrl/nuvoton/
H A Dpinctrl-wpcm450.c51 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 Dpinctrl-npcm7xx.c1868 static int npcm7xx_gpio_of(struct npcm7xx_pinctrl *pctrl) in npcm7xx_gpio_of() argument
1872 struct device *dev = pctrl->dev; in npcm7xx_gpio_of()
1886 pctrl->gpio_bank[id].base = ioremap(res.start, resource_size(&res)); in npcm7xx_gpio_of()
1887 if (!pctrl->gpio_bank[id].base) in npcm7xx_gpio_of()
1890 ret = bgpio_init(&pctrl->gpio_bank[id].gc, dev, 4, in npcm7xx_gpio_of()
1891 pctrl->gpio_bank[id].base + NPCM7XX_GP_N_DIN, in npcm7xx_gpio_of()
1892 pctrl->gpio_bank[id].base + NPCM7XX_GP_N_DOUT, in npcm7xx_gpio_of()
1895 pctrl->gpio_bank[id].base + NPCM7XX_GP_N_IEM, in npcm7xx_gpio_of()
1913 pctrl->gpio_bank[id].irq = ret; in npcm7xx_gpio_of()
1914 pctrl->gpio_bank[id].irqbase = id * NPCM7XX_GPIO_PER_BANK; in npcm7xx_gpio_of()
[all …]
H A Dpinctrl-npcm8xx.c2341 static int npcm8xx_gpio_fw(struct npcm8xx_pinctrl *pctrl) in npcm8xx_gpio_fw() argument
2344 struct device *dev = pctrl->dev; in npcm8xx_gpio_fw()
2350 pctrl->gpio_bank[id].base = fwnode_iomap(child, 0); in npcm8xx_gpio_fw()
2351 if (!pctrl->gpio_bank[id].base) in npcm8xx_gpio_fw()
2354 ret = bgpio_init(&pctrl->gpio_bank[id].gc, dev, 4, in npcm8xx_gpio_fw()
2355 pctrl->gpio_bank[id].base + NPCM8XX_GP_N_DIN, in npcm8xx_gpio_fw()
2356 pctrl->gpio_bank[id].base + NPCM8XX_GP_N_DOUT, in npcm8xx_gpio_fw()
2359 pctrl->gpio_bank[id].base + NPCM8XX_GP_N_IEM, in npcm8xx_gpio_fw()
2372 pctrl->gpio_bank[id].irq = ret; in npcm8xx_gpio_fw()
2373 pctrl->gpio_bank[id].irq_chip = npcmgpio_irqchip; in npcm8xx_gpio_fw()
[all …]
/openbmc/linux/drivers/pinctrl/
H A Dpinctrl-loongson2.c204 struct loongson2_pinctrl *pctrl = pinctrl_dev_get_drvdata(pcdev); in loongson2_pmx_set_mux() local
205 void __iomem *reg = pctrl->reg_base + in loongson2_pmx_set_mux()
211 spin_lock_irqsave(&pctrl->lock, flags); in loongson2_pmx_set_mux()
218 spin_unlock_irqrestore(&pctrl->lock, flags); in loongson2_pmx_set_mux()
255 struct loongson2_pinctrl *pctrl; in loongson2_pinctrl_probe() local
257 pctrl = devm_kzalloc(dev, sizeof(*pctrl), GFP_KERNEL); in loongson2_pinctrl_probe()
258 if (!pctrl) in loongson2_pinctrl_probe()
261 pctrl->reg_base = devm_platform_ioremap_resource(pdev, 0); in loongson2_pinctrl_probe()
262 if (IS_ERR(pctrl->reg_base)) in loongson2_pinctrl_probe()
263 return PTR_ERR(pctrl->reg_base); in loongson2_pinctrl_probe()
[all …]
H A Dpinctrl-zynqmp.c63 * @pctrl: Pin control device
74 struct pinctrl_dev *pctrl; member
97 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pctrl_get_groups_count() local
99 return pctrl->ngroups; in zynqmp_pctrl_get_groups_count()
105 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pctrl_get_group_name() local
107 return pctrl->groups[selector].name; in zynqmp_pctrl_get_group_name()
115 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pctrl_get_group_pins() local
117 *pins = pctrl->groups[selector].pins; in zynqmp_pctrl_get_group_pins()
118 *npins = pctrl->groups[selector].npins; in zynqmp_pctrl_get_group_pins()
147 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pmux_get_functions_count() local
[all …]
H A Dpinctrl-zynq.c33 * @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 Dpinctrl-bm1880.c921 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 …]
H A Dpinctrl-amd.c855 return amd_pinconf_set(gpio_dev->pctrl, pin, &config, 1); in amd_gpio_set_config()
867 struct pinctrl_desc *desc = gpio_dev->pctrl->desc; in amd_gpio_irq_init()
877 const struct pin_desc *pd = pin_desc_get(gpio_dev->pctrl, pin); in amd_gpio_irq_init()
895 const struct pin_desc *pd = pin_desc_get(gpio_dev->pctrl, pin); in amd_gpio_should_save()
914 struct pinctrl_desc *desc = gpio_dev->pctrl->desc; in amd_gpio_suspend()
944 struct pinctrl_desc *desc = gpio_dev->pctrl->desc; in amd_gpio_resume()
1029 pd = pin_desc_get(gpio_dev->pctrl, gpio_dev->groups[group].pins[ind]); in amd_set_mux()
1131 gpio_dev->pctrl = devm_pinctrl_register(&pdev->dev, &amd_pinctrl_desc, in amd_gpio_probe()
1133 if (IS_ERR(gpio_dev->pctrl)) { in amd_gpio_probe()
1135 return PTR_ERR(gpio_dev->pctrl); in amd_gpio_probe()
H A Dpinctrl-lantiq.c338 info->pctrl = devm_pinctrl_register(&pdev->dev, desc, info); in ltq_pinctrl_register()
339 if (IS_ERR(info->pctrl)) { in ltq_pinctrl_register()
341 return PTR_ERR(info->pctrl); in ltq_pinctrl_register()
/openbmc/linux/Documentation/devicetree/bindings/arm/hisilicon/controller/
H A Dpctrl.yaml4 $id: http://devicetree.org/schemas/arm/hisilicon/controller/pctrl.yaml#
17 - const: hisilicon,pctrl
30 pctrl@fca09000 {
31 compatible = "hisilicon,pctrl";
/openbmc/linux/drivers/phy/hisilicon/
H A Dphy-hi3660-usb3.c61 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 Dphy-hi3670-usb3.c129 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()
/openbmc/linux/Documentation/devicetree/bindings/phy/
H A Dhisilicon,hi3660-usb3.yaml25 hisilicon,pctrl-syscon:
37 - hisilicon,pctrl-syscon
49 hisilicon,pctrl-syscon = <&pctrl>;
H A Dhisilicon,hi3670-usb3.yaml26 hisilicon,pctrl-syscon:
46 - hisilicon,pctrl-syscon
60 hisilicon,pctrl-syscon = <&pctrl>;
/openbmc/linux/Documentation/devicetree/bindings/gpio/
H A Dloongson,ls-gpio.yaml57 gpio-ranges = <&pctrl 0 0 15>,
58 <&pctrl 16 16 15>,
59 <&pctrl 32 32 10>,
60 <&pctrl 44 44 20>;

123