Home
last modified time | relevance | path

Searched +full:pctl +full:- +full:regmap (Results 1 – 25 of 39) sorted by relevance

12

/Linux-v6.1/drivers/pinctrl/
Dpinctrl-da9062.c1 // SPDX-License-Identifier: GPL-2.0
7 * - add pinmux and pinctrl support (gpio alternate mode)
10 * [1] https://www.dialog-semiconductor.com/sites/default/files/da9062_datasheet_3v6.pdf
18 #include <linux/regmap.h>
27 * the gpio is active low without a vendor specific dt-binding.
35 #define DA9062_PIN_GPO_OD 0x02 /* gpio out open-drain */
36 #define DA9062_PIN_GPO_PP 0x03 /* gpio out push-pull */
45 static int da9062_pctl_get_pin_mode(struct da9062_pctl *pctl, in da9062_pctl_get_pin_mode() argument
48 struct regmap *regmap = pctl->da9062->regmap; in da9062_pctl_get_pin_mode() local
51 ret = regmap_read(regmap, DA9062AA_GPIO_0_1 + (offset >> 1), &val); in da9062_pctl_get_pin_mode()
[all …]
Dpinctrl-sx150x.c1 // SPDX-License-Identifier: GPL-2.0-only
9 * The handling of the 4-bit chips (SX1501/SX1504/SX1507) is untested.
14 #include <linux/regmap.h>
27 #include <linux/pinctrl/pinconf-generic.h>
31 #include "pinctrl-utils.h"
103 struct regmap *regmap; member
361 return -ENOTSUPP; in sx150x_pinctrl_get_group_pins()
374 static bool sx150x_pin_is_oscio(struct sx150x_pinctrl *pctl, unsigned int pin) in sx150x_pin_is_oscio() argument
376 if (pin >= pctl->data->npins) in sx150x_pin_is_oscio()
380 if (pctl->data->model != SX150X_789) in sx150x_pin_is_oscio()
[all …]
Dpinctrl-oxnas.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Based on pinctrl-pic32.c
18 #include <linux/pinctrl/pinconf-generic.h>
23 #include <linux/regmap.h>
26 #include "pinctrl-utils.h"
32 /* OX810 Regmap Offsets */
42 /* OX820 Regmap Offsets */
88 struct regmap *regmap; member
101 struct oxnas_pinctrl *pctl; member
517 static inline struct oxnas_gpio_bank *pctl_to_bank(struct oxnas_pinctrl *pctl, in pctl_to_bank() argument
[all …]
Dpinctrl-axp209.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 2016 Maxime Ripard <maxime.ripard@free-electrons.com>
6 * Copyright (C) 2017 Quentin Schulz <quentin.schulz@free-electrons.com>
19 #include <linux/pinctrl/pinconf-generic.h>
23 #include <linux/regmap.h>
63 struct regmap *regmap; member
117 return -EINVAL; in axp20x_gpio_get_reg()
122 return pinctrl_gpio_direction_input(chip->base + offset); in axp20x_gpio_input()
127 struct axp20x_pctl *pctl = gpiochip_get_data(chip); in axp20x_gpio_get() local
131 ret = regmap_read(pctl->regmap, AXP20X_GPIO20_SS, &val); in axp20x_gpio_get()
[all …]
Dpinctrl-apple-gpio.c1 // SPDX-License-Identifier: GPL-2.0-only
8 * Based on: pinctrl-pistachio.c
13 #include <dt-bindings/pinctrl/apple.h>
24 #include <linux/regmap.h>
26 #include "pinctrl-utils.h"
35 struct regmap *map;
77 /* No locking needed to mask/unmask IRQs as the interrupt mode is per pin-register. */
78 static void apple_gpio_set_reg(struct apple_gpio_pinctrl *pctl, in apple_gpio_set_reg() argument
81 regmap_update_bits(pctl->map, REG_GPIO(pin), mask, value); in apple_gpio_set_reg()
84 static u32 apple_gpio_get_reg(struct apple_gpio_pinctrl *pctl, in apple_gpio_get_reg() argument
[all …]
Dpinctrl-rk805.c1 // SPDX-License-Identifier: GPL-2.0-or-later
7 * Author: Joseph Chen <chenjh@rock-chips.com>
9 * Based on the pinctrl-as3722 driver
24 #include <linux/pinctrl/pinconf-generic.h>
30 #include "pinctrl-utils.h"
67 struct pinctrl_dev *pctl; member
141 ret = regmap_read(pci->rk808->regmap, pci->pin_cfg[offset].reg, &val); in rk805_gpio_get()
143 dev_err(pci->dev, "get gpio%d value failed\n", offset); in rk805_gpio_get()
147 return !!(val & pci->pin_cfg[offset].val_msk); in rk805_gpio_get()
157 ret = regmap_update_bits(pci->rk808->regmap, in rk805_gpio_set()
[all …]
Dpinctrl-max77620.c1 // SPDX-License-Identifier: GPL-2.0-only
17 #include <linux/regmap.h>
20 #include <linux/pinctrl/pinconf-generic.h>
26 #include "pinctrl-utils.h"
52 .property = "maxim,active-fps-source",
55 .property = "maxim,active-fps-power-up-slot",
58 .property = "maxim,active-fps-power-down-slot",
61 .property = "maxim,suspend-fps-source",
64 .property = "maxim,suspend-fps-power-up-slot",
67 .property = "maxim,suspend-fps-power-down-slot",
[all …]
Dpinctrl-st.c1 // SPDX-License-Identifier: GPL-2.0-only
17 #include <linux/regmap.h>
95 * (direction, retime-type, retime-clk, retime-delay)
97 * +----------------+
98 *[31:28]| reserved-3 |
99 * +----------------+-------------
101 * +----------------+ v
103 * +----------------+ ^
105 * +----------------+-------------
106 *[24] | reserved-2 |
[all …]
Dpinctrl-rockchip.h1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2020-2021 Rockchip Electronics Co. Ltd.
8 * With some ideas taken from pinctrl-samsung:
14 * and pinctrl-at91:
15 * Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
241 * @offset: if initialized to -1 it will be autocalculated, by specifying
274 * @offset: if initialized to -1 it will be autocalculated, by specifying
317 struct regmap *regmap_pull;
401 int pin_num, struct regmap **regmap,
404 int pin_num, struct regmap **regmap,
[all …]
Dpinctrl-single.c29 #include <linux/pinctrl/pinconf-generic.h>
31 #include <linux/platform_data/pinctrl-single.h>
38 #define DRIVER_NAME "pinctrl-single"
42 * struct pcs_func_vals - mux function register offset and value pair
54 * struct pcs_conf_vals - pinconf parameter, pinconf register offset
71 * struct pcs_conf_type - pinconf property name, pinconf param pair
81 * struct pcs_function - pinctrl function
103 * struct pcs_gpiofunc_range - pin ranges with same mux value of gpio function
117 * struct pcs_data - wrapper for data needed by pinctrl framework
131 * struct pcs_soc_data - SoC specific settings
[all …]
/Linux-v6.1/drivers/pinctrl/mediatek/
Dpinctrl-mtk-common.c1 // SPDX-License-Identifier: GPL-2.0-only
17 #include <linux/pinctrl/pinconf-generic.h>
23 #include <linux/regmap.h>
28 #include <dt-bindings/pinctrl/mt65xx.h>
32 #include "../pinctrl-utils.h"
33 #include "mtk-eint.h"
34 #include "pinctrl-mtk-common.h"
52 static struct regmap *mtk_get_regmap(struct mtk_pinctrl *pctl, in mtk_get_regmap() argument
55 if (pin >= pctl->devdata->type1_start && pin < pctl->devdata->type1_end) in mtk_get_regmap()
56 return pctl->regmap2; in mtk_get_regmap()
[all …]
/Linux-v6.1/drivers/pinctrl/mvebu/
Dpinctrl-mvebu.c1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
22 #include <linux/regmap.h>
24 #include "pinctrl-mvebu.h"
64 *config = (readl(data->base + off) >> shift) & MVEBU_MPP_MASK; in mvebu_mmio_mpp_ctrl_get()
76 reg = readl(data->base + off) & ~(MVEBU_MPP_MASK << shift); in mvebu_mmio_mpp_ctrl_set()
77 writel(reg | (config << shift), data->base + off); in mvebu_mmio_mpp_ctrl_set()
83 struct mvebu_pinctrl *pctl, unsigned pid) in mvebu_pinctrl_find_group_by_pid() argument
86 for (n = 0; n < pctl->num_groups; n++) { in mvebu_pinctrl_find_group_by_pid()
87 if (pid >= pctl->groups[n].pins[0] && in mvebu_pinctrl_find_group_by_pid()
[all …]
Dpinctrl-armada-37xx.c6 * Gregory CLEMENT <gregory.clement@free-electrons.com>
19 #include <linux/pinctrl/pinconf-generic.h>
25 #include <linux/regmap.h>
29 #include "../pinctrl-utils.h"
99 struct regmap *regmap; member
106 struct pinctrl_desc pctl; member
234 *offset -= GPIO_PER_REG; in armada_37xx_update_reg()
242 while (*grp < info->ngroups) { in armada_37xx_find_next_grp_by_pin()
243 struct armada_37xx_pin_group *group = &info->groups[*grp]; in armada_37xx_find_next_grp_by_pin()
247 for (j = 0; j < (group->npins + group->extra_npins); j++) in armada_37xx_find_next_grp_by_pin()
[all …]
/Linux-v6.1/drivers/pinctrl/stm32/
Dpinctrl-stm32.c1 // SPDX-License-Identifier: GPL-2.0
23 #include <linux/pinctrl/pinconf-generic.h>
28 #include <linux/regmap.h>
34 #include "../pinctrl-utils.h"
35 #include "pinctrl-stm32.h"
113 struct regmap *regmap; member
148 return function - 1; in stm32_gpio_get_alt()
159 bank->pin_backup[offset] &= ~BIT(STM32_GPIO_BKP_VAL); in stm32_gpio_backup_value()
160 bank->pin_backup[offset] |= value << STM32_GPIO_BKP_VAL; in stm32_gpio_backup_value()
166 bank->pin_backup[offset] &= ~(STM32_GPIO_BKP_MODE_MASK | in stm32_gpio_backup_mode()
[all …]
/Linux-v6.1/Documentation/devicetree/bindings/pinctrl/
Dmediatek,mt65xx-pinctrl.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/pinctrl/mediatek,mt65xx-pinctrl.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Sean Wang <sean.wang@kernel.org>
18 - mediatek,mt2701-pinctrl
19 - mediatek,mt2712-pinctrl
20 - mediatek,mt6397-pinctrl
21 - mediatek,mt7623-pinctrl
22 - mediatek,mt8127-pinctrl
[all …]
/Linux-v6.1/drivers/pinctrl/ti/
Dpinctrl-ti-iodelay.c5 * Copyright (C) 2015-2017 Texas Instruments Incorporated - https://www.ti.com/
19 #include <linux/pinctrl/pinconf-generic.h>
21 #include <linux/regmap.h>
27 #define DRIVER_NAME "ti-iodelay"
30 * struct ti_iodelay_reg_data - Describes the registers for the iodelay instance
52 * @regmap_config: Regmap configuration for the IODelay region
86 * struct ti_iodelay_reg_values - Computed io_reg configuration values (see TRM)
109 * struct ti_iodelay_cfg - Description of each configuration parameters
121 * struct ti_iodelay_pingroup - Structure that describes one group
124 * @config: pinconf "Config" - currently a dummy value
[all …]
/Linux-v6.1/drivers/pinctrl/spear/
Dpinctrl-spear.c8 * - U300 Pinctl drivers
9 * - Tegra Pinctl drivers
28 #include "pinctrl-spear.h"
30 #define DRIVER_NAME "spear-pinmux"
41 val = pmx_readl(pmx, muxreg->reg); in muxregs_endisable()
42 val &= ~muxreg->mask; in muxregs_endisable()
45 temp = muxreg->val; in muxregs_endisable()
47 temp = ~muxreg->val; in muxregs_endisable()
49 val |= muxreg->mask & temp; in muxregs_endisable()
50 pmx_writel(pmx, val, muxreg->reg); in muxregs_endisable()
[all …]
Dpinctrl-spear.h18 #include <linux/regmap.h>
26 * struct spear_pmx_mode - SPEAr pmx mode
42 * struct spear_muxreg - SPEAr mux reg configuration
92 * struct spear_modemux - SPEAr mode mux configuration
104 * struct spear_pingroup - SPEAr pin group configurations
123 * struct spear_function - SPEAr pinctrl mux function
135 * struct spear_pinctrl_machdata - SPEAr pin controller machine driver
172 * struct spear_pmx - SPEAr pinctrl mux
174 * @pctl: pointer to struct pinctrl_dev
176 * @regmap: regmap of pinmux controller
[all …]
/Linux-v6.1/arch/arm/boot/dts/
Dmt8135.dtsi1 // SPDX-License-Identifier: GPL-2.0
8 #include <dt-bindings/clock/mt8135-clk.h>
9 #include <dt-bindings/interrupt-controller/irq.h>
10 #include <dt-bindings/interrupt-controller/arm-gic.h>
11 #include <dt-bindings/reset/mt8135-resets.h>
12 #include <dt-bindings/pinctrl/mt8135-pinfunc.h>
15 #address-cells = <2>;
16 #size-cells = <2>;
18 interrupt-parent = <&sysirq>;
20 cpu-map {
[all …]
/Linux-v6.1/drivers/pinctrl/freescale/
Dpinctrl-imx.c1 // SPDX-License-Identifier: GPL-2.0+
23 #include <linux/regmap.h>
28 #include "pinctrl-imx.h"
41 for (i = 0; i < pctldev->num_groups; i++) { in imx_pinctrl_find_group_by_name()
43 if (grp && !strcmp(grp->name, name)) in imx_pinctrl_find_group_by_name()
53 seq_printf(s, "%s", dev_name(pctldev->dev)); in imx_pin_dbg_show()
61 const struct imx_pinctrl_soc_info *info = ipctl->info; in imx_dt_node_to_map()
73 grp = imx_pinctrl_find_group_by_name(pctldev, np->name); in imx_dt_node_to_map()
75 dev_err(ipctl->dev, "unable to find group for node %pOFn\n", np); in imx_dt_node_to_map()
76 return -EINVAL; in imx_dt_node_to_map()
[all …]
/Linux-v6.1/drivers/pinctrl/cirrus/
Dpinctrl-lochnagar.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (c) 2017-2018 Cirrus Logic, Inc. and
17 #include <linux/regmap.h>
21 #include <linux/pinctrl/pinconf-generic.h>
27 #include <dt-bindings/pinctrl/lochnagar.h>
29 #include "../pinctrl-utils.h"
33 #define LN_CDC_AIF1_STR "codec-aif1"
34 #define LN_CDC_AIF2_STR "codec-aif2"
35 #define LN_CDC_AIF3_STR "codec-aif3"
36 #define LN_DSP_AIF1_STR "dsp-aif1"
[all …]
Dpinctrl-madera-core.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2016-2018 Cirrus Logic
12 #include <linux/regmap.h>
19 #include <linux/pinctrl/pinconf-generic.h>
24 #include "../pinctrl-utils.h"
26 #include "pinctrl-madera.h"
30 * NOTE: IDs are zero-indexed for coding convenience
76 * All single-pin functions can be mapped to any GPIO, however pinmux applies
80 * Since these do not correspond to anything in the actual hardware - they are
81 * merely an adaptation to pinctrl's view of the world - we use the same name
[all …]
/Linux-v6.1/drivers/pinctrl/bcm/
Dpinctrl-bcm281xx.c1 // SPDX-License-Identifier: GPL-2.0-only
2 // Copyright (C) 2013-2017 Broadcom
12 #include <linux/pinctrl/pinconf-generic.h>
13 #include <linux/regmap.h>
16 #include "../pinctrl-utils.h"
53 * bcm281xx_pin_type - types of pin register
67 * bcm281xx_pin_function- define pin function
76 * bcm281xx_pinctrl_data - Broadcom-specific pinctrl data
77 * @reg_base - base of pinctrl registers
89 struct regmap *regmap; member
[all …]
/Linux-v6.1/drivers/pinctrl/aspeed/
Dpinctrl-aspeed.c1 // SPDX-License-Identifier: GPL-2.0-or-later
11 #include "pinctrl-aspeed.h"
17 return pdata->pinmux.ngroups; in aspeed_pinctrl_get_groups_count()
25 return pdata->pinmux.groups[group].name; in aspeed_pinctrl_get_group_name()
34 *pins = &pdata->pinmux.groups[group].pins[0]; in aspeed_pinctrl_get_group_pins()
35 *npins = pdata->pinmux.groups[group].npins; in aspeed_pinctrl_get_group_pins()
43 seq_printf(s, " %s", dev_name(pctldev->dev)); in aspeed_pinctrl_pin_dbg_show()
50 return pdata->pinmux.nfunctions; in aspeed_pinmux_get_fn_count()
58 return pdata->pinmux.functions[function].name; in aspeed_pinmux_get_fn_name()
68 *groups = pdata->pinmux.functions[function].groups; in aspeed_pinmux_get_fn_groups()
[all …]
/Linux-v6.1/arch/arm64/boot/dts/mediatek/
Dmt8167.dtsi1 // SPDX-License-Identifier: GPL-2.0
8 #include <dt-bindings/clock/mt8167-clk.h>
9 #include <dt-bindings/memory/mt8167-larb-port.h>
10 #include <dt-bindings/power/mt8167-power.h>
12 #include "mt8167-pinfunc.h"
21 compatible = "mediatek,mt8167-topckgen", "syscon";
23 #clock-cells = <1>;
27 compatible = "mediatek,mt8167-infracfg", "syscon";
29 #clock-cells = <1>;
33 compatible = "mediatek,mt8167-apmixedsys", "syscon";
[all …]

12