/Linux-v6.1/drivers/pinctrl/actions/ |
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-v6.1/drivers/pinctrl/qcom/ |
D | pinctrl-msm.c | 41 * @pctrl: pinctrl handle. 61 struct pinctrl_dev *pctrl; member 84 static u32 msm_readl_##name(struct msm_pinctrl *pctrl, \ 87 return readl(pctrl->regs[g->tile] + g->name##_reg); \ 89 static void msm_writel_##name(u32 val, struct msm_pinctrl *pctrl, \ 92 writel(val, pctrl->regs[g->tile] + g->name##_reg); \ 101 static void msm_ack_intr_status(struct msm_pinctrl *pctrl, in MSM_ACCESSOR() 106 msm_writel_intr_status(val, pctrl, g); in MSM_ACCESSOR() 111 struct msm_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in msm_get_groups_count() local 113 return pctrl->soc->ngroups; in msm_get_groups_count() [all …]
|
D | pinctrl-lpass-lpi.c | 55 struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in lpi_gpio_get_functions_count() local 57 return pctrl->data->nfunctions; in lpi_gpio_get_functions_count() 63 struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in lpi_gpio_get_function_name() local 65 return pctrl->data->functions[function].name; in lpi_gpio_get_function_name() 73 struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in lpi_gpio_get_function_groups() local 75 *groups = pctrl->data->functions[function].groups; in lpi_gpio_get_function_groups() 76 *num_qgroups = pctrl->data->functions[function].ngroups; in lpi_gpio_get_function_groups() 84 struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in lpi_gpio_set_mux() local 85 const struct lpi_pingroup *g = &pctrl->data->groups[group_num]; in lpi_gpio_set_mux() 97 val = lpi_gpio_read(pctrl, pin, LPI_GPIO_CFG_REG); in lpi_gpio_set_mux() [all …]
|
D | pinctrl-ssbi-gpio.c | 89 struct pinctrl_dev *pctrl; member 125 static int pm8xxx_read_bank(struct pm8xxx_gpio *pctrl, in pm8xxx_read_bank() argument 131 ret = regmap_write(pctrl->regmap, pin->reg, val); in pm8xxx_read_bank() 133 dev_err(pctrl->dev, "failed to select bank %d\n", bank); in pm8xxx_read_bank() 137 ret = regmap_read(pctrl->regmap, pin->reg, &val); in pm8xxx_read_bank() 139 dev_err(pctrl->dev, "failed to read register %d\n", bank); in pm8xxx_read_bank() 146 static int pm8xxx_write_bank(struct pm8xxx_gpio *pctrl, in pm8xxx_write_bank() argument 156 ret = regmap_write(pctrl->regmap, pin->reg, val); in pm8xxx_write_bank() 158 dev_err(pctrl->dev, "failed to write register\n"); in pm8xxx_write_bank() 165 struct pm8xxx_gpio *pctrl = pinctrl_dev_get_drvdata(pctldev); in pm8xxx_get_groups_count() local [all …]
|
D | pinctrl-ssbi-mpp.c | 125 struct pinctrl_dev *pctrl; member 165 static int pm8xxx_mpp_update(struct pm8xxx_mpp *pctrl, in pm8xxx_mpp_update() argument 234 ret = regmap_write(pctrl->regmap, pin->reg, val); in pm8xxx_mpp_update() 236 dev_err(pctrl->dev, "failed to write register\n"); in pm8xxx_mpp_update() 243 struct pm8xxx_mpp *pctrl = pinctrl_dev_get_drvdata(pctldev); in pm8xxx_get_groups_count() local 245 return pctrl->npins; in pm8xxx_get_groups_count() 260 struct pm8xxx_mpp *pctrl = pinctrl_dev_get_drvdata(pctldev); in pm8xxx_get_group_pins() local 262 *pins = &pctrl->desc.pins[group].number; in pm8xxx_get_group_pins() 292 struct pm8xxx_mpp *pctrl = pinctrl_dev_get_drvdata(pctldev); in pm8xxx_get_function_groups() local 295 *num_groups = pctrl->npins; in pm8xxx_get_function_groups() [all …]
|
/Linux-v6.1/drivers/pinctrl/intel/ |
D | pinctrl-intel.c | 101 static struct intel_community *intel_get_community(struct intel_pinctrl *pctrl, in intel_get_community() argument 107 for (i = 0; i < pctrl->ncommunities; i++) { in intel_get_community() 108 community = &pctrl->communities[i]; in intel_get_community() 114 dev_warn(pctrl->dev, "failed to find community for pin %u\n", pin); in intel_get_community() 134 static void __iomem *intel_get_padcfg(struct intel_pinctrl *pctrl, in intel_get_padcfg() argument 141 community = intel_get_community(pctrl, pin); in intel_get_padcfg() 154 static bool intel_pad_owned_by_host(struct intel_pinctrl *pctrl, unsigned int pin) in intel_pad_owned_by_host() argument 161 community = intel_get_community(pctrl, pin); in intel_pad_owned_by_host() 179 static bool intel_pad_acpi_mode(struct intel_pinctrl *pctrl, unsigned int pin) in intel_pad_acpi_mode() argument 186 community = intel_get_community(pctrl, pin); in intel_pad_acpi_mode() [all …]
|
D | pinctrl-cherryview.c | 569 static u32 chv_pctrl_readl(struct intel_pinctrl *pctrl, unsigned int offset) in chv_pctrl_readl() argument 571 const struct intel_community *community = &pctrl->communities[0]; in chv_pctrl_readl() 576 static void chv_pctrl_writel(struct intel_pinctrl *pctrl, unsigned int offset, u32 value) in chv_pctrl_writel() argument 578 const struct intel_community *community = &pctrl->communities[0]; in chv_pctrl_writel() 586 static void __iomem *chv_padreg(struct intel_pinctrl *pctrl, unsigned int offset, in chv_padreg() argument 589 const struct intel_community *community = &pctrl->communities[0]; in chv_padreg() 598 static u32 chv_readl(struct intel_pinctrl *pctrl, unsigned int pin, unsigned int offset) in chv_readl() argument 600 return readl(chv_padreg(pctrl, pin, offset)); in chv_readl() 603 static void chv_writel(struct intel_pinctrl *pctrl, unsigned int pin, unsigned int offset, u32 valu… in chv_writel() argument 605 void __iomem *reg = chv_padreg(pctrl, pin, offset); in chv_writel() [all …]
|
/Linux-v6.1/drivers/pinctrl/berlin/ |
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-v6.1/drivers/pinctrl/renesas/ |
D | pinctrl-rzv2m.c | 138 static void rzv2m_pinctrl_set_pfc_mode(struct rzv2m_pinctrl *pctrl, in rzv2m_pinctrl_set_pfc_mode() argument 144 rzv2m_writel_we(pctrl->base + DI_MSK(port), pin, 1); in rzv2m_pinctrl_set_pfc_mode() 145 rzv2m_writel_we(pctrl->base + EN_MSK(port), pin, 1); in rzv2m_pinctrl_set_pfc_mode() 148 addr = pctrl->base + PFSEL(port) + (pin / 4) * 4; in rzv2m_pinctrl_set_pfc_mode() 152 rzv2m_writel_we(pctrl->base + EN_MSK(port), pin, 0); in rzv2m_pinctrl_set_pfc_mode() 153 rzv2m_writel_we(pctrl->base + DI_MSK(port), pin, 0); in rzv2m_pinctrl_set_pfc_mode() 160 struct rzv2m_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in rzv2m_pinctrl_set_mux() local 177 dev_dbg(pctrl->dev, "port:%u pin: %u PSEL:%u\n", in rzv2m_pinctrl_set_mux() 180 rzv2m_pinctrl_set_pfc_mode(pctrl, RZV2M_PIN_ID_TO_PORT(pins[i]), in rzv2m_pinctrl_set_mux() 214 struct rzv2m_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in rzv2m_dt_subnode_to_map() local [all …]
|
D | pinctrl-rzg2l.c | 157 static void rzg2l_pinctrl_set_pfc_mode(struct rzg2l_pinctrl *pctrl, in rzg2l_pinctrl_set_pfc_mode() argument 163 spin_lock_irqsave(&pctrl->lock, flags); in rzg2l_pinctrl_set_pfc_mode() 166 reg = readw(pctrl->base + PM(port)); in rzg2l_pinctrl_set_pfc_mode() 168 writew(reg, pctrl->base + PM(port)); in rzg2l_pinctrl_set_pfc_mode() 171 reg = readb(pctrl->base + PMC(port)); in rzg2l_pinctrl_set_pfc_mode() 172 writeb(reg & ~BIT(pin), pctrl->base + PMC(port)); in rzg2l_pinctrl_set_pfc_mode() 175 writel(0x0, pctrl->base + PWPR); /* B0WI=0, PFCWE=0 */ in rzg2l_pinctrl_set_pfc_mode() 176 writel(PWPR_PFCWE, pctrl->base + PWPR); /* B0WI=0, PFCWE=1 */ in rzg2l_pinctrl_set_pfc_mode() 179 reg = readl(pctrl->base + PFC(port)); in rzg2l_pinctrl_set_pfc_mode() 181 writel(reg | (func << (pin * 4)), pctrl->base + PFC(port)); in rzg2l_pinctrl_set_pfc_mode() [all …]
|
/Linux-v6.1/drivers/pinctrl/nuvoton/ |
D | pinctrl-wpcm450.c | 51 struct wpcm450_pinctrl *pctrl; member 130 struct wpcm450_pinctrl *pctrl = gpio->pctrl; in wpcm450_gpio_irq_ack() local 138 raw_spin_lock_irqsave(&pctrl->lock, flags); in wpcm450_gpio_irq_ack() 139 iowrite32(BIT(bit), pctrl->gpio_base + WPCM450_GPEVST); in wpcm450_gpio_irq_ack() 140 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 …]
|
D | pinctrl-npcm7xx.c | 1862 static int npcm7xx_gpio_of(struct npcm7xx_pinctrl *pctrl) in npcm7xx_gpio_of() argument 1866 struct device *dev = pctrl->dev; in npcm7xx_gpio_of() 1880 pctrl->gpio_bank[id].base = ioremap(res.start, resource_size(&res)); in npcm7xx_gpio_of() 1882 ret = bgpio_init(&pctrl->gpio_bank[id].gc, dev, 4, in npcm7xx_gpio_of() 1883 pctrl->gpio_bank[id].base + NPCM7XX_GP_N_DIN, in npcm7xx_gpio_of() 1884 pctrl->gpio_bank[id].base + NPCM7XX_GP_N_DOUT, in npcm7xx_gpio_of() 1887 pctrl->gpio_bank[id].base + NPCM7XX_GP_N_IEM, in npcm7xx_gpio_of() 1905 pctrl->gpio_bank[id].irq = ret; in npcm7xx_gpio_of() 1906 pctrl->gpio_bank[id].irq_chip = npcmgpio_irqchip; in npcm7xx_gpio_of() 1907 pctrl->gpio_bank[id].irqbase = id * NPCM7XX_GPIO_PER_BANK; in npcm7xx_gpio_of() [all …]
|
/Linux-v6.1/drivers/pinctrl/ |
D | pinctrl-zynqmp.c | 61 * @pctrl: Pin control device 72 struct pinctrl_dev *pctrl; member 95 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pctrl_get_groups_count() local 97 return pctrl->ngroups; in zynqmp_pctrl_get_groups_count() 103 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pctrl_get_group_name() local 105 return pctrl->groups[selector].name; in zynqmp_pctrl_get_group_name() 113 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pctrl_get_group_pins() local 115 *pins = pctrl->groups[selector].pins; in zynqmp_pctrl_get_group_pins() 116 *npins = pctrl->groups[selector].npins; in zynqmp_pctrl_get_group_pins() 145 struct zynqmp_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in zynqmp_pmux_get_functions_count() local [all …]
|
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 …]
|
D | pinctrl-bm1880.c | 919 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_groups_count() local 921 return pctrl->ngroups; in bm1880_pctrl_get_groups_count() 927 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_group_name() local 929 return pctrl->groups[selector].name; in bm1880_pctrl_get_group_name() 937 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pctrl_get_group_pins() local 939 *pins = pctrl->groups[selector].pins; in bm1880_pctrl_get_group_pins() 940 *num_pins = pctrl->groups[selector].npins; in bm1880_pctrl_get_group_pins() 956 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pmux_get_functions_count() local 958 return pctrl->nfuncs; in bm1880_pmux_get_functions_count() 964 struct bm1880_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); in bm1880_pmux_get_function_name() local [all …]
|
D | pinctrl-amd.c | 867 struct pinctrl_desc *desc = gpio_dev->pctrl->desc; in amd_gpio_irq_init() 878 const struct pin_desc *pd = pin_desc_get(gpio_dev->pctrl, pin); in amd_gpio_irq_init() 896 const struct pin_desc *pd = pin_desc_get(gpio_dev->pctrl, pin); in amd_gpio_should_save() 915 struct pinctrl_desc *desc = gpio_dev->pctrl->desc; in amd_gpio_suspend() 936 struct pinctrl_desc *desc = gpio_dev->pctrl->desc; in amd_gpio_resume() 1021 pd = pin_desc_get(gpio_dev->pctrl, gpio_dev->groups[group].pins[ind]); in amd_set_mux() 1123 gpio_dev->pctrl = devm_pinctrl_register(&pdev->dev, &amd_pinctrl_desc, in amd_gpio_probe() 1125 if (IS_ERR(gpio_dev->pctrl)) { in amd_gpio_probe() 1127 return PTR_ERR(gpio_dev->pctrl); in amd_gpio_probe()
|
D | pinctrl-lantiq.c | 337 info->pctrl = devm_pinctrl_register(&pdev->dev, desc, info); in ltq_pinctrl_register() 338 if (IS_ERR(info->pctrl)) { in ltq_pinctrl_register() 340 return PTR_ERR(info->pctrl); in ltq_pinctrl_register()
|
/Linux-v6.1/drivers/phy/hisilicon/ |
D | phy-hi3660-usb3.c | 60 struct regmap *pctrl; member 78 ret = regmap_write(priv->pctrl, PCTRL_PERI_CTRL3, val); in hi3660_phy_init() 154 ret = regmap_write(priv->pctrl, PCTRL_PERI_CTRL3, val); in hi3660_phy_exit() 189 priv->pctrl = syscon_regmap_lookup_by_phandle(dev->of_node, in hi3660_phy_probe() 190 "hisilicon,pctrl-syscon"); in hi3660_phy_probe() 191 if (IS_ERR(priv->pctrl)) { in hi3660_phy_probe() 192 dev_err(dev, "no hisilicon,pctrl-syscon\n"); in hi3660_phy_probe() 193 return PTR_ERR(priv->pctrl); in hi3660_phy_probe()
|
D | phy-hi3670-usb3.c | 128 struct regmap *pctrl; member 355 ret = regmap_write(priv->pctrl, PCTRL_PERI_CTRL3, in hi3670_config_phy_clock() 361 ret = regmap_update_bits(priv->pctrl, in hi3670_config_phy_clock() 566 ret = regmap_write(priv->pctrl, PCTRL_PERI_CTRL3, in hi3670_phy_exit() 606 priv->pctrl = syscon_regmap_lookup_by_phandle(dev->of_node, in hi3670_phy_probe() 607 "hisilicon,pctrl-syscon"); in hi3670_phy_probe() 608 if (IS_ERR(priv->pctrl)) { in hi3670_phy_probe() 609 dev_err(dev, "no hisilicon,pctrl-syscon\n"); in hi3670_phy_probe() 610 return PTR_ERR(priv->pctrl); in hi3670_phy_probe()
|
/Linux-v6.1/Documentation/devicetree/bindings/arm/hisilicon/controller/ |
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-v6.1/Documentation/devicetree/bindings/phy/ |
D | hisilicon,hi3660-usb3.yaml | 25 hisilicon,pctrl-syscon: 36 - hisilicon,pctrl-syscon 48 hisilicon,pctrl-syscon = <&pctrl>;
|
D | hisilicon,hi3670-usb3.yaml | 26 hisilicon,pctrl-syscon: 45 - hisilicon,pctrl-syscon 59 hisilicon,pctrl-syscon = <&pctrl>;
|
/Linux-v6.1/Documentation/devicetree/bindings/clock/ |
D | hi3670-clock.txt | 12 - "hisilicon,hi3670-pctrl"
|
D | hi3660-clock.txt | 12 - "hisilicon,hi3660-pctrl"
|
/Linux-v6.1/drivers/pinctrl/mediatek/ |
D | pinctrl-moore.c | 571 err = pinctrl_generic_add_group(hw->pctrl, group->name, in mtk_build_groups() 591 err = pinmux_generic_add_function(hw->pctrl, func->name, in mtk_build_functions() 661 &hw->pctrl); in mtk_moore_pinctrl_probe() 678 err = pinctrl_enable(hw->pctrl); in mtk_moore_pinctrl_probe()
|