Home
last modified time | relevance | path

Searched refs:gpio (Results 1 – 200 of 1870) sorted by relevance

12345678910

/linux-4.1.27/arch/mips/include/asm/mach-au1x00/
Dgpio-au1000.h43 struct gpio;
45 static inline int au1000_gpio1_to_irq(int gpio) in au1000_gpio1_to_irq() argument
47 return MAKE_IRQ(1, gpio - ALCHEMY_GPIO1_BASE); in au1000_gpio1_to_irq()
50 static inline int au1000_gpio2_to_irq(int gpio) in au1000_gpio2_to_irq() argument
63 static inline int au1500_gpio1_to_irq(int gpio) in au1500_gpio1_to_irq() argument
65 gpio -= ALCHEMY_GPIO1_BASE; in au1500_gpio1_to_irq()
67 switch (gpio) { in au1500_gpio1_to_irq()
70 case 23 ... 28: return MAKE_IRQ(1, gpio); in au1500_gpio1_to_irq()
76 static inline int au1500_gpio2_to_irq(int gpio) in au1500_gpio2_to_irq() argument
78 gpio -= ALCHEMY_GPIO2_BASE; in au1500_gpio2_to_irq()
[all …]
Dgpio-au1300.h14 struct gpio;
28 static inline int au1300_gpio_get_value(unsigned int gpio) in au1300_gpio_get_value() argument
33 gpio -= AU1300_GPIO_BASE; in au1300_gpio_get_value()
34 roff += GPIC_GPIO_BANKOFF(gpio); in au1300_gpio_get_value()
35 bit = GPIC_GPIO_TO_BIT(gpio); in au1300_gpio_get_value()
39 static inline int au1300_gpio_direction_input(unsigned int gpio) in au1300_gpio_direction_input() argument
44 gpio -= AU1300_GPIO_BASE; in au1300_gpio_direction_input()
46 roff += GPIC_GPIO_BANKOFF(gpio); in au1300_gpio_direction_input()
47 bit = GPIC_GPIO_TO_BIT(gpio); in au1300_gpio_direction_input()
54 static inline int au1300_gpio_set_value(unsigned int gpio, int v) in au1300_gpio_set_value() argument
[all …]
/linux-4.1.27/arch/m68k/include/asm/
Dmcfgpio.h23 int __mcfgpio_get_value(unsigned gpio);
24 void __mcfgpio_set_value(unsigned gpio, int value);
25 int __mcfgpio_direction_input(unsigned gpio);
26 int __mcfgpio_direction_output(unsigned gpio, int value);
27 int __mcfgpio_request(unsigned gpio);
28 void __mcfgpio_free(unsigned gpio);
31 static inline int __gpio_get_value(unsigned gpio) in __gpio_get_value() argument
33 if (gpio < MCFGPIO_PIN_MAX) in __gpio_get_value()
34 return __mcfgpio_get_value(gpio); in __gpio_get_value()
39 static inline void __gpio_set_value(unsigned gpio, int value) in __gpio_set_value() argument
[all …]
Dgpio.h30 static inline int gpio_get_value(unsigned gpio) in gpio_get_value() argument
32 if (__builtin_constant_p(gpio) && gpio < MCFGPIO_PIN_MAX) in gpio_get_value()
33 return mcfgpio_read(__mcfgpio_ppdr(gpio)) & mcfgpio_bit(gpio); in gpio_get_value()
35 return __gpio_get_value(gpio); in gpio_get_value()
38 static inline void gpio_set_value(unsigned gpio, int value) in gpio_set_value() argument
40 if (__builtin_constant_p(gpio) && gpio < MCFGPIO_PIN_MAX) { in gpio_set_value()
41 if (gpio < MCFGPIO_SCR_START) { in gpio_set_value()
46 data = mcfgpio_read(__mcfgpio_podr(gpio)); in gpio_set_value()
48 data |= mcfgpio_bit(gpio); in gpio_set_value()
50 data &= ~mcfgpio_bit(gpio); in gpio_set_value()
[all …]
/linux-4.1.27/drivers/gpio/
DMakefile13 obj-$(CONFIG_GPIO_GENERIC) += gpio-generic.o
15 obj-$(CONFIG_GPIO_74X164) += gpio-74x164.o
16 obj-$(CONFIG_GPIO_74XX_MMIO) += gpio-74xx-mmio.o
17 obj-$(CONFIG_GPIO_ADNP) += gpio-adnp.o
18 obj-$(CONFIG_GPIO_ADP5520) += gpio-adp5520.o
19 obj-$(CONFIG_GPIO_ADP5588) += gpio-adp5588.o
20 obj-$(CONFIG_GPIO_ALTERA) += gpio-altera.o
21 obj-$(CONFIG_GPIO_AMD8111) += gpio-amd8111.o
22 obj-$(CONFIG_GPIO_ARIZONA) += gpio-arizona.o
23 obj-$(CONFIG_GPIO_BCM_KONA) += gpio-bcm-kona.o
[all …]
Dgpio-dwapb.c71 struct dwapb_gpio *gpio; member
92 static inline u32 dwapb_read(struct dwapb_gpio *gpio, unsigned int offset) in dwapb_read() argument
94 struct bgpio_chip *bgc = &gpio->ports[0].bgc; in dwapb_read()
95 void __iomem *reg_base = gpio->regs; in dwapb_read()
100 static inline void dwapb_write(struct dwapb_gpio *gpio, unsigned int offset, in dwapb_write() argument
103 struct bgpio_chip *bgc = &gpio->ports[0].bgc; in dwapb_write()
104 void __iomem *reg_base = gpio->regs; in dwapb_write()
113 struct dwapb_gpio *gpio = port->gpio; in dwapb_gpio_to_irq() local
115 return irq_find_mapping(gpio->domain, offset); in dwapb_gpio_to_irq()
118 static void dwapb_toggle_trigger(struct dwapb_gpio *gpio, unsigned int offs) in dwapb_toggle_trigger() argument
[all …]
Dgpio-pcf857x.c139 struct pcf857x *gpio = container_of(chip, struct pcf857x, chip); in pcf857x_input() local
142 mutex_lock(&gpio->lock); in pcf857x_input()
143 gpio->out |= (1 << offset); in pcf857x_input()
144 status = gpio->write(gpio->client, gpio->out); in pcf857x_input()
145 mutex_unlock(&gpio->lock); in pcf857x_input()
152 struct pcf857x *gpio = container_of(chip, struct pcf857x, chip); in pcf857x_get() local
155 value = gpio->read(gpio->client); in pcf857x_get()
161 struct pcf857x *gpio = container_of(chip, struct pcf857x, chip); in pcf857x_output() local
165 mutex_lock(&gpio->lock); in pcf857x_output()
167 gpio->out |= bit; in pcf857x_output()
[all …]
Dgpio-tegra.c101 static void tegra_gpio_mask_write(u32 reg, int gpio, int value) in tegra_gpio_mask_write() argument
105 val = 0x100 << GPIO_BIT(gpio); in tegra_gpio_mask_write()
107 val |= 1 << GPIO_BIT(gpio); in tegra_gpio_mask_write()
111 static void tegra_gpio_enable(int gpio) in tegra_gpio_enable() argument
113 tegra_gpio_mask_write(GPIO_MSK_CNF(gpio), gpio, 1); in tegra_gpio_enable()
116 static void tegra_gpio_disable(int gpio) in tegra_gpio_disable() argument
118 tegra_gpio_mask_write(GPIO_MSK_CNF(gpio), gpio, 0); in tegra_gpio_disable()
182 int gpio = d->hwirq; in tegra_gpio_irq_ack() local
184 tegra_gpio_writel(1 << GPIO_BIT(gpio), GPIO_INT_CLR(gpio)); in tegra_gpio_irq_ack()
189 int gpio = d->hwirq; in tegra_gpio_irq_mask() local
[all …]
Dgpio-crystalcove.c93 static inline int to_reg(int gpio, enum ctrl_register reg_type) in to_reg() argument
97 if (gpio == 94) { in to_reg()
102 if (gpio < 8) in to_reg()
107 if (gpio < 8) in to_reg()
113 return reg + gpio % 8; in to_reg()
117 int gpio) in crystalcove_update_irq_mask() argument
119 u8 mirqs0 = gpio < 8 ? MGPIO0IRQS0 : MGPIO1IRQS0; in crystalcove_update_irq_mask()
120 int mask = BIT(gpio % 8); in crystalcove_update_irq_mask()
128 static void crystalcove_update_irq_ctrl(struct crystalcove_gpio *cg, int gpio) in crystalcove_update_irq_ctrl() argument
130 int reg = to_reg(gpio, CTRL_IN); in crystalcove_update_irq_ctrl()
[all …]
Dgpio-da9052.c66 struct da9052_gpio *gpio = to_da9052_gpio(gc); in da9052_gpio_get() local
70 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
85 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
88 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
108 struct da9052_gpio *gpio = to_da9052_gpio(gc); in da9052_gpio_set() local
112 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_set()
117 dev_err(gpio->da9052->dev, in da9052_gpio_set()
121 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_set()
126 dev_err(gpio->da9052->dev, in da9052_gpio_set()
134 struct da9052_gpio *gpio = to_da9052_gpio(gc); in da9052_gpio_direction_input() local
[all …]
Dgpio-zynq.c162 struct zynq_gpio *gpio = container_of(chip, struct zynq_gpio, chip); in zynq_gpio_get_value() local
166 data = readl_relaxed(gpio->base_addr + in zynq_gpio_get_value()
186 struct zynq_gpio *gpio = container_of(chip, struct zynq_gpio, chip); in zynq_gpio_set_value() local
206 writel_relaxed(state, gpio->base_addr + reg_offset); in zynq_gpio_set_value()
223 struct zynq_gpio *gpio = container_of(chip, struct zynq_gpio, chip); in zynq_gpio_dir_in() local
232 reg = readl_relaxed(gpio->base_addr + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); in zynq_gpio_dir_in()
234 writel_relaxed(reg, gpio->base_addr + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); in zynq_gpio_dir_in()
256 struct zynq_gpio *gpio = container_of(chip, struct zynq_gpio, chip); in zynq_gpio_dir_out() local
261 reg = readl_relaxed(gpio->base_addr + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); in zynq_gpio_dir_out()
263 writel_relaxed(reg, gpio->base_addr + ZYNQ_GPIO_DIRM_OFFSET(bank_num)); in zynq_gpio_dir_out()
[all …]
Dgpio-da9055.c45 struct da9055_gpio *gpio = to_da9055_gpio(gc); in da9055_gpio_get() local
50 ret = da9055_reg_read(gpio->da9055, (offset >> 1) + DA9055_REG_GPIO0_1); in da9055_gpio_get()
58 ret = da9055_reg_read(gpio->da9055, DA9055_REG_STATUS_B); in da9055_gpio_get()
63 ret = da9055_reg_read(gpio->da9055, DA9055_REG_GPIO_MODE0_2); in da9055_gpio_get()
74 struct da9055_gpio *gpio = to_da9055_gpio(gc); in da9055_gpio_set() local
76 da9055_reg_update(gpio->da9055, in da9055_gpio_set()
84 struct da9055_gpio *gpio = to_da9055_gpio(gc); in da9055_gpio_direction_input() local
90 return da9055_reg_update(gpio->da9055, (offset >> 1) + in da9055_gpio_direction_input()
100 struct da9055_gpio *gpio = to_da9055_gpio(gc); in da9055_gpio_direction_output() local
107 ret = da9055_reg_update(gpio->da9055, (offset >> 1) + in da9055_gpio_direction_output()
[all …]
Dgpio-mb86s7x.c52 static int mb86s70_gpio_request(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_request() argument
60 val = readl(gchip->base + PFR(gpio)); in mb86s70_gpio_request()
61 if (!(val & OFFSET(gpio))) { in mb86s70_gpio_request()
66 val &= ~OFFSET(gpio); in mb86s70_gpio_request()
67 writel(val, gchip->base + PFR(gpio)); in mb86s70_gpio_request()
74 static void mb86s70_gpio_free(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_free() argument
82 val = readl(gchip->base + PFR(gpio)); in mb86s70_gpio_free()
83 val |= OFFSET(gpio); in mb86s70_gpio_free()
84 writel(val, gchip->base + PFR(gpio)); in mb86s70_gpio_free()
89 static int mb86s70_gpio_direction_input(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_direction_input() argument
[all …]
Dgpio-msm-v2.c111 #define GPIO_INTR_CFG_SU(gpio) (msm_gpio.msm_tlmm_base + 0x0400 + \ argument
112 (0x04 * (gpio)))
113 #define GPIO_CONFIG(gpio) (msm_gpio.msm_tlmm_base + 0x1000 + \ argument
114 (0x10 * (gpio)))
115 #define GPIO_IN_OUT(gpio) (msm_gpio.msm_tlmm_base + 0x1004 + \ argument
116 (0x10 * (gpio)))
117 #define GPIO_INTR_CFG(gpio) (msm_gpio.msm_tlmm_base + 0x1008 + \ argument
118 (0x10 * (gpio)))
119 #define GPIO_INTR_STATUS(gpio) (msm_gpio.msm_tlmm_base + 0x100c + \ argument
120 (0x10 * (gpio)))
[all …]
Dgpio-mpc5200.c57 static int mpc52xx_wkup_gpio_get(struct gpio_chip *gc, unsigned int gpio) in mpc52xx_wkup_gpio_get() argument
63 ret = (in_8(&regs->wkup_ival) >> (7 - gpio)) & 1; in mpc52xx_wkup_gpio_get()
65 pr_debug("%s: gpio: %d ret: %d\n", __func__, gpio, ret); in mpc52xx_wkup_gpio_get()
71 __mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) in __mpc52xx_wkup_gpio_set() argument
79 chip->shadow_dvo |= 1 << (7 - gpio); in __mpc52xx_wkup_gpio_set()
81 chip->shadow_dvo &= ~(1 << (7 - gpio)); in __mpc52xx_wkup_gpio_set()
87 mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) in mpc52xx_wkup_gpio_set() argument
93 __mpc52xx_wkup_gpio_set(gc, gpio, val); in mpc52xx_wkup_gpio_set()
97 pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val); in mpc52xx_wkup_gpio_set()
100 static int mpc52xx_wkup_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) in mpc52xx_wkup_gpio_dir_in() argument
[all …]
Dgpio-xgene.c138 struct xgene_gpio *gpio = dev_get_drvdata(dev); in xgene_gpio_suspend() local
144 gpio->set_dr_val[bank] = ioread32(gpio->base + bank_offset); in xgene_gpio_suspend()
151 struct xgene_gpio *gpio = dev_get_drvdata(dev); in xgene_gpio_resume() local
157 iowrite32(gpio->set_dr_val[bank], gpio->base + bank_offset); in xgene_gpio_resume()
171 struct xgene_gpio *gpio; in xgene_gpio_probe() local
174 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); in xgene_gpio_probe()
175 if (!gpio) { in xgene_gpio_probe()
181 gpio->base = devm_ioremap_nocache(&pdev->dev, res->start, in xgene_gpio_probe()
183 if (!gpio->base) { in xgene_gpio_probe()
188 gpio->chip.ngpio = XGENE_MAX_GPIOS; in xgene_gpio_probe()
[all …]
Dgpio-bcm-kona.c28 #define GPIO_BANK(gpio) ((gpio) >> 5) argument
29 #define GPIO_BIT(gpio) ((gpio) & (GPIO_PER_BANK - 1)) argument
32 #define GPIO_CONTROL(gpio) (0x00000100 + ((gpio) << 2)) argument
94 unsigned gpio) in bcm_kona_gpio_lock_gpio() argument
98 int bank_id = GPIO_BANK(gpio); in bcm_kona_gpio_lock_gpio()
103 val |= BIT(gpio); in bcm_kona_gpio_lock_gpio()
110 unsigned gpio) in bcm_kona_gpio_unlock_gpio() argument
114 int bank_id = GPIO_BANK(gpio); in bcm_kona_gpio_unlock_gpio()
119 val &= ~BIT(gpio); in bcm_kona_gpio_unlock_gpio()
125 static void bcm_kona_gpio_set(struct gpio_chip *chip, unsigned gpio, int value) in bcm_kona_gpio_set() argument
[all …]
Dgpiolib-legacy.c8 void gpio_free(unsigned gpio) in gpio_free() argument
10 gpiod_free(gpio_to_desc(gpio)); in gpio_free()
20 int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) in gpio_request_one() argument
25 desc = gpio_to_desc(gpio); in gpio_request_one()
28 if (!desc && gpio_is_valid(gpio)) in gpio_request_one()
67 int gpio_request(unsigned gpio, const char *label) in gpio_request() argument
69 struct gpio_desc *desc = gpio_to_desc(gpio); in gpio_request()
72 if (!desc && gpio_is_valid(gpio)) in gpio_request()
84 int gpio_request_array(const struct gpio *array, size_t num) in gpio_request_array()
89 err = gpio_request_one(array->gpio, array->flags, array->label); in gpio_request_array()
[all …]
Dgpio-dln2.c52 struct gpio_chip gpio; member
156 struct dln2_gpio *dln2 = container_of(chip, struct dln2_gpio, gpio); in dln2_gpio_request()
197 struct dln2_gpio *dln2 = container_of(chip, struct dln2_gpio, gpio); in dln2_gpio_free()
204 struct dln2_gpio *dln2 = container_of(chip, struct dln2_gpio, gpio); in dln2_gpio_get_direction()
214 struct dln2_gpio *dln2 = container_of(chip, struct dln2_gpio, gpio); in dln2_gpio_get()
229 struct dln2_gpio *dln2 = container_of(chip, struct dln2_gpio, gpio); in dln2_gpio_set()
237 struct dln2_gpio *dln2 = container_of(chip, struct dln2_gpio, gpio); in dln2_gpio_set_direction()
265 struct dln2_gpio *dln2 = container_of(chip, struct dln2_gpio, gpio); in dln2_gpio_direction_output()
278 struct dln2_gpio *dln2 = container_of(chip, struct dln2_gpio, gpio); in dln2_gpio_set_debounce()
305 struct dln2_gpio *dln2 = container_of(gc, struct dln2_gpio, gpio); in dln2_irq_unmask()
[all …]
Dgpio-xilinx.c57 static inline int xgpio_index(struct xgpio_instance *chip, int gpio) in xgpio_index() argument
59 if (gpio >= chip->gpio_width[0]) in xgpio_index()
65 static inline int xgpio_regoffset(struct xgpio_instance *chip, int gpio) in xgpio_regoffset() argument
67 if (xgpio_index(chip, gpio)) in xgpio_regoffset()
73 static inline int xgpio_offset(struct xgpio_instance *chip, int gpio) in xgpio_offset() argument
75 if (xgpio_index(chip, gpio)) in xgpio_offset()
76 return gpio - chip->gpio_width[0]; in xgpio_offset()
78 return gpio; in xgpio_offset()
92 static int xgpio_get(struct gpio_chip *gc, unsigned int gpio) in xgpio_get() argument
100 xgpio_regoffset(chip, gpio)); in xgpio_get()
[all …]
Dgpio-kempld.c68 struct kempld_gpio_data *gpio in kempld_gpio_get() local
70 struct kempld_device_data *pld = gpio->pld; in kempld_gpio_get()
77 struct kempld_gpio_data *gpio in kempld_gpio_set() local
79 struct kempld_device_data *pld = gpio->pld; in kempld_gpio_set()
88 struct kempld_gpio_data *gpio in kempld_gpio_direction_input() local
90 struct kempld_device_data *pld = gpio->pld; in kempld_gpio_direction_input()
102 struct kempld_gpio_data *gpio in kempld_gpio_direction_output() local
104 struct kempld_device_data *pld = gpio->pld; in kempld_gpio_direction_output()
116 struct kempld_gpio_data *gpio in kempld_gpio_get_direction() local
118 struct kempld_device_data *pld = gpio->pld; in kempld_gpio_get_direction()
[all …]
Dgpio-pxa.c80 int (*set_wake)(unsigned int gpio, unsigned int on);
159 static inline struct pxa_gpio_chip *gpio_to_pxachip(unsigned gpio) in gpio_to_pxachip() argument
161 return &pxa_gpio_chips[gpio_to_bank(gpio)]; in gpio_to_pxachip()
177 static inline int __gpio_is_inverted(int gpio) in __gpio_is_inverted() argument
179 if ((gpio_type == PXA26X_GPIO) && (gpio > 85)) in __gpio_is_inverted()
190 static inline int __gpio_is_occupied(unsigned gpio) in __gpio_is_occupied() argument
197 pxachip = gpio_to_pxachip(gpio); in __gpio_is_occupied()
206 af = (gafr >> ((gpio & 0xf) * 2)) & 0x3; in __gpio_is_occupied()
207 dir = gpdr & GPIO_bit(gpio); in __gpio_is_occupied()
209 if (__gpio_is_inverted(gpio)) in __gpio_is_occupied()
[all …]
Dgpio-janz-ttl.c48 struct gpio_chip gpio; member
60 static int ttl_get_value(struct gpio_chip *gpio, unsigned offset) in ttl_get_value() argument
62 struct ttl_module *mod = dev_get_drvdata(gpio->dev); in ttl_get_value()
82 static void ttl_set_value(struct gpio_chip *gpio, unsigned offset, int value) in ttl_set_value() argument
84 struct ttl_module *mod = dev_get_drvdata(gpio->dev); in ttl_set_value()
148 struct gpio_chip *gpio; in ttl_probe() local
174 gpio = &mod->gpio; in ttl_probe()
175 gpio->dev = &pdev->dev; in ttl_probe()
176 gpio->label = pdev->name; in ttl_probe()
177 gpio->get = ttl_get_value; in ttl_probe()
[all …]
Dgpio-ucb1400.c17 struct ucb1400_gpio *gpio; in ucb1400_gpio_dir_in() local
18 gpio = container_of(gc, struct ucb1400_gpio, gc); in ucb1400_gpio_dir_in()
19 ucb1400_gpio_set_direction(gpio->ac97, off, 0); in ucb1400_gpio_dir_in()
25 struct ucb1400_gpio *gpio; in ucb1400_gpio_dir_out() local
26 gpio = container_of(gc, struct ucb1400_gpio, gc); in ucb1400_gpio_dir_out()
27 ucb1400_gpio_set_direction(gpio->ac97, off, 1); in ucb1400_gpio_dir_out()
28 ucb1400_gpio_set_value(gpio->ac97, off, val); in ucb1400_gpio_dir_out()
34 struct ucb1400_gpio *gpio; in ucb1400_gpio_get() local
35 gpio = container_of(gc, struct ucb1400_gpio, gc); in ucb1400_gpio_get()
36 return ucb1400_gpio_get_value(gpio->ac97, off); in ucb1400_gpio_get()
[all …]
Dgpio-viperboard.c91 struct vprbrd_gpio *gpio = in vprbrd_gpioa_get() local
93 struct vprbrd *vb = gpio->vb; in vprbrd_gpioa_get()
97 if (gpio->gpioa_out & (1 << offset)) in vprbrd_gpioa_get()
98 return gpio->gpioa_val & (1 << offset); in vprbrd_gpioa_get()
142 struct vprbrd_gpio *gpio = in vprbrd_gpioa_set() local
144 struct vprbrd *vb = gpio->vb; in vprbrd_gpioa_set()
147 if (gpio->gpioa_out & (1 << offset)) { in vprbrd_gpioa_set()
149 gpio->gpioa_val |= (1 << offset); in vprbrd_gpioa_set()
151 gpio->gpioa_val &= ~(1 << offset); in vprbrd_gpioa_set()
184 struct vprbrd_gpio *gpio = in vprbrd_gpioa_direction_input() local
[all …]
Dgpio-octeon.c44 struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); in octeon_gpio_dir_in() local
46 cvmx_write_csr(gpio->register_base + bit_cfg_reg(offset), 0); in octeon_gpio_dir_in()
52 struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); in octeon_gpio_set() local
54 u64 reg = gpio->register_base + (value ? TX_SET : TX_CLEAR); in octeon_gpio_set()
61 struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); in octeon_gpio_dir_out() local
69 cvmx_write_csr(gpio->register_base + bit_cfg_reg(offset), cfgx.u64); in octeon_gpio_dir_out()
75 struct octeon_gpio *gpio = container_of(chip, struct octeon_gpio, chip); in octeon_gpio_get() local
76 u64 read_bits = cvmx_read_csr(gpio->register_base + RX_DAT); in octeon_gpio_get()
83 struct octeon_gpio *gpio; in octeon_gpio_probe() local
88 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); in octeon_gpio_probe()
[all …]
Dgpio-rdc321x.c44 static int rdc_gpio_get_value(struct gpio_chip *chip, unsigned gpio) in rdc_gpio_get_value() argument
51 reg = gpio < 32 ? gpch->reg1_data_base : gpch->reg2_data_base; in rdc_gpio_get_value()
55 gpch->data_reg[gpio < 32 ? 0 : 1]); in rdc_gpio_get_value()
59 return (1 << (gpio & 0x1f)) & value ? 1 : 0; in rdc_gpio_get_value()
63 unsigned gpio, int value) in rdc_gpio_set_value_impl() argument
66 int reg = (gpio < 32) ? 0 : 1; in rdc_gpio_set_value_impl()
71 gpch->data_reg[reg] |= 1 << (gpio & 0x1f); in rdc_gpio_set_value_impl()
73 gpch->data_reg[reg] &= ~(1 << (gpio & 0x1f)); in rdc_gpio_set_value_impl()
82 unsigned gpio, int value) in rdc_gpio_set_value() argument
88 rdc_gpio_set_value_impl(chip, gpio, value); in rdc_gpio_set_value()
[all …]
Dgpio-sta2x11.c55 struct gpio_chip gpio; member
75 static void gsta_gpio_set(struct gpio_chip *gpio, unsigned nr, int val) in gsta_gpio_set() argument
77 struct gsta_gpio *chip = container_of(gpio, struct gsta_gpio, gpio); in gsta_gpio_set()
87 static int gsta_gpio_get(struct gpio_chip *gpio, unsigned nr) in gsta_gpio_get() argument
89 struct gsta_gpio *chip = container_of(gpio, struct gsta_gpio, gpio); in gsta_gpio_get()
96 static int gsta_gpio_direction_output(struct gpio_chip *gpio, unsigned nr, in gsta_gpio_direction_output() argument
99 struct gsta_gpio *chip = container_of(gpio, struct gsta_gpio, gpio); in gsta_gpio_direction_output()
112 static int gsta_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) in gsta_gpio_direction_input() argument
114 struct gsta_gpio *chip = container_of(gpio, struct gsta_gpio, gpio); in gsta_gpio_direction_input()
122 static int gsta_gpio_to_irq(struct gpio_chip *gpio, unsigned offset) in gsta_gpio_to_irq() argument
[all …]
Dgpio-pch.c102 struct gpio_chip gpio; member
109 static void pch_gpio_set(struct gpio_chip *gpio, unsigned nr, int val) in pch_gpio_set() argument
112 struct pch_gpio *chip = container_of(gpio, struct pch_gpio, gpio); in pch_gpio_set()
126 static int pch_gpio_get(struct gpio_chip *gpio, unsigned nr) in pch_gpio_get() argument
128 struct pch_gpio *chip = container_of(gpio, struct pch_gpio, gpio); in pch_gpio_get()
133 static int pch_gpio_direction_output(struct gpio_chip *gpio, unsigned nr, in pch_gpio_direction_output() argument
136 struct pch_gpio *chip = container_of(gpio, struct pch_gpio, gpio); in pch_gpio_direction_output()
159 static int pch_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) in pch_gpio_direction_input() argument
161 struct pch_gpio *chip = container_of(gpio, struct pch_gpio, gpio); in pch_gpio_direction_input()
212 static int pch_gpio_to_irq(struct gpio_chip *gpio, unsigned offset) in pch_gpio_to_irq() argument
[all …]
Dgpio-vx855.c51 struct gpio_chip gpio; member
96 static int vx855gpio_direction_input(struct gpio_chip *gpio, in vx855gpio_direction_input() argument
99 struct vx855_gpio *vg = container_of(gpio, struct vx855_gpio, gpio); in vx855gpio_direction_input()
121 static int vx855gpio_get(struct gpio_chip *gpio, unsigned int nr) in vx855gpio_get() argument
123 struct vx855_gpio *vg = container_of(gpio, struct vx855_gpio, gpio); in vx855gpio_get()
146 static void vx855gpio_set(struct gpio_chip *gpio, unsigned int nr, in vx855gpio_set() argument
149 struct vx855_gpio *vg = container_of(gpio, struct vx855_gpio, gpio); in vx855gpio_set()
174 static int vx855gpio_direction_output(struct gpio_chip *gpio, in vx855gpio_direction_output() argument
184 vx855gpio_set(gpio, nr, val); in vx855gpio_direction_output()
204 struct gpio_chip *c = &vg->gpio; in vx855gpio_gpio_setup()
[all …]
Dgpio-loongson.c37 static int loongson_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) in loongson_gpio_direction_input() argument
43 mask = 1 << gpio; in loongson_gpio_direction_input()
53 unsigned gpio, int level) in loongson_gpio_direction_output() argument
58 gpio_set_value(gpio, level); in loongson_gpio_direction_output()
60 mask = 1 << gpio; in loongson_gpio_direction_output()
69 static int loongson_gpio_get_value(struct gpio_chip *chip, unsigned gpio) in loongson_gpio_get_value() argument
74 mask = 1 << (gpio + LOONGSON_GPIO_IN_OFFSET); in loongson_gpio_get_value()
83 unsigned gpio, int value) in loongson_gpio_set_value() argument
88 mask = 1 << gpio; in loongson_gpio_set_value()
Dgpio-timberdale.c48 struct gpio_chip gpio; member
53 static int timbgpio_update_bit(struct gpio_chip *gpio, unsigned index, in timbgpio_update_bit() argument
56 struct timbgpio *tgpio = container_of(gpio, struct timbgpio, gpio); in timbgpio_update_bit()
73 static int timbgpio_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) in timbgpio_gpio_direction_input() argument
75 return timbgpio_update_bit(gpio, nr, TGPIODIR, true); in timbgpio_gpio_direction_input()
78 static int timbgpio_gpio_get(struct gpio_chip *gpio, unsigned nr) in timbgpio_gpio_get() argument
80 struct timbgpio *tgpio = container_of(gpio, struct timbgpio, gpio); in timbgpio_gpio_get()
87 static int timbgpio_gpio_direction_output(struct gpio_chip *gpio, in timbgpio_gpio_direction_output() argument
90 return timbgpio_update_bit(gpio, nr, TGPIODIR, false); in timbgpio_gpio_direction_output()
93 static void timbgpio_gpio_set(struct gpio_chip *gpio, in timbgpio_gpio_set() argument
[all …]
Dgpio-sch.c46 static unsigned sch_gpio_offset(struct sch_gpio *sch, unsigned gpio, in sch_gpio_offset() argument
51 if (gpio >= sch->resume_base) { in sch_gpio_offset()
52 gpio -= sch->resume_base; in sch_gpio_offset()
56 return base + reg + gpio / 8; in sch_gpio_offset()
59 static unsigned sch_gpio_bit(struct sch_gpio *sch, unsigned gpio) in sch_gpio_bit() argument
61 if (gpio >= sch->resume_base) in sch_gpio_bit()
62 gpio -= sch->resume_base; in sch_gpio_bit()
63 return gpio % 8; in sch_gpio_bit()
66 static int sch_gpio_reg_get(struct gpio_chip *gc, unsigned gpio, unsigned reg) in sch_gpio_reg_get() argument
72 offset = sch_gpio_offset(sch, gpio, reg); in sch_gpio_reg_get()
[all …]
Dgpio-bt8xx.c64 struct gpio_chip gpio; member
81 static int bt8xxgpio_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) in bt8xxgpio_gpio_direction_input() argument
83 struct bt8xxgpio *bg = container_of(gpio, struct bt8xxgpio, gpio); in bt8xxgpio_gpio_direction_input()
102 static int bt8xxgpio_gpio_get(struct gpio_chip *gpio, unsigned nr) in bt8xxgpio_gpio_get() argument
104 struct bt8xxgpio *bg = container_of(gpio, struct bt8xxgpio, gpio); in bt8xxgpio_gpio_get()
115 static int bt8xxgpio_gpio_direction_output(struct gpio_chip *gpio, in bt8xxgpio_gpio_direction_output() argument
118 struct bt8xxgpio *bg = container_of(gpio, struct bt8xxgpio, gpio); in bt8xxgpio_gpio_direction_output()
140 static void bt8xxgpio_gpio_set(struct gpio_chip *gpio, in bt8xxgpio_gpio_set() argument
143 struct bt8xxgpio *bg = container_of(gpio, struct bt8xxgpio, gpio); in bt8xxgpio_gpio_set()
161 struct gpio_chip *c = &bg->gpio; in bt8xxgpio_gpio_setup()
[all …]
Ddevres.c33 struct gpio_desc **this = res, **gpio = data; in devm_gpiod_match() local
35 return *this == *gpio; in devm_gpiod_match()
297 unsigned *gpio = res; in devm_gpio_release() local
299 gpio_free(*gpio); in devm_gpio_release()
304 unsigned *this = res, *gpio = data; in devm_gpio_match() local
306 return *this == *gpio; in devm_gpio_match()
324 int devm_gpio_request(struct device *dev, unsigned gpio, const char *label) in devm_gpio_request() argument
333 rc = gpio_request(gpio, label); in devm_gpio_request()
339 *dr = gpio; in devm_gpio_request()
353 int devm_gpio_request_one(struct device *dev, unsigned gpio, in devm_gpio_request_one() argument
[all …]
Dgpio-iop.c75 static int iop3xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) in iop3xx_gpio_direction_input() argument
77 gpio_line_config(gpio, GPIO_IN); in iop3xx_gpio_direction_input()
81 static int iop3xx_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int level) in iop3xx_gpio_direction_output() argument
83 gpio_line_set(gpio, level); in iop3xx_gpio_direction_output()
84 gpio_line_config(gpio, GPIO_OUT); in iop3xx_gpio_direction_output()
88 static int iop3xx_gpio_get_value(struct gpio_chip *chip, unsigned gpio) in iop3xx_gpio_get_value() argument
90 return gpio_line_get(gpio); in iop3xx_gpio_get_value()
93 static void iop3xx_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value) in iop3xx_gpio_set_value() argument
95 gpio_line_set(gpio, value); in iop3xx_gpio_set_value()
Dgpio-ml-ioh.c96 struct gpio_chip gpio; member
106 static void ioh_gpio_set(struct gpio_chip *gpio, unsigned nr, int val) in ioh_gpio_set() argument
109 struct ioh_gpio *chip = container_of(gpio, struct ioh_gpio, gpio); in ioh_gpio_set()
123 static int ioh_gpio_get(struct gpio_chip *gpio, unsigned nr) in ioh_gpio_get() argument
125 struct ioh_gpio *chip = container_of(gpio, struct ioh_gpio, gpio); in ioh_gpio_get()
130 static int ioh_gpio_direction_output(struct gpio_chip *gpio, unsigned nr, in ioh_gpio_direction_output() argument
133 struct ioh_gpio *chip = container_of(gpio, struct ioh_gpio, gpio); in ioh_gpio_direction_output()
156 static int ioh_gpio_direction_input(struct gpio_chip *gpio, unsigned nr) in ioh_gpio_direction_input() argument
158 struct ioh_gpio *chip = container_of(gpio, struct ioh_gpio, gpio); in ioh_gpio_direction_input()
226 static int ioh_gpio_to_irq(struct gpio_chip *gpio, unsigned offset) in ioh_gpio_to_irq() argument
[all …]
/linux-4.1.27/arch/mips/include/asm/mach-pmcs-msp71xx/
Dmsp_gpio_macros.h130 #define OFFSET_GPIO_NUMBER(gpio) (gpio - MSP_GPIO_OFFSET[gpio]) argument
143 #define BASIC_DATA_MASK(gpio) \ argument
144 BASIC_DATA_REG_MASK(OFFSET_GPIO_NUMBER(gpio))
145 #define BASIC_MODE_MASK(gpio) \ argument
146 BASIC_MODE_REG_MASK(OFFSET_GPIO_NUMBER(gpio))
147 #define BASIC_MODE(mode, gpio) \ argument
148 BASIC_MODE_REG_VALUE(mode, OFFSET_GPIO_NUMBER(gpio))
149 #define BASIC_MODE_SHIFT(gpio) \ argument
150 BASIC_MODE_REG_SHIFT(OFFSET_GPIO_NUMBER(gpio))
151 #define BASIC_MODE_FROM_REG(data, gpio) \ argument
[all …]
/linux-4.1.27/include/asm-generic/
Dgpio.h47 struct gpio;
54 static inline struct gpio_chip *gpio_to_chip(unsigned gpio) in gpio_to_chip() argument
56 return gpiod_to_chip(gpio_to_desc(gpio)); in gpio_to_chip()
62 extern int gpio_request(unsigned gpio, const char *label);
63 extern void gpio_free(unsigned gpio);
65 static inline int gpio_direction_input(unsigned gpio) in gpio_direction_input() argument
67 return gpiod_direction_input(gpio_to_desc(gpio)); in gpio_direction_input()
69 static inline int gpio_direction_output(unsigned gpio, int value) in gpio_direction_output() argument
71 return gpiod_direction_output_raw(gpio_to_desc(gpio), value); in gpio_direction_output()
74 static inline int gpio_set_debounce(unsigned gpio, unsigned debounce) in gpio_set_debounce() argument
[all …]
/linux-4.1.27/drivers/ssb/
Ddriver_gpio.c27 return container_of(chip, struct ssb_bus, gpio); in ssb_gpio_get_bus()
31 static int ssb_gpio_to_irq(struct gpio_chip *chip, unsigned gpio) in ssb_gpio_to_irq() argument
36 return irq_find_mapping(bus->irq_domain, gpio); in ssb_gpio_to_irq()
46 static int ssb_gpio_chipco_get_value(struct gpio_chip *chip, unsigned gpio) in ssb_gpio_chipco_get_value() argument
50 return !!ssb_chipco_gpio_in(&bus->chipco, 1 << gpio); in ssb_gpio_chipco_get_value()
53 static void ssb_gpio_chipco_set_value(struct gpio_chip *chip, unsigned gpio, in ssb_gpio_chipco_set_value() argument
58 ssb_chipco_gpio_out(&bus->chipco, 1 << gpio, value ? 1 << gpio : 0); in ssb_gpio_chipco_set_value()
62 unsigned gpio) in ssb_gpio_chipco_direction_input() argument
66 ssb_chipco_gpio_outen(&bus->chipco, 1 << gpio, 0); in ssb_gpio_chipco_direction_input()
71 unsigned gpio, int value) in ssb_gpio_chipco_direction_output() argument
[all …]
/linux-4.1.27/Documentation/devicetree/bindings/pinctrl/
Dmarvell,armada-375-pinctrl.txt16 mpp0 0 gpio, dev(ad2), spi0(cs1), spi1(cs1)
17 mpp1 1 gpio, dev(ad3), spi0(mosi), spi1(mosi)
18 mpp2 2 gpio, dev(ad4), ptp(eventreq), led(c0), audio(sdi)
19 mpp3 3 gpio, dev(ad5), ptp(triggen), led(p3), audio(mclk)
20 mpp4 4 gpio, dev(ad6), spi0(miso), spi1(miso)
21 mpp5 5 gpio, dev(ad7), spi0(cs2), spi1(cs2)
22 mpp6 6 gpio, dev(ad0), led(p1), audio(rclk)
23 mpp7 7 gpio, dev(ad1), ptp(clk), led(p2), audio(extclk)
24 mpp8 8 gpio, dev (bootcs), spi0(cs0), spi1(cs0)
25 mpp9 9 gpio, spi0(sck), spi1(sck), nand(we)
[all …]
Dmarvell,armada-xp-pinctrl.txt21 mpp0 0 gpio, ge0(txclko), lcd(d0)
22 mpp1 1 gpio, ge0(txd0), lcd(d1)
23 mpp2 2 gpio, ge0(txd1), lcd(d2)
24 mpp3 3 gpio, ge0(txd2), lcd(d3)
25 mpp4 4 gpio, ge0(txd3), lcd(d4)
26 mpp5 5 gpio, ge0(txctl), lcd(d5)
27 mpp6 6 gpio, ge0(rxd0), lcd(d6)
28 mpp7 7 gpio, ge0(rxd1), lcd(d7)
29 mpp8 8 gpio, ge0(rxd2), lcd(d8)
30 mpp9 9 gpio, ge0(rxd3), lcd(d9)
[all …]
Dmarvell,orion-pinctrl.txt22 mpp0 0 pcie(rstout), pci(req2), gpio
23 mpp1 1 gpio, pci(gnt2)
24 mpp2 2 gpio, pci(req3), pci-1(pme)
25 mpp3 3 gpio, pci(gnt3)
26 mpp4 4 gpio, pci(req4)
27 mpp5 5 gpio, pci(gnt4)
28 mpp6 6 gpio, pci(req5), pci-1(clk)
29 mpp7 7 gpio, pci(gnt5), pci-1(clk)
30 mpp8 8 gpio, ge(col)
31 mpp9 9 gpio, ge(rxerr)
[all …]
Dmarvell,armada-39x-pinctrl.txt17 mpp0 0 gpio, ua0(rxd)
18 mpp1 1 gpio, ua0(txd)
19 mpp2 2 gpio, i2c0(sck)
20 mpp3 3 gpio, i2c0(sda)
21 mpp4 4 gpio, ua1(txd), ua0(rts), smi(mdc)
22 mpp5 5 gpio, ua1(rxd), ua0(cts), smi(mdio)
23 mpp6 6 gpio, dev(cs3), xsmi(mdio)
24 mpp7 7 gpio, dev(ad9), xsmi(mdc)
25 mpp8 8 gpio, dev(ad10), ptp(trig)
26 mpp9 9 gpio, dev(ad11), ptp(clk)
[all …]
Dmarvell,kirkwood-pinctrl.txt24 mpp0 0 gpio, nand(io2), spi(cs)
28 mpp4 4 gpio, nand(io6), uart0(rxd), ptp(clk)
32 mpp8 8 gpio, twsi0(sda), uart0(rts), uart1(rts), ptp(clk),
34 mpp9 9 gpio, twsi(sck), uart0(cts), uart1(cts), ptp(evreq),
37 mpp11 11 gpio, spi(miso), uart0(rxd), ptp(clk), ptp-1(evreq),
40 mpp13 13 gpio, sdio(cmd), uart1(txd)
41 mpp14 14 gpio, sdio(d0), uart1(rxd), mii(col)
42 mpp15 15 gpio, sdio(d1), uart0(rts), uart1(txd)
43 mpp16 16 gpio, sdio(d2), uart0(cts), uart1(rxd), mii(crs)
44 mpp17 17 gpio, sdio(d3)
[all …]
Dmarvell,armada-38x-pinctrl.txt18 mpp0 0 gpio, ua0(rxd)
19 mpp1 1 gpio, ua0(txd)
20 mpp2 2 gpio, i2c0(sck)
21 mpp3 3 gpio, i2c0(sda)
22 mpp4 4 gpio, ge(mdc), ua1(txd), ua0(rts)
23 mpp5 5 gpio, ge(mdio), ua1(rxd), ua0(cts)
24 mpp6 6 gpio, ge0(txclkout), ge0(crs), dev(cs3)
25 mpp7 7 gpio, ge0(txd0), dev(ad9)
26 mpp8 8 gpio, ge0(txd1), dev(ad10)
27 mpp9 9 gpio, ge0(txd2), dev(ad11)
[all …]
Dmarvell,armada-370-pinctrl.txt16 mpp0 0 gpio, uart0(rxd)
18 mpp2 2 gpio, i2c0(sck), uart0(txd)
19 mpp3 3 gpio, i2c0(sda), uart0(rxd)
20 mpp4 4 gpio, cpu_pd(vdd)
22 mpp6 6 gpio, ge0(txd0), sata0(prsnt), tdm(rst), audio(sdo)
24 mpp8 8 gpio, ge0(txd2), uart0(rts), tdm(drx), audio(bclk)
26 mpp10 10 gpio, ge0(txctl), uart0(cts), tdm(fsync), audio(sdi)
27 mpp11 11 gpio, ge0(rxd0), uart1(rxd), sd0(cmd), spi0(cs1),
29 mpp12 12 gpio, ge0(rxd1), i2c1(sda), sd0(d0), spi1(cs0),
31 mpp13 13 gpio, ge0(rxd2), i2c1(sck), sd0(d1), tdm(pclk),
[all …]
Dmarvell,dove-pinctrl.txt18 mpp0 0 gpio, pmu, uart2(rts), sdio0(cd), lcd0(pwm), pmu*
19 mpp1 1 gpio, pmu, uart2(cts), sdio0(wp), lcd1(pwm), pmu*
20 mpp2 2 gpio, pmu, uart2(txd), sdio0(buspwr), sata(prsnt),
22 mpp3 3 gpio, pmu, uart2(rxd), sdio0(ledctrl), sata(act),
24 mpp4 4 gpio, pmu, uart3(rts), sdio1(cd), spi1(miso), pmu*
25 mpp5 5 gpio, pmu, uart3(cts), sdio1(wp), spi1(cs), pmu*
26 mpp6 6 gpio, pmu, uart3(txd), sdio1(buspwr), spi1(mosi), pmu*
27 mpp7 7 gpio, pmu, uart3(rxd), sdio1(ledctrl), spi1(sck), pmu*
28 mpp8 8 gpio, pmu, watchdog(rstout), pmu*
29 mpp9 9 gpio, pmu, pex1(clkreq), pmu*
[all …]
Dbrcm,cygnus-gpio.txt6 Must be "brcm,cygnus-ccm-gpio", "brcm,cygnus-asiu-gpio", or
7 "brcm,cygnus-crmu-gpio"
13 - #gpio-cells:
18 - gpio-controller:
37 in the node apply to. Pin names are "gpio-<pin>"
52 gpio_ccm: gpio@1800a000 {
53 compatible = "brcm,cygnus-ccm-gpio";
56 #gpio-cells = <2>;
57 gpio-controller;
63 pins = "gpio-0";
[all …]
/linux-4.1.27/arch/blackfin/kernel/
Dbfin_gpio.c59 # error no gpio arrays defined
112 static void gpio_error(unsigned gpio) in gpio_error() argument
114 printk(KERN_ERR "bfin-gpio: GPIO %d wasn't requested!\n", gpio); in gpio_error()
150 DECLARE_RESERVED_MAP(gpio, GPIO_BANK_NUM);
154 inline int check_gpio(unsigned gpio) in check_gpio() argument
156 if (gpio >= MAX_BLACKFIN_GPIOS) in check_gpio()
161 static void port_setup(unsigned gpio, unsigned short usage) in port_setup() argument
171 if (gpio < MAX_BLACKFIN_GPIOS || gpio >= MAX_RESOURCES) in port_setup()
174 gpio -= MAX_BLACKFIN_GPIOS; in port_setup()
177 *port_fer[gpio_bank(gpio)] |= gpio_bit(gpio); in port_setup()
[all …]
/linux-4.1.27/arch/arc/boot/dts/
Dabilis_tb101.dtsi51 pctl_gpio_a: pctl-gpio-a { /* GPIO bank A */
64 pctl_gpio_c: pctl-gpio-c { /* GPIO bank C */
77 pctl_gpio_e: pctl-gpio-e { /* GPIO bank E */
90 pctl_gpio_g: pctl-gpio-g { /* GPIO bank G */
97 pctl_gpio_j: pctl-gpio-j { /* GPIO bank J */
100 pctl_gpio_k: pctl-gpio-k { /* GPIO bank K */
138 pctl_gpio_l: pctl-gpio-l { /* GPIO bank L */
141 pctl_gpio_m: pctl-gpio-m { /* GPIO bank M */
155 pctl_gpio_n: pctl-gpio-n {
159 pctl_gpio_b: pctl-gpio-b {
[all …]
Dabilis_tb100.dtsi51 pctl_gpio_a: pctl-gpio-a { /* GPIO bank A */
64 pctl_gpio_c: pctl-gpio-c { /* GPIO bank C */
77 pctl_gpio_e: pctl-gpio-e { /* GPIO bank E */
90 pctl_gpio_g: pctl-gpio-g { /* GPIO bank G */
97 pctl_gpio_j: pctl-gpio-j { /* GPIO bank J */
100 pctl_gpio_k: pctl-gpio-k { /* GPIO bank K */
132 pctl_gpio_l: pctl-gpio-l { /* GPIO bank L */
135 pctl_gpio_m: pctl-gpio-m { /* GPIO bank M */
146 pctl_gpio_n: pctl-gpio-n {
150 pctl_gpio_b: pctl-gpio-b {
[all …]
/linux-4.1.27/drivers/bcma/
Ddriver_gpio.c24 return container_of(chip, struct bcma_drv_cc, gpio); in bcma_gpio_get_cc()
27 static int bcma_gpio_get_value(struct gpio_chip *chip, unsigned gpio) in bcma_gpio_get_value() argument
31 return !!bcma_chipco_gpio_in(cc, 1 << gpio); in bcma_gpio_get_value()
34 static void bcma_gpio_set_value(struct gpio_chip *chip, unsigned gpio, in bcma_gpio_set_value() argument
39 bcma_chipco_gpio_out(cc, 1 << gpio, value ? 1 << gpio : 0); in bcma_gpio_set_value()
42 static int bcma_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) in bcma_gpio_direction_input() argument
46 bcma_chipco_gpio_outen(cc, 1 << gpio, 0); in bcma_gpio_direction_input()
50 static int bcma_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, in bcma_gpio_direction_output() argument
55 bcma_chipco_gpio_outen(cc, 1 << gpio, 1 << gpio); in bcma_gpio_direction_output()
56 bcma_chipco_gpio_out(cc, 1 << gpio, value ? 1 << gpio : 0); in bcma_gpio_direction_output()
[all …]
/linux-4.1.27/include/linux/
Dgpio.h39 struct gpio { struct
40 unsigned gpio; argument
53 static inline int gpio_get_value(unsigned int gpio) in gpio_get_value() argument
55 return __gpio_get_value(gpio); in gpio_get_value()
58 static inline void gpio_set_value(unsigned int gpio, int value) in gpio_set_value() argument
60 __gpio_set_value(gpio, value); in gpio_set_value()
63 static inline int gpio_cansleep(unsigned int gpio) in gpio_cansleep() argument
65 return __gpio_cansleep(gpio); in gpio_cansleep()
68 static inline int gpio_to_irq(unsigned int gpio) in gpio_to_irq() argument
70 return __gpio_to_irq(gpio); in gpio_to_irq()
[all …]
Ducb1400.h125 static inline u16 ucb1400_gpio_get_value(struct snd_ac97 *ac97, u16 gpio) in ucb1400_gpio_get_value() argument
127 return ucb1400_reg_read(ac97, UCB_IO_DATA) & (1 << gpio); in ucb1400_gpio_get_value()
130 static inline void ucb1400_gpio_set_value(struct snd_ac97 *ac97, u16 gpio, in ucb1400_gpio_set_value() argument
134 ucb1400_reg_read(ac97, UCB_IO_DATA) | (1 << gpio) : in ucb1400_gpio_set_value()
135 ucb1400_reg_read(ac97, UCB_IO_DATA) & ~(1 << gpio)); in ucb1400_gpio_set_value()
138 static inline u16 ucb1400_gpio_get_direction(struct snd_ac97 *ac97, u16 gpio) in ucb1400_gpio_get_direction() argument
140 return ucb1400_reg_read(ac97, UCB_IO_DIR) & (1 << gpio); in ucb1400_gpio_get_direction()
143 static inline void ucb1400_gpio_set_direction(struct snd_ac97 *ac97, u16 gpio, in ucb1400_gpio_set_direction() argument
147 ucb1400_reg_read(ac97, UCB_IO_DIR) | (1 << gpio) : in ucb1400_gpio_set_direction()
148 ucb1400_reg_read(ac97, UCB_IO_DIR) & ~(1 << gpio)); in ucb1400_gpio_set_direction()
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/
Dbase.c30 nvkm_gpio_drive(struct nvkm_gpio *gpio, int idx, int line, int dir, int out) in nvkm_gpio_drive() argument
32 const struct nvkm_gpio_impl *impl = (void *)nv_object(gpio)->oclass; in nvkm_gpio_drive()
33 return impl->drive ? impl->drive(gpio, line, dir, out) : -ENODEV; in nvkm_gpio_drive()
37 nvkm_gpio_sense(struct nvkm_gpio *gpio, int idx, int line) in nvkm_gpio_sense() argument
39 const struct nvkm_gpio_impl *impl = (void *)nv_object(gpio)->oclass; in nvkm_gpio_sense()
40 return impl->sense ? impl->sense(gpio, line) : -ENODEV; in nvkm_gpio_sense()
44 nvkm_gpio_find(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, in nvkm_gpio_find() argument
47 struct nvkm_bios *bios = nvkm_bios(gpio); in nvkm_gpio_find()
59 if (nv_device_match(nv_object(gpio), 0x0189, 0x10de, 0x0010)) { in nvkm_gpio_find()
75 nvkm_gpio_set(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, int state) in nvkm_gpio_set() argument
[all …]
Dnv50.c27 nv50_gpio_reset(struct nvkm_gpio *gpio, u8 match) in nv50_gpio_reset() argument
29 struct nvkm_bios *bios = nvkm_bios(gpio); in nv50_gpio_reset()
50 gpio->set(gpio, 0, func, line, defs); in nv50_gpio_reset()
52 nv_mask(gpio, reg, 0x00010001 << lsh, val << lsh); in nv50_gpio_reset()
70 nv50_gpio_drive(struct nvkm_gpio *gpio, int line, int dir, int out) in nv50_gpio_drive() argument
77 nv_mask(gpio, reg, 3 << shift, (((dir ^ 1) << 1) | out) << shift); in nv50_gpio_drive()
82 nv50_gpio_sense(struct nvkm_gpio *gpio, int line) in nv50_gpio_sense() argument
89 return !!(nv_rd32(gpio, reg) & (4 << shift)); in nv50_gpio_sense()
93 nv50_gpio_intr_stat(struct nvkm_gpio *gpio, u32 *hi, u32 *lo) in nv50_gpio_intr_stat() argument
95 u32 intr = nv_rd32(gpio, 0x00e054); in nv50_gpio_intr_stat()
[all …]
Dgk104.c27 gk104_gpio_intr_stat(struct nvkm_gpio *gpio, u32 *hi, u32 *lo) in gk104_gpio_intr_stat() argument
29 u32 intr0 = nv_rd32(gpio, 0x00dc00); in gk104_gpio_intr_stat()
30 u32 intr1 = nv_rd32(gpio, 0x00dc80); in gk104_gpio_intr_stat()
31 u32 stat0 = nv_rd32(gpio, 0x00dc08) & intr0; in gk104_gpio_intr_stat()
32 u32 stat1 = nv_rd32(gpio, 0x00dc88) & intr1; in gk104_gpio_intr_stat()
35 nv_wr32(gpio, 0x00dc00, intr0); in gk104_gpio_intr_stat()
36 nv_wr32(gpio, 0x00dc80, intr1); in gk104_gpio_intr_stat()
40 gk104_gpio_intr_mask(struct nvkm_gpio *gpio, u32 type, u32 mask, u32 data) in gk104_gpio_intr_mask() argument
42 u32 inte0 = nv_rd32(gpio, 0x00dc08); in gk104_gpio_intr_mask()
43 u32 inte1 = nv_rd32(gpio, 0x00dc88); in gk104_gpio_intr_mask()
[all …]
Dg94.c27 g94_gpio_intr_stat(struct nvkm_gpio *gpio, u32 *hi, u32 *lo) in g94_gpio_intr_stat() argument
29 u32 intr0 = nv_rd32(gpio, 0x00e054); in g94_gpio_intr_stat()
30 u32 intr1 = nv_rd32(gpio, 0x00e074); in g94_gpio_intr_stat()
31 u32 stat0 = nv_rd32(gpio, 0x00e050) & intr0; in g94_gpio_intr_stat()
32 u32 stat1 = nv_rd32(gpio, 0x00e070) & intr1; in g94_gpio_intr_stat()
35 nv_wr32(gpio, 0x00e054, intr0); in g94_gpio_intr_stat()
36 nv_wr32(gpio, 0x00e074, intr1); in g94_gpio_intr_stat()
40 g94_gpio_intr_mask(struct nvkm_gpio *gpio, u32 type, u32 mask, u32 data) in g94_gpio_intr_mask() argument
42 u32 inte0 = nv_rd32(gpio, 0x00e050); in g94_gpio_intr_mask()
43 u32 inte1 = nv_rd32(gpio, 0x00e070); in g94_gpio_intr_mask()
[all …]
Dnv10.c29 nv10_gpio_sense(struct nvkm_gpio *gpio, int line) in nv10_gpio_sense() argument
33 line = nv_rd32(gpio, 0x600818) >> line; in nv10_gpio_sense()
38 line = nv_rd32(gpio, 0x60081c) >> line; in nv10_gpio_sense()
43 line = nv_rd32(gpio, 0x600850) >> line; in nv10_gpio_sense()
51 nv10_gpio_drive(struct nvkm_gpio *gpio, int line, int dir, int out) in nv10_gpio_drive() argument
76 nv_mask(gpio, reg, mask << line, data << line); in nv10_gpio_drive()
81 nv10_gpio_intr_stat(struct nvkm_gpio *gpio, u32 *hi, u32 *lo) in nv10_gpio_intr_stat() argument
83 u32 intr = nv_rd32(gpio, 0x001104); in nv10_gpio_intr_stat()
84 u32 stat = nv_rd32(gpio, 0x001144) & intr; in nv10_gpio_intr_stat()
87 nv_wr32(gpio, 0x001104, intr); in nv10_gpio_intr_stat()
[all …]
Dgf110.c27 gf110_gpio_reset(struct nvkm_gpio *gpio, u8 match) in gf110_gpio_reset() argument
29 struct nvkm_bios *bios = nvkm_bios(gpio); in gf110_gpio_reset()
46 gpio->set(gpio, 0, func, line, defs); in gf110_gpio_reset()
48 nv_mask(gpio, 0x00d610 + (line * 4), 0xff, unk0); in gf110_gpio_reset()
50 nv_mask(gpio, 0x00d740 + (unk1 * 4), 0xff, line); in gf110_gpio_reset()
55 gf110_gpio_drive(struct nvkm_gpio *gpio, int line, int dir, int out) in gf110_gpio_drive() argument
58 nv_mask(gpio, 0x00d610 + (line * 4), 0x00003000, data); in gf110_gpio_drive()
59 nv_mask(gpio, 0x00d604, 0x00000001, 0x00000001); /* update? */ in gf110_gpio_drive()
64 gf110_gpio_sense(struct nvkm_gpio *gpio, int line) in gf110_gpio_sense() argument
66 return !!(nv_rd32(gpio, 0x00d610 + (line * 4)) & 0x00004000); in gf110_gpio_sense()
/linux-4.1.27/arch/m68k/coldfire/
Dgpio.c26 int __mcfgpio_get_value(unsigned gpio) in __mcfgpio_get_value() argument
28 return mcfgpio_read(__mcfgpio_ppdr(gpio)) & mcfgpio_bit(gpio); in __mcfgpio_get_value()
32 void __mcfgpio_set_value(unsigned gpio, int value) in __mcfgpio_set_value() argument
34 if (gpio < MCFGPIO_SCR_START) { in __mcfgpio_set_value()
39 data = mcfgpio_read(__mcfgpio_podr(gpio)); in __mcfgpio_set_value()
41 data |= mcfgpio_bit(gpio); in __mcfgpio_set_value()
43 data &= ~mcfgpio_bit(gpio); in __mcfgpio_set_value()
44 mcfgpio_write(data, __mcfgpio_podr(gpio)); in __mcfgpio_set_value()
48 mcfgpio_write(mcfgpio_bit(gpio), in __mcfgpio_set_value()
49 MCFGPIO_SETR_PORT(gpio)); in __mcfgpio_set_value()
[all …]
/linux-4.1.27/arch/mips/ar7/
Dgpio.c31 static int ar7_gpio_get_value(struct gpio_chip *chip, unsigned gpio) in ar7_gpio_get_value() argument
37 return readl(gpio_in) & (1 << gpio); in ar7_gpio_get_value()
40 static int titan_gpio_get_value(struct gpio_chip *chip, unsigned gpio) in titan_gpio_get_value() argument
47 return readl(gpio >> 5 ? gpio_in1 : gpio_in0) & (1 << (gpio & 0x1f)); in titan_gpio_get_value()
51 unsigned gpio, int value) in ar7_gpio_set_value() argument
58 tmp = readl(gpio_out) & ~(1 << gpio); in ar7_gpio_set_value()
60 tmp |= 1 << gpio; in ar7_gpio_set_value()
65 unsigned gpio, int value) in titan_gpio_set_value() argument
73 tmp = readl(gpio >> 5 ? gpio_out1 : gpio_out0) & ~(1 << (gpio & 0x1f)); in titan_gpio_set_value()
75 tmp |= 1 << (gpio & 0x1f); in titan_gpio_set_value()
[all …]
Dplatform.c354 .gpio = 8,
360 { .name = "status", .gpio = 8, .active_low = 1, },
361 { .name = "wifi", .gpio = 13, .active_low = 1, },
367 .gpio = 9,
372 .gpio = 7,
377 .gpio = 12,
385 .gpio = 6,
390 .gpio = 7,
395 .gpio = 8,
400 .gpio = 12,
[all …]
/linux-4.1.27/arch/arm/boot/dts/
Dk2hk.dtsi47 compatible = "ti,keystone-dsp-gpio";
48 gpio-controller;
49 #gpio-cells = <2>;
50 gpio,syscon-dev = <&devctrl 0x240>;
54 compatible = "ti,keystone-dsp-gpio";
55 gpio-controller;
56 #gpio-cells = <2>;
57 gpio,syscon-dev = <&devctrl 0x244>;
61 compatible = "ti,keystone-dsp-gpio";
62 gpio-controller;
[all …]
Dhi3620.dtsi211 gpio0: gpio@806000 {
215 gpio-controller;
216 #gpio-cells = <2>;
217 gpio-ranges = < &pmx0 2 0 1 &pmx0 3 0 1 &pmx0 4 0 1
225 gpio1: gpio@807000 {
229 gpio-controller;
230 #gpio-cells = <2>;
231 gpio-ranges = < &pmx0 0 3 1 &pmx0 1 3 1 &pmx0 2 3 1
240 gpio2: gpio@808000 {
244 gpio-controller;
[all …]
Dstih416-pinctrl.dtsi59 pio0: gpio@fe610000 {
60 gpio-controller;
61 #gpio-cells = <1>;
67 pio1: gpio@fe611000 {
68 gpio-controller;
69 #gpio-cells = <1>;
75 pio2: gpio@fe612000 {
76 gpio-controller;
77 #gpio-cells = <1>;
83 pio3: gpio@fe613000 {
[all …]
Ds3c2416-pinctrl.dtsi17 gpio-controller;
18 #gpio-cells = <2>;
22 gpio-controller;
23 #gpio-cells = <2>;
27 gpio-controller;
28 #gpio-cells = <2>;
32 gpio-controller;
33 #gpio-cells = <2>;
37 gpio-controller;
38 #gpio-cells = <2>;
[all …]
Dstih415-pinctrl.dtsi55 pio0: gpio@fe610000 {
56 gpio-controller;
57 #gpio-cells = <1>;
63 pio1: gpio@fe611000 {
64 gpio-controller;
65 #gpio-cells = <1>;
71 pio2: gpio@fe612000 {
72 gpio-controller;
73 #gpio-cells = <1>;
79 pio3: gpio@fe613000 {
[all …]
Dexynos5420-pinctrl.dtsi18 gpio-controller;
19 #gpio-cells = <2>;
26 gpio-controller;
27 #gpio-cells = <2>;
37 gpio-controller;
38 #gpio-cells = <2>;
48 gpio-controller;
49 #gpio-cells = <2>;
56 gpio-controller;
57 #gpio-cells = <2>;
[all …]
Dexynos5250-pinctrl.dtsi18 gpio-controller;
19 #gpio-cells = <2>;
26 gpio-controller;
27 #gpio-cells = <2>;
34 gpio-controller;
35 #gpio-cells = <2>;
42 gpio-controller;
43 #gpio-cells = <2>;
50 gpio-controller;
51 #gpio-cells = <2>;
[all …]
Dstih407-pinctrl.dtsi59 pio0: gpio@09610000 {
60 gpio-controller;
61 #gpio-cells = <1>;
67 pio1: gpio@09611000 {
68 gpio-controller;
69 #gpio-cells = <1>;
75 pio2: gpio@09612000 {
76 gpio-controller;
77 #gpio-cells = <1>;
83 pio3: gpio@09613000 {
[all …]
Dkirkwood-synology.dtsi31 marvell,function = "gpio";
36 marvell,function = "gpio";
41 marvell,function = "gpio";
46 marvell,function = "gpio";
56 marvell,function = "gpio";
61 marvell,function = "gpio";
66 marvell,function = "gpio";
71 marvell,function = "gpio";
76 marvell,function = "gpio";
81 marvell,function = "gpio";
[all …]
Ddove.dtsi3 #include <dt-bindings/gpio/gpio.h>
404 pmx_gpio_0: pmx-gpio-0 {
406 marvell,function = "gpio";
409 pmx_gpio_1: pmx-gpio-1 {
411 marvell,function = "gpio";
414 pmx_gpio_2: pmx-gpio-2 {
416 marvell,function = "gpio";
419 pmx_gpio_3: pmx-gpio-3 {
421 marvell,function = "gpio";
424 pmx_gpio_4: pmx-gpio-4 {
[all …]
Dexynos5260-pinctrl.dtsi21 gpio-controller;
22 #gpio-cells = <2>;
29 gpio-controller;
30 #gpio-cells = <2>;
37 gpio-controller;
38 #gpio-cells = <2>;
45 gpio-controller;
46 #gpio-cells = <2>;
53 gpio-controller;
54 #gpio-cells = <2>;
[all …]
Dk2l.dtsi56 compatible = "ti,keystone-dsp-gpio";
57 gpio-controller;
58 #gpio-cells = <2>;
59 gpio,syscon-dev = <&devctrl 0x240>;
63 compatible = "ti,keystone-dsp-gpio";
64 gpio-controller;
65 #gpio-cells = <2>;
66 gpio,syscon-dev = <&devctrl 0x244>;
70 compatible = "ti,keystone-dsp-gpio";
71 gpio-controller;
[all …]
Dexynos4415-pinctrl.dtsi16 gpio-controller;
17 #gpio-cells = <2>;
24 gpio-controller;
25 #gpio-cells = <2>;
32 gpio-controller;
33 #gpio-cells = <2>;
40 gpio-controller;
41 #gpio-cells = <2>;
48 gpio-controller;
49 #gpio-cells = <2>;
[all …]
Dhisi-x5hd2.dtsi135 gpio0: gpio@b20000 {
139 gpio-controller;
140 #gpio-cells = <2>;
148 gpio1: gpio@b21000 {
152 gpio-controller;
153 #gpio-cells = <2>;
161 gpio2: gpio@b22000 {
165 gpio-controller;
166 #gpio-cells = <2>;
174 gpio3: gpio@b23000 {
[all …]
Dexynos4210-pinctrl.dtsi20 gpio-controller;
21 #gpio-cells = <2>;
28 gpio-controller;
29 #gpio-cells = <2>;
36 gpio-controller;
37 #gpio-cells = <2>;
44 gpio-controller;
45 #gpio-cells = <2>;
52 gpio-controller;
53 #gpio-cells = <2>;
[all …]
Dexynos4x12-pinctrl.dtsi34 gpio-controller;
35 #gpio-cells = <2>;
42 gpio-controller;
43 #gpio-cells = <2>;
50 gpio-controller;
51 #gpio-cells = <2>;
58 gpio-controller;
59 #gpio-cells = <2>;
66 gpio-controller;
67 #gpio-cells = <2>;
[all …]
Dexynos3250-pinctrl.dtsi33 gpio-controller;
34 #gpio-cells = <2>;
41 gpio-controller;
42 #gpio-cells = <2>;
49 gpio-controller;
50 #gpio-cells = <2>;
57 gpio-controller;
58 #gpio-cells = <2>;
65 gpio-controller;
66 #gpio-cells = <2>;
[all …]
Dkirkwood-iomega_ix2_200.dts36 marvell,function = "gpio";
40 marvell,function = "gpio";
44 marvell,function = "gpio";
48 marvell,function = "gpio";
52 marvell,function = "gpio";
56 marvell,function = "gpio";
60 marvell,function = "gpio";
64 marvell,function = "gpio";
68 marvell,function = "gpio";
72 marvell,function = "gpio";
[all …]
Dkirkwood-dnskw.dtsi9 compatible = "gpio-keys";
35 compatible = "gpio-fan";
40 gpio-fan,speed-map = <0 0
46 compatible = "gpio-poweroff";
70 marvell,function = "gpio";
74 marvell,function = "gpio";
78 marvell,function = "gpio";
82 marvell,function = "gpio";
86 marvell,function = "gpio";
90 marvell,function = "gpio";
[all …]
Ds5pv210-pinctrl.dtsi24 gpio-controller;
25 #gpio-cells = <2>;
32 gpio-controller;
33 #gpio-cells = <2>;
40 gpio-controller;
41 #gpio-cells = <2>;
48 gpio-controller;
49 #gpio-cells = <2>;
56 gpio-controller;
57 #gpio-cells = <2>;
[all …]
Dberlin2cd.dtsi143 gpio0: gpio@0400 {
144 compatible = "snps,dw-apb-gpio";
149 porta: gpio-port@0 {
150 compatible = "snps,dw-apb-gpio-port";
151 gpio-controller;
152 #gpio-cells = <2>;
161 gpio1: gpio@0800 {
162 compatible = "snps,dw-apb-gpio";
167 portb: gpio-port@1 {
168 compatible = "snps,dw-apb-gpio-port";
[all …]
Dtegra30-cardhu-a04.dts13 power-gpios = <&gpio TEGRA_GPIO(D, 3) GPIO_ACTIVE_HIGH>;
32 gpio = <&pmic 7 GPIO_ACTIVE_HIGH>;
44 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
54 gpio = <&gpio TEGRA_GPIO(DD, 6) GPIO_ACTIVE_HIGH>;
55 gpio-open-drain;
66 gpio = <&gpio TEGRA_GPIO(DD, 4) GPIO_ACTIVE_HIGH>;
67 gpio-open-drain;
78 gpio = <&pmic 8 GPIO_ACTIVE_HIGH>;
90 gpio = <&gpio TEGRA_GPIO(DD, 2) GPIO_ACTIVE_HIGH>;
102 gpio = <&gpio TEGRA_GPIO(DD, 0) GPIO_ACTIVE_HIGH>;
Domap2420.dtsi76 gpio1: gpio@48018000 {
77 compatible = "ti,omap2-gpio";
81 ti,gpio-always-on;
82 #gpio-cells = <2>;
83 gpio-controller;
88 gpio2: gpio@4801a000 {
89 compatible = "ti,omap2-gpio";
93 ti,gpio-always-on;
94 #gpio-cells = <2>;
95 gpio-controller;
[all …]
Dr8a7779.dtsi74 gpio0: gpio@ffc40000 {
75 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
78 #gpio-cells = <2>;
79 gpio-controller;
80 gpio-ranges = <&pfc 0 0 32>;
85 gpio1: gpio@ffc41000 {
86 compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
89 #gpio-cells = <2>;
90 gpio-controller;
91 gpio-ranges = <&pfc 0 32 32>;
[all …]
Dberlin2.dtsi160 gpio0: gpio@0400 {
161 compatible = "snps,dw-apb-gpio";
166 porta: gpio-port@0 {
167 compatible = "snps,dw-apb-gpio-port";
168 gpio-controller;
169 #gpio-cells = <2>;
178 gpio1: gpio@0800 {
179 compatible = "snps,dw-apb-gpio";
184 portb: gpio-port@1 {
185 compatible = "snps,dw-apb-gpio-port";
[all …]
Dtegra124-nyan.dtsi24 nvidia,hpd-gpio =
25 <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>;
57 interrupt-parent = <&gpio>;
64 interrupt-parent = <&gpio>;
78 interrupt-parent = <&gpio>;
113 gpio-controller;
114 #gpio-cells = <2>;
122 function = "gpio";
128 function = "gpio";
134 function = "gpio";
[all …]
Demev2.dtsi177 gpio0: gpio@e0050000 {
182 gpio-controller;
183 gpio-ranges = <&pfc 0 0 32>;
184 #gpio-cells = <2>;
189 gpio1: gpio@e0050080 {
194 gpio-controller;
195 gpio-ranges = <&pfc 0 32 32>;
196 #gpio-cells = <2>;
201 gpio2: gpio@e0050100 {
206 gpio-controller;
[all …]
Dtegra30-cardhu-a02.dts13 power-gpios = <&gpio TEGRA_GPIO(D, 4) GPIO_ACTIVE_HIGH>;
32 gpio = <&pmic 6 GPIO_ACTIVE_HIGH>;
44 gpio = <&pmic 7 GPIO_ACTIVE_HIGH>;
54 gpio = <&gpio TEGRA_GPIO(I, 4) GPIO_ACTIVE_HIGH>;
55 gpio-open-drain;
66 gpio = <&gpio TEGRA_GPIO(H, 7) GPIO_ACTIVE_HIGH>;
67 gpio-open-drain;
78 gpio = <&pmic 2 GPIO_ACTIVE_HIGH>;
90 gpio = <&gpio TEGRA_GPIO(K, 3) GPIO_ACTIVE_HIGH>;
Dea3250.dts62 gpios = <&gpio 5 19 1>; /* GPO_P3 19, active low */
116 power-gpio = <&gpio 0x59 0>;
117 reset-gpio = <&gpio 0x51 0>;
123 gpio-controller;
124 #gpio-cells = <2>;
164 compatible = "gpio-keys";
171 gpios = <&gpio 4 1 0>; /* GPI_P3 1 */
196 gpios = <&gpio 2 0 0>; /* P2.0 */
201 gpios = <&gpio 2 1 0>; /* P2.1 */
206 gpios = <&gpio 2 2 0>; /* P2.2 */
[all …]
Dkirkwood-nsa320.dts57 marvell,function = "gpio";
62 marvell,function = "gpio";
67 marvell,function = "gpio";
72 marvell,function = "gpio";
77 marvell,function = "gpio";
82 marvell,function = "gpio";
87 marvell,function = "gpio";
92 marvell,function = "gpio";
97 marvell,function = "gpio";
102 marvell,function = "gpio";
[all …]
Domap2430.dtsi88 gpio1: gpio@4900c000 {
89 compatible = "ti,omap2-gpio";
93 ti,gpio-always-on;
94 #gpio-cells = <2>;
95 gpio-controller;
100 gpio2: gpio@4900e000 {
101 compatible = "ti,omap2-gpio";
105 ti,gpio-always-on;
106 #gpio-cells = <2>;
107 gpio-controller;
[all …]
Dkirkwood-goflexnet.dts24 marvell,function = "gpio";
28 marvell,function = "gpio";
32 marvell,function = "gpio";
36 marvell,function = "gpio";
40 marvell,function = "gpio";
44 marvell,function = "gpio";
48 marvell,function = "gpio";
52 marvell,function = "gpio";
56 marvell,function = "gpio";
60 marvell,function = "gpio";
[all …]
Dkirkwood-lsxl.dtsi18 marvell,function = "gpio";
30 marvell,function = "gpio";
34 marvell,function = "gpio";
38 marvell,function = "gpio";
42 marvell,function = "gpio";
46 marvell,function = "gpio";
50 marvell,function = "gpio";
54 marvell,function = "gpio";
58 marvell,function = "gpio";
62 marvell,function = "gpio";
[all …]
Dberlin2q.dtsi191 gpio0: gpio@0400 {
192 compatible = "snps,dw-apb-gpio";
197 porta: gpio-port@0 {
198 compatible = "snps,dw-apb-gpio-port";
199 gpio-controller;
200 #gpio-cells = <2>;
209 gpio1: gpio@0800 {
210 compatible = "snps,dw-apb-gpio";
215 portb: gpio-port@1 {
216 compatible = "snps,dw-apb-gpio-port";
[all …]
Dkirkwood-iconnect.dts36 marvell,function = "gpio";
40 marvell,function = "gpio";
44 marvell,function = "gpio";
48 marvell,function = "gpio";
52 marvell,function = "gpio";
56 marvell,function = "gpio";
60 marvell,function = "gpio";
64 marvell,function = "gpio";
68 marvell,function = "gpio";
72 marvell,function = "gpio";
[all …]
Dkirkwood-netgear_readynas_nv+_v2.dts47 marvell,function = "gpio";
52 marvell,function = "gpio";
57 marvell,function = "gpio";
62 marvell,function = "gpio";
67 marvell,function = "gpio";
72 marvell,function = "gpio";
77 marvell,function = "gpio";
82 marvell,function = "gpio";
87 marvell,function = "gpio";
92 marvell,function = "gpio";
[all …]
Dtegra30-cardhu.dtsi194 interrupt-parent = <&gpio>;
218 interrupt-parent = <&gpio>;
221 gpio-controller;
222 #gpio-cells = <2>;
226 gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
239 #gpio-cells = <2>;
240 gpio-controller;
334 interrupt-parent = <&gpio>;
382 cd-gpios = <&gpio TEGRA_GPIO(I, 5) GPIO_ACTIVE_LOW>;
383 wp-gpios = <&gpio TEGRA_GPIO(T, 3) GPIO_ACTIVE_HIGH>;
[all …]
Dkirkwood-blackarmor-nas220.dts11 #include <dt-bindings/gpio/gpio.h>
32 compatible = "gpio-poweroff";
37 compatible = "gpio-keys";
52 gpio-leds {
53 compatible = "gpio-leds";
78 gpio = <&gpio0 24 GPIO_ACTIVE_LOW>;
90 gpio = <&gpio0 28 GPIO_ACTIVE_LOW>;
122 marvell,function = "gpio";
127 marvell,function = "gpio";
132 marvell,function = "gpio";
[all …]
Dste-dbx5x0.dtsi103 gpio0: gpio@8012e000 {
104 compatible = "stericsson,db8500-gpio",
105 "st,nomadik-gpio";
111 gpio-controller;
112 #gpio-cells = <2>;
113 gpio-bank = <0>;
118 gpio1: gpio@8012e080 {
119 compatible = "stericsson,db8500-gpio",
120 "st,nomadik-gpio";
126 gpio-controller;
[all …]
Dkirkwood-netgear_readynas_duo_v2.dts45 marvell,function = "gpio";
50 marvell,function = "gpio";
55 marvell,function = "gpio";
60 marvell,function = "gpio";
65 marvell,function = "gpio";
70 marvell,function = "gpio";
75 marvell,function = "gpio";
80 marvell,function = "gpio";
85 marvell,function = "gpio";
125 gpio-leds {
[all …]
/linux-4.1.27/drivers/pinctrl/
Dpinctrl-coh901.c62 struct u300_gpio *gpio; member
94 (gpio->base + (pin >> 3) * gpio->stride + gpio->reg)
226 int gpio = chip->base + offset; in u300_gpio_request() local
228 return pinctrl_request_gpio(gpio); in u300_gpio_request()
233 int gpio = chip->base + offset; in u300_gpio_free() local
235 pinctrl_free_gpio(gpio); in u300_gpio_free()
240 struct u300_gpio *gpio = to_u300_gpio(chip); in u300_gpio_get() local
247 struct u300_gpio *gpio = to_u300_gpio(chip); in u300_gpio_set() local
264 struct u300_gpio *gpio = to_u300_gpio(chip); in u300_gpio_direction_input() local
280 struct u300_gpio *gpio = to_u300_gpio(chip); in u300_gpio_direction_output() local
[all …]
/linux-4.1.27/arch/powerpc/boot/dts/
Dmucmc52.dts17 &gpt0 { gpio-controller; };
18 &gpt1 { gpio-controller; };
19 &gpt2 { gpio-controller; };
20 &gpt3 { gpio-controller; };
164 simple100: gpio-controller-100@3,600100 {
165 compatible = "manroland,mucmc52-aux-gpio";
167 gpio-controller;
168 #gpio-cells = <2>;
170 simple104: gpio-controller-104@3,600104 {
171 compatible = "manroland,mucmc52-aux-gpio";
[all …]
Dmpc5200b.dtsi69 #gpio-cells = <2>; // Add 'gpio-controller;' to enable gpio mode
77 #gpio-cells = <2>; // Add 'gpio-controller;' to enable gpio mode
84 #gpio-cells = <2>; // Add 'gpio-controller;' to enable gpio mode
91 #gpio-cells = <2>; // Add 'gpio-controller;' to enable gpio mode
98 #gpio-cells = <2>; // Add 'gpio-controller;' to enable gpio mode
105 #gpio-cells = <2>; // Add 'gpio-controller;' to enable gpio mode
112 #gpio-cells = <2>; // Add 'gpio-controller;' to enable gpio mode
119 #gpio-cells = <2>; // Add 'gpio-controller;' to enable gpio mode
142 gpio_simple: gpio@b00 {
143 compatible = "fsl,mpc5200b-gpio","fsl,mpc5200-gpio";
[all …]
/linux-4.1.27/drivers/mfd/
Dwm8350-gpio.c23 static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir) in gpio_set_dir() argument
31 1 << gpio); in gpio_set_dir()
35 1 << gpio); in gpio_set_dir()
40 static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db) in wm8350_gpio_set_debounce() argument
44 1 << gpio); in wm8350_gpio_set_debounce()
47 WM8350_GPIO_DEBOUNCE, 1 << gpio); in wm8350_gpio_set_debounce()
50 static int gpio_set_func(struct wm8350 *wm8350, int gpio, int func) in gpio_set_func() argument
55 switch (gpio) { in gpio_set_func()
143 static int gpio_set_pull_up(struct wm8350 *wm8350, int gpio, int up) in gpio_set_pull_up() argument
148 1 << gpio); in gpio_set_pull_up()
[all …]
Dpcf50633-gpio.c38 int pcf50633_gpio_set(struct pcf50633 *pcf, int gpio, u8 val) in pcf50633_gpio_set() argument
42 reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG; in pcf50633_gpio_set()
48 u8 pcf50633_gpio_get(struct pcf50633 *pcf, int gpio) in pcf50633_gpio_get() argument
52 reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG; in pcf50633_gpio_get()
59 int pcf50633_gpio_invert_set(struct pcf50633 *pcf, int gpio, int invert) in pcf50633_gpio_invert_set() argument
63 reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG; in pcf50633_gpio_invert_set()
70 int pcf50633_gpio_invert_get(struct pcf50633 *pcf, int gpio) in pcf50633_gpio_invert_get() argument
74 reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG; in pcf50633_gpio_invert_get()
82 int gpio, int regulator, int on) in pcf50633_gpio_power_supply_set() argument
89 val = !!on << (gpio - PCF50633_GPIO1); in pcf50633_gpio_power_supply_set()
[all …]
/linux-4.1.27/Documentation/devicetree/bindings/gpio/
Dmrvl-gpio.txt4 - compatible : Should be "intel,pxa25x-gpio", "intel,pxa26x-gpio",
5 "intel,pxa27x-gpio", "intel,pxa3xx-gpio",
6 "marvell,pxa93x-gpio", "marvell,mmp-gpio",
7 "marvell,mmp2-gpio" or marvell,pxa1928-gpio.
9 - interrupts : Should be the port interrupt shared by all gpio pins.
10 There're three gpio interrupts in arch-pxa, and they're gpio0,
11 gpio1 and gpio_mux. There're only one gpio interrupt in arch-mmp,
19 - gpio-controller : Marks the device node as a gpio controller.
20 - #gpio-cells : Should be one. It is the pin number.
24 gpio: gpio@d4019000 {
[all …]
Dgpio-tz1090-pdc.txt4 - compatible: Compatible property value should be "img,tz1090-pdc-gpio".
9 - gpio-controller: Specifies that the node is a gpio controller.
11 - #gpio-cells: Should be 2. The syntax of the gpio specifier used by client
13 <[phandle of the gpio controller node]
14 [PDC gpio number]
15 [gpio flags]>
17 Values for gpio specifier:
19 - GPIO flags: bit field of flags, as defined in <dt-bindings/gpio/gpio.h>.
25 - gpio-ranges: Mapping to pin controller pins (as described in
26 Documentation/devicetree/bindings/gpio/gpio.txt)
[all …]
Drenesas,gpio-rcar.txt6 - "renesas,gpio-r8a7778": for R8A7778 (R-Mobile M1) compatible GPIO controller.
7 - "renesas,gpio-r8a7779": for R8A7779 (R-Car H1) compatible GPIO controller.
8 - "renesas,gpio-r8a7790": for R8A7790 (R-Car H2) compatible GPIO controller.
9 - "renesas,gpio-r8a7791": for R8A7791 (R-Car M2-W) compatible GPIO controller.
10 - "renesas,gpio-r8a7793": for R8A7793 (R-Car M2-N) compatible GPIO controller.
11 - "renesas,gpio-r8a7794": for R8A7794 (R-Car E2) compatible GPIO controller.
12 - "renesas,gpio-rcar": for generic R-Car GPIO controller.
20 - gpio-controller: Marks the device node as a gpio controller.
21 - #gpio-cells: Should be 2. The first cell is the GPIO number and the second
22 cell specifies GPIO flags, as defined in <dt-bindings/gpio/gpio.h>. Only the
[all …]
Dgpio-mxs.txt11 - compatible : Should be "fsl,<soc>-gpio". The supported SoCs include
14 - gpio-controller : Marks the device node as a gpio controller.
15 - #gpio-cells : Should be two. The first cell is the pin number and
16 the second cell is used to specify the gpio polarity:
44 gpio0: gpio@0 {
45 compatible = "fsl,imx28-gpio";
47 gpio-controller;
48 #gpio-cells = <2>;
53 gpio1: gpio@1 {
54 compatible = "fsl,imx28-gpio";
[all …]
Dgpio-tz1090.txt4 - compatible: Compatible property value should be "img,tz1090-gpio".
18 - gpio-controller: Specifies that the node is a gpio controller.
20 - #gpio-cells: Should be 2. The syntax of the gpio specifier used by client
22 <[phandle of the gpio controller node]
23 [gpio number within the gpio bank]
24 [gpio flags]>
26 Values for gpio specifier:
28 - GPIO flags: bit field of flags, as defined in <dt-bindings/gpio/gpio.h>.
34 - gpio-ranges: Mapping to pin controller pins (as described in
35 Documentation/devicetree/bindings/gpio/gpio.txt)
[all …]
Dgpio.txt8 properties, each containing a 'gpio-list':
10 gpio-list ::= <single-gpio> [gpio-list]
11 single-gpio ::= <gpio-phandle> <gpio-specifier>
12 gpio-phandle : phandle to gpio controller node
13 gpio-specifier : Array of #gpio-cells specifying specific gpio
34 gpio-controller
35 #gpio-cells = <2>;
38 gpio-controller
39 #gpio-cells = <1>;
49 Note that gpio-specifier length is controller dependent. In the
[all …]
Dgpio-palmas.txt5 - "ti,palams-gpio" for palma series of the GPIO controller
6 - "ti,tps80036-gpio" for Palma series device TPS80036.
7 - "ti,tps65913-gpio" for palma series device TPS65913.
8 - "ti,tps65914-gpio" for palma series device TPS65914.
9 - #gpio-cells : Should be two.
10 - first cell is the gpio pin number
11 - second cell is used to specify the gpio polarity:
14 - gpio-controller : Marks the device node as a GPIO controller.
16 Note: This gpio node will be sub node of palmas node.
22 compatible = "ti,palmas-gpio";
[all …]
Dgpio-davinci.txt4 - compatible: should be "ti,dm6441-gpio", "ti,keystone-gpio"
9 - gpio-controller : Marks the device node as a gpio controller.
11 - #gpio-cells : Should be two.
22 - ti,davinci-gpio-unbanked: The number of GPIOs that have an individual interrupt
31 gpio: gpio@1e26000 {
32 compatible = "ti,dm6441-gpio";
33 gpio-controller;
34 #gpio-cells = <2>;
43 ti,davinci-gpio-unbanked = <0>;
49 compatible = "gpio-leds";
[all …]
D8xxx_gpio.txt6 Every GPIO controller node must have #gpio-cells property defined,
7 this information will be used to translate gpio-specifiers.
8 See bindings/gpio/gpio.txt for details of how to specify GPIO
22 - compatible: "fsl,<chip>-gpio" followed by "fsl,mpc8349-gpio"
23 for 83xx, "fsl,mpc8572-gpio" for 85xx, or
24 "fsl,mpc8610-gpio" for 86xx.
25 - #gpio-cells: Should be two. The first cell is the pin number
31 - gpio-controller: Marks the port as GPIO controller.
45 Example of gpio-controller nodes for a MPC8347 SoC:
47 gpio1: gpio-controller@c00 {
[all …]
Dsnps-dwapb-gpio.txt4 - compatible : Should contain "snps,dw-apb-gpio"
13 - compatible : "snps,dw-apb-gpio-port"
14 - gpio-controller : Marks the device node as a gpio controller.
15 - #gpio-cells : Should be two. The first cell is the pin number and
16 the second cell is used to specify the gpio polarity:
35 gpio: gpio@20000 {
36 compatible = "snps,dw-apb-gpio";
41 porta: gpio-controller@0 {
42 compatible = "snps,dw-apb-gpio-port";
43 gpio-controller;
[all …]
Dgpio-vf610.txt8 - compatible : Should be "fsl,<soc>-gpio", currently "fsl,vf610-gpio"
12 - gpio-controller : Marks the device node as a gpio controller.
13 - #gpio-cells : Should be two. The first cell is the pin number and
14 the second cell is used to specify the gpio polarity:
35 gpio1: gpio@40049000 {
36 compatible = "fsl,vf610-gpio";
39 gpio-controller;
40 #gpio-cells = <2>;
43 gpio-ranges = <&iomuxc 0 0 32>;
46 gpio2: gpio@4004a000 {
[all …]
Dgpio_lpc32xx.txt4 - compatible: must be "nxp,lpc3220-gpio"
6 - gpio-controller: Marks the device node as a GPIO controller.
7 - #gpio-cells: Should be 3:
22 gpio: gpio@40028000 {
23 compatible = "nxp,lpc3220-gpio";
25 gpio-controller;
26 #gpio-cells = <3>; /* bank, pin, flags */
30 compatible = "gpio-leds";
33 gpios = <&gpio 5 1 1>; /* GPO_P3 1, active low */
39 gpios = <&gpio 5 14 1>; /* GPO_P3 14, active low */
Dgpio-samsung.txt4 - compatible: Compatible property value should be "samsung,exynos4-gpio>".
9 - #gpio-cells: Should be 4. The syntax of the gpio specifier used by client nodes
11 <[phandle of the gpio controller node]
12 [pin number within the gpio controller]
17 Values for gpio specifier:
28 - gpio-controller: Specifies that the node is a gpio controller.
34 gpa0: gpio-controller@11400000 {
37 compatible = "samsung,exynos4-gpio";
39 #gpio-cells = <4>;
40 gpio-controller;
Dabilis,tb10x-gpio.txt4 - compatible: Should be "abilis,tb10x-gpio"
6 - gpio-controller: Marks the device node as a gpio controller.
7 - #gpio-cells: Should be <2>. The first cell is the pin number and the
20 Documentation/devicetree/bindings/gpio/gpio.txt
24 gpioa: gpio@FF140000 {
25 compatible = "abilis,tb10x-gpio";
31 gpio-controller;
32 #gpio-cells = <2>;
34 gpio-ranges = <&iomux 0 0 0>;
35 gpio-ranges-group-names = "gpioa_pins";
Dgpio_atmel.txt4 - compatible: "atmel,<chip>-gpio", where <chip> is at91rm9200 or at91sam9x5.
7 - #gpio-cells: Should be two. The first cell is the pin number and
10 - gpio-controller: Marks the device node as a GPIO controller.
13 - #gpio-lines: Number of gpio if absent 32.
17 pioA: gpio@fffff200 {
18 compatible = "atmel,at91rm9200-gpio";
21 #gpio-cells = <2>;
22 gpio-controller;
23 #gpio-lines = <19>;
Dcirrus,clps711x-mctrl-gpio.txt4 - compatible: Should contain "cirrus,clps711x-mctrl-gpio".
5 - gpio-controller: Marks the device node as a gpio controller.
6 - #gpio-cells: Should be two. The first cell is the pin number and
7 the second cell is used to specify the gpio polarity:
13 compatible = "cirrus,ep7312-mctrl-gpio",
14 "cirrus,clps711x-mctrl-gpio";
15 gpio-controller;
16 #gpio-cells = <2>;
Dgpio-lp3943.txt4 - compatible: "ti,lp3943-gpio"
5 - gpio-controller: Marks the device node as a GPIO controller.
6 - #gpio-cells: Should be 2. See gpio.txt in this directory for a
17 gpioex: gpio {
18 compatible = "ti,lp3943-gpio";
19 gpio-controller;
20 #gpio-cells = <2>;
26 compatible = "gpio-leds";
Dgpio-mvebu.txt5 - compatible : Should be "marvell,orion-gpio", "marvell,mv78200-gpio"
6 or "marvell,armadaxp-gpio". "marvell,orion-gpio" should be used for
8 370. "marvell,mv78200-gpio" should be used for the Discovery
9 MV78200. "marvel,armadaxp-gpio" should be used for all Armada XP
13 entry is expected, except for the "marvell,armadaxp-gpio" variant
34 - gpio-controller: marks the device node as a gpio controller
38 - #gpio-cells: Should be two. The first cell is the pin number. The
43 gpio0: gpio@d0018100 {
44 compatible = "marvell,armadaxp-gpio";
48 gpio-controller;
[all …]
Dgpio-xgene.txt3 This is a gpio controller that is part of the flash controller.
4 This gpio controller controls a total of 48 gpios.
7 - compatible: "apm,xgene-gpio" for X-Gene GPIO controller
9 - #gpio-cells: Should be two.
11 - second cell is used to specify the gpio polarity:
14 - gpio-controller: Marks the device node as a GPIO controller.
18 compatible = "apm,xgene-gpio";
20 gpio-controller;
21 #gpio-cells = <2>;
Dgpio-zevio.txt4 - compatible: Should be "lsi,zevio-gpio"
6 - #gpio-cells: Should be two. The first cell is the pin number and the
8 - gpio-controller: Marks the device node as a GPIO controller.
11 gpio: gpio@90000000 {
12 compatible = "lsi,zevio-gpio";
14 gpio-controller;
15 #gpio-cells = <2>;
Dgpio-clps711x.txt4 - compatible: Should be "cirrus,clps711x-gpio"
8 - gpio-controller: Marks the device node as a gpio controller.
9 - #gpio-cells: Should be two. The first cell is the pin number and
10 the second cell is used to specify the gpio polarity:
23 porta: gpio@80000000 {
24 compatible = "cirrus,clps711x-gpio";
26 gpio-controller;
27 #gpio-cells = <2>;
Dfujitsu,mb86s70-gpio.txt5 - compatible: Should be "fujitsu,mb86s70-gpio"
8 - gpio-controller: Marks the device node as a gpio controller.
9 - #gpio-cells: Should be <2>. The first cell is the pin number and the
14 gpio0: gpio@31000000 {
15 compatible = "fujitsu,mb86s70-gpio";
17 gpio-controller;
18 #gpio-cells = <2>;
Dbrcm,kona-gpio.txt14 - compatible: "brcm,bcm11351-gpio", "brcm,kona-gpio"
21 - #gpio-cells: Should be <2>. The first cell is the pin number, the second
24 See also "gpio-specifier" in .../devicetree/bindings/gpio/gpio.txt.
34 - gpio-controller: Marks the device node as a GPIO controller.
38 gpio: gpio@35003000 {
39 compatible = "brcm,bcm11351-gpio", "brcm,kona-gpio";
48 #gpio-cells = <2>;
50 gpio-controller;
Dmoxa,moxart-gpio.txt5 - #gpio-cells : Should be 2, The first cell is the pin number,
9 - compatible : Must be "moxa,moxart-gpio"
14 gpio: gpio@98700000 {
15 gpio-controller;
16 #gpio-cells = <2>;
17 compatible = "moxa,moxart-gpio";
Dgpio-omap.txt5 - "ti,omap2-gpio" for OMAP2 controllers
6 - "ti,omap3-gpio" for OMAP3 controllers
7 - "ti,omap4-gpio" for OMAP4 controllers
8 - gpio-controller : Marks the device node as a GPIO controller.
9 - #gpio-cells : Should be two.
24 "gpio<X>", <X> being the 1-based instance number
26 - ti,gpio-always-on: Indicates if a GPIO bank is always powered and
33 compatible = "ti,omap4-gpio";
35 gpio-controller;
36 #gpio-cells = <2>;
Dfsl-imx-gpio.txt4 - compatible : Should be "fsl,<soc>-gpio"
9 - gpio-controller : Marks the device node as a gpio controller.
10 - #gpio-cells : Should be two. The first cell is the pin number and
11 the second cell is used to specify the gpio polarity:
24 gpio0: gpio@73f84000 {
25 compatible = "fsl,imx51-gpio", "fsl,imx35-gpio";
28 gpio-controller;
29 #gpio-cells = <2>;
Dgpio-nmk.txt4 - compatible : Should be "st,nomadik-gpio".
7 - #gpio-cells : Should be two:
15 - gpio-controller : Marks the device node as a GPIO controller.
17 - gpio-bank : Specifies which bank a controller owns.
22 gpio1: gpio@8012e080 {
23 compatible = "st,nomadik-gpio";
26 #gpio-cells = <2>;
27 gpio-controller;
30 gpio-bank = <1>;
/linux-4.1.27/arch/powerpc/sysdev/
Dppc4xx_gpio.c34 #define GPIO_MASK(gpio) (0x80000000 >> (gpio)) argument
35 #define GPIO_MASK2(gpio) (0xc0000000 >> ((gpio) * 2)) argument
76 static int ppc4xx_gpio_get(struct gpio_chip *gc, unsigned int gpio) in ppc4xx_gpio_get() argument
81 return in_be32(&regs->ir) & GPIO_MASK(gpio); in ppc4xx_gpio_get()
85 __ppc4xx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) in __ppc4xx_gpio_set() argument
91 setbits32(&regs->or, GPIO_MASK(gpio)); in __ppc4xx_gpio_set()
93 clrbits32(&regs->or, GPIO_MASK(gpio)); in __ppc4xx_gpio_set()
97 ppc4xx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) in ppc4xx_gpio_set() argument
105 __ppc4xx_gpio_set(gc, gpio, val); in ppc4xx_gpio_set()
109 pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val); in ppc4xx_gpio_set()
[all …]
/linux-4.1.27/drivers/gpu/drm/gma500/
Dintel_gmbus.c102 static u32 get_reserved(struct intel_gpio *gpio) in get_reserved() argument
104 struct drm_psb_private *dev_priv = gpio->dev_priv; in get_reserved()
108 reserved = GMBUS_REG_READ(gpio->reg) & in get_reserved()
117 struct intel_gpio *gpio = data; in get_clock() local
118 struct drm_psb_private *dev_priv = gpio->dev_priv; in get_clock()
119 u32 reserved = get_reserved(gpio); in get_clock()
120 GMBUS_REG_WRITE(gpio->reg, reserved | GPIO_CLOCK_DIR_MASK); in get_clock()
121 GMBUS_REG_WRITE(gpio->reg, reserved); in get_clock()
122 return (GMBUS_REG_READ(gpio->reg) & GPIO_CLOCK_VAL_IN) != 0; in get_clock()
127 struct intel_gpio *gpio = data; in get_data() local
[all …]
/linux-4.1.27/arch/unicore32/include/asm/
Dgpio.h67 static inline int gpio_get_value(unsigned gpio) in gpio_get_value() argument
69 if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX)) in gpio_get_value()
70 return readl(GPIO_GPLR) & GPIO_GPIO(gpio); in gpio_get_value()
72 return __gpio_get_value(gpio); in gpio_get_value()
75 static inline void gpio_set_value(unsigned gpio, int value) in gpio_set_value() argument
77 if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX)) in gpio_set_value()
79 writel(GPIO_GPIO(gpio), GPIO_GPSR); in gpio_set_value()
81 writel(GPIO_GPIO(gpio), GPIO_GPCR); in gpio_set_value()
83 __gpio_set_value(gpio, value); in gpio_set_value()
88 static inline unsigned gpio_to_irq(unsigned gpio) in gpio_to_irq() argument
[all …]
/linux-4.1.27/arch/arm/mach-pxa/
Dmfp-pxa2xx.c55 static int __mfp_config_gpio(unsigned gpio, unsigned long c) in __mfp_config_gpio() argument
57 unsigned long gafr, mask = GPIO_bit(gpio); in __mfp_config_gpio()
58 int bank = gpio_to_bank(gpio); in __mfp_config_gpio()
59 int uorl = !!(gpio & 0x10); /* GAFRx_U or GAFRx_L ? */ in __mfp_config_gpio()
60 int shft = (gpio & 0xf) << 1; in __mfp_config_gpio()
76 if (is_out ^ gpio_desc[gpio].dir_inverted) in __mfp_config_gpio()
77 GPDR(gpio) |= mask; in __mfp_config_gpio()
79 GPDR(gpio) &= ~mask; in __mfp_config_gpio()
97 __func__, gpio); in __mfp_config_gpio()
101 if (is_out ^ gpio_desc[gpio].dir_inverted) in __mfp_config_gpio()
[all …]
/linux-4.1.27/arch/mips/bcm63xx/
Dgpio.c39 unsigned gpio, int val) in bcm63xx_gpio_set() argument
46 if (gpio >= chip->ngpio) in bcm63xx_gpio_set()
49 if (gpio < 32) { in bcm63xx_gpio_set()
51 mask = 1 << gpio; in bcm63xx_gpio_set()
55 mask = 1 << (gpio - 32); in bcm63xx_gpio_set()
68 static int bcm63xx_gpio_get(struct gpio_chip *chip, unsigned gpio) in bcm63xx_gpio_get() argument
73 if (gpio >= chip->ngpio) in bcm63xx_gpio_get()
76 if (gpio < 32) { in bcm63xx_gpio_get()
78 mask = 1 << gpio; in bcm63xx_gpio_get()
81 mask = 1 << (gpio - 32); in bcm63xx_gpio_get()
[all …]
/linux-4.1.27/drivers/net/wireless/ath/ath5k/
Dgpio.c106 ath5k_hw_set_gpio_input(struct ath5k_hw *ah, u32 gpio) in ath5k_hw_set_gpio_input() argument
108 if (gpio >= AR5K_NUM_GPIO) in ath5k_hw_set_gpio_input()
112 (ath5k_hw_reg_read(ah, AR5K_GPIOCR) & ~AR5K_GPIOCR_OUT(gpio)) in ath5k_hw_set_gpio_input()
113 | AR5K_GPIOCR_IN(gpio), AR5K_GPIOCR); in ath5k_hw_set_gpio_input()
124 ath5k_hw_set_gpio_output(struct ath5k_hw *ah, u32 gpio) in ath5k_hw_set_gpio_output() argument
126 if (gpio >= AR5K_NUM_GPIO) in ath5k_hw_set_gpio_output()
130 (ath5k_hw_reg_read(ah, AR5K_GPIOCR) & ~AR5K_GPIOCR_OUT(gpio)) in ath5k_hw_set_gpio_output()
131 | AR5K_GPIOCR_OUT(gpio), AR5K_GPIOCR); in ath5k_hw_set_gpio_output()
142 ath5k_hw_get_gpio(struct ath5k_hw *ah, u32 gpio) in ath5k_hw_get_gpio() argument
144 if (gpio >= AR5K_NUM_GPIO) in ath5k_hw_get_gpio()
[all …]
Drfkill.c42 ah->rf_kill.gpio, ah->rf_kill.polarity); in ath5k_rfkill_disable()
43 ath5k_hw_set_gpio_output(ah, ah->rf_kill.gpio); in ath5k_rfkill_disable()
44 ath5k_hw_set_gpio(ah, ah->rf_kill.gpio, !ah->rf_kill.polarity); in ath5k_rfkill_disable()
51 ah->rf_kill.gpio, ah->rf_kill.polarity); in ath5k_rfkill_enable()
52 ath5k_hw_set_gpio_output(ah, ah->rf_kill.gpio); in ath5k_rfkill_enable()
53 ath5k_hw_set_gpio(ah, ah->rf_kill.gpio, ah->rf_kill.polarity); in ath5k_rfkill_enable()
60 ath5k_hw_set_gpio_input(ah, ah->rf_kill.gpio); in ath5k_rfkill_set_intr()
61 curval = ath5k_hw_get_gpio(ah, ah->rf_kill.gpio); in ath5k_rfkill_set_intr()
62 ath5k_hw_set_gpio_intr(ah, ah->rf_kill.gpio, enable ? in ath5k_rfkill_set_intr()
71 return ath5k_hw_get_gpio(ah, ah->rf_kill.gpio) == in ath5k_is_rfkill_set()
[all …]
/linux-4.1.27/arch/mips/bcm63xx/boards/
Dboard_bcm963xx.c62 .gpio = 37,
92 .gpio = 2,
97 .gpio = 4,
103 .gpio = 8,
108 .gpio = 9,
113 .gpio = 11,
140 .gpio = 3,
145 .gpio = 5,
150 .gpio = 4,
155 .gpio = 0,
[all …]
/linux-4.1.27/drivers/rtc/
Drtc-v3020.c54 unsigned int gpio; member
63 struct v3020_gpio *gpio; member
122 v3020_gpio[V3020_CS].gpio = pdata->gpio_cs; in v3020_gpio_map()
123 v3020_gpio[V3020_WR].gpio = pdata->gpio_wr; in v3020_gpio_map()
124 v3020_gpio[V3020_RD].gpio = pdata->gpio_rd; in v3020_gpio_map()
125 v3020_gpio[V3020_IO].gpio = pdata->gpio_io; in v3020_gpio_map()
128 err = gpio_request(v3020_gpio[i].gpio, v3020_gpio[i].name); in v3020_gpio_map()
132 gpio_direction_output(v3020_gpio[i].gpio, 1); in v3020_gpio_map()
135 chip->gpio = v3020_gpio; in v3020_gpio_map()
141 gpio_free(v3020_gpio[i].gpio); in v3020_gpio_map()
[all …]
Drtc-ds2404.c46 unsigned int gpio; member
50 struct ds2404_gpio *gpio; member
66 ds2404_gpio[DS2404_RST].gpio = pdata->gpio_rst; in ds2404_gpio_map()
67 ds2404_gpio[DS2404_CLK].gpio = pdata->gpio_clk; in ds2404_gpio_map()
68 ds2404_gpio[DS2404_DQ].gpio = pdata->gpio_dq; in ds2404_gpio_map()
71 err = gpio_request(ds2404_gpio[i].gpio, ds2404_gpio[i].name); in ds2404_gpio_map()
78 gpio_direction_output(ds2404_gpio[i].gpio, 1); in ds2404_gpio_map()
81 chip->gpio = ds2404_gpio; in ds2404_gpio_map()
86 gpio_free(ds2404_gpio[i].gpio); in ds2404_gpio_map()
95 gpio_free(ds2404_gpio[i].gpio); in ds2404_gpio_unmap()
[all …]
/linux-4.1.27/drivers/pcmcia/
Dpxa2xx_colibri.c47 static struct gpio colibri_pcmcia_gpios[] = {
65 skt->socket.pci_irq = gpio_to_irq(colibri_pcmcia_gpios[READY].gpio); in colibri_pcmcia_hw_init()
66 skt->stat[SOC_STAT_CD].irq = gpio_to_irq(colibri_pcmcia_gpios[DETECT].gpio); in colibri_pcmcia_hw_init()
83 state->detect = !!gpio_get_value(colibri_pcmcia_gpios[DETECT].gpio); in colibri_pcmcia_socket_state()
84 state->ready = !!gpio_get_value(colibri_pcmcia_gpios[READY].gpio); in colibri_pcmcia_socket_state()
85 state->bvd1 = !!gpio_get_value(colibri_pcmcia_gpios[BVD1].gpio); in colibri_pcmcia_socket_state()
86 state->bvd2 = !!gpio_get_value(colibri_pcmcia_gpios[BVD2].gpio); in colibri_pcmcia_socket_state()
95 gpio_set_value(colibri_pcmcia_gpios[PPEN].gpio, in colibri_pcmcia_configure_socket()
97 gpio_set_value(colibri_pcmcia_gpios[RESET].gpio, in colibri_pcmcia_configure_socket()
130 colibri_pcmcia_gpios[RESET].gpio = COLIBRI270_RESET_GPIO; in colibri_pcmcia_init()
[all …]
/linux-4.1.27/include/trace/events/
Dgpio.h2 #define TRACE_SYSTEM gpio
11 TP_PROTO(unsigned gpio, int in, int err),
13 TP_ARGS(gpio, in, err),
16 __field(unsigned, gpio)
22 __entry->gpio = gpio;
27 TP_printk("%u %3s (%d)", __entry->gpio,
33 TP_PROTO(unsigned gpio, int get, int value),
35 TP_ARGS(gpio, get, value),
38 __field(unsigned, gpio)
44 __entry->gpio = gpio;
[all …]
/linux-4.1.27/Documentation/devicetree/bindings/rtc/
Dmoxa,moxart-rtc.txt6 - gpio-rtc-sclk : RTC sclk gpio, with zero flags
7 - gpio-rtc-data : RTC data gpio, with zero flags
8 - gpio-rtc-reset : RTC reset gpio, with zero flags
14 gpio-rtc-sclk = <&gpio 5 0>;
15 gpio-rtc-data = <&gpio 6 0>;
16 gpio-rtc-reset = <&gpio 7 0>;
/linux-4.1.27/arch/avr32/boards/atstk1000/
Dsetup.c75 { .name = "led0:amber", .gpio = GPIO_PIN_PB( 8), },
76 { .name = "led1:amber", .gpio = GPIO_PIN_PB( 9), },
77 { .name = "led2:amber", .gpio = GPIO_PIN_PB(10), },
78 { .name = "led3:amber", .gpio = GPIO_PIN_PB(13), },
79 { .name = "led4:amber", .gpio = GPIO_PIN_PB(14), },
80 { .name = "led5:amber", .gpio = GPIO_PIN_PB(15), },
81 { .name = "led6:amber", .gpio = GPIO_PIN_PB(16), },
82 { .name = "led7:amber", .gpio = GPIO_PIN_PB(30),
86 { .name = "r1:red", .gpio = GPIO_PIN_PB( 8), },
87 { .name = "g1:green", .gpio = GPIO_PIN_PB(10), },
[all …]
/linux-4.1.27/sound/aoa/fabrics/
Dlayout.c606 struct gpio_runtime gpio; member
637 struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \
638 if (gpio->methods && gpio->methods->get_##n) \
640 gpio->methods->get_##n(gpio); \
646 struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \
647 if (gpio->methods && gpio->methods->set_##n) \
648 gpio->methods->set_##n(gpio, \
730 v = ldev->gpio.methods->get_detect(&ldev->gpio, in detected_get()
734 v = ldev->gpio.methods->get_detect(&ldev->gpio, in detected_get()
793 codec->gpio = &ldev->gpio; in check_codec()
[all …]
/linux-4.1.27/drivers/video/fbdev/via/
Dvia-gpio.c90 struct viafb_gpio *gpio; in via_gpio_set() local
94 gpio = cfg->active_gpios[nr]; in via_gpio_set()
95 reg = via_read_reg(VIASR, gpio->vg_port_index); in via_gpio_set()
96 reg |= 0x40 << gpio->vg_mask_shift; /* output enable */ in via_gpio_set()
98 reg |= 0x10 << gpio->vg_mask_shift; in via_gpio_set()
100 reg &= ~(0x10 << gpio->vg_mask_shift); in via_gpio_set()
101 via_write_reg(VIASR, gpio->vg_port_index, reg); in via_gpio_set()
121 struct viafb_gpio *gpio; in via_gpio_dir_input() local
125 gpio = cfg->active_gpios[nr]; in via_gpio_dir_input()
126 via_write_reg_mask(VIASR, gpio->vg_port_index, 0, in via_gpio_dir_input()
[all …]
/linux-4.1.27/drivers/net/wireless/brcm80211/brcmsmac/
Dled.c21 if (wl->radio_led.gpio == -1) in brcms_radio_led_ctrl()
28 gpio_set_value(wl->radio_led.gpio, 1); in brcms_radio_led_ctrl()
30 gpio_set_value(wl->radio_led.gpio, 0); in brcms_radio_led_ctrl()
47 if (wl->radio_led.gpio != -1) in brcms_led_unregister()
48 gpio_free(wl->radio_led.gpio); in brcms_led_unregister()
57 struct gpio_chip *bcma_gpio = &cc_drv->gpio; in brcms_led_register()
63 unsigned gpio = -1; in brcms_led_register() local
67 radio_led->gpio = -1; in brcms_led_register()
77 gpio = bcma_gpio->base + i; in brcms_led_register()
84 if (gpio == -1 || !gpio_is_valid(gpio)) in brcms_led_register()
[all …]
/linux-4.1.27/arch/arm64/boot/dts/exynos/
Dexynos7-pinctrl.dtsi17 gpio-controller;
18 #gpio-cells = <2>;
28 gpio-controller;
29 #gpio-cells = <2>;
39 gpio-controller;
40 #gpio-cells = <2>;
47 gpio-controller;
48 #gpio-cells = <2>;
57 gpio-controller;
58 #gpio-cells = <2>;
[all …]
/linux-4.1.27/Documentation/zh_CN/
Dgpio.txt1 Chinese translated version of Documentation/gpio.txt
13 Documentation/gpio.txt 的中文翻译
92 #include <linux/gpio.h>
138 int gpio_direction_input(unsigned gpio);
139 int gpio_direction_output(unsigned gpio, int value);
168 int gpio_get_value(unsigned gpio);
171 void gpio_set_value(unsigned gpio, int value);
199 int gpio_cansleep(unsigned gpio);
204 int gpio_get_value_cansleep(unsigned gpio);
207 void gpio_set_value_cansleep(unsigned gpio, int value);
[all …]
/linux-4.1.27/include/linux/mfd/
Dasic3.h51 #define ASIC3_TO_GPIO(gpio) (NR_BUILTIN_GPIO + (gpio)) argument
58 #define ASIC3_GPIO(bank, gpio) \ argument
59 ((ASIC3_GPIOS_PER_BANK * ASIC3_GPIO_BANK_##bank) + (gpio))
60 #define ASIC3_GPIO_bit(gpio) (1 << (gpio & 0xf)) argument
73 #define ASIC3_GPIO_TO_BANK(gpio) ((gpio) >> 4) argument
74 #define ASIC3_GPIO_TO_BIT(gpio) ((gpio) - \ argument
75 (ASIC3_GPIOS_PER_BANK * ((gpio) >> 4)))
76 #define ASIC3_GPIO_TO_MASK(gpio) (1 << ASIC3_GPIO_TO_BIT(gpio)) argument
77 #define ASIC3_GPIO_TO_BASE(gpio) (ASIC3_GPIO_A_BASE + (((gpio) >> 4) * 0x0100)) argument
111 #define ASIC3_CONFIG_GPIO(gpio, alt, dir, init) (((gpio) & 0x7f) \ argument
[all …]
/linux-4.1.27/arch/mips/jz4740/
Dgpio.c73 #define GPIO_TO_BIT(gpio) BIT(gpio & 0x1f) argument
74 #define GPIO_TO_REG(gpio, reg) (gpio_to_jz_gpio_chip(gpio)->base + (reg)) argument
89 static inline struct jz_gpio_chip *gpio_to_jz_gpio_chip(unsigned int gpio) in gpio_to_jz_gpio_chip() argument
91 return &jz4740_gpio_chips[gpio >> 5]; in gpio_to_jz_gpio_chip()
105 static inline void jz_gpio_write_bit(unsigned int gpio, unsigned int reg) in jz_gpio_write_bit() argument
107 writel(GPIO_TO_BIT(gpio), GPIO_TO_REG(gpio, reg)); in jz_gpio_write_bit()
110 int jz_gpio_set_function(int gpio, enum jz_gpio_function function) in jz_gpio_set_function() argument
113 jz_gpio_write_bit(gpio, JZ_REG_GPIO_FUNC_CLEAR); in jz_gpio_set_function()
114 jz_gpio_write_bit(gpio, JZ_REG_GPIO_SELECT_CLEAR); in jz_gpio_set_function()
115 jz_gpio_write_bit(gpio, JZ_REG_GPIO_TRIGGER_CLEAR); in jz_gpio_set_function()
[all …]
/linux-4.1.27/arch/powerpc/platforms/85xx/
Dsgy_cts1000.c44 int trigger, gpio; in gpio_halt_cb() local
49 gpio = of_get_gpio_flags(halt_node, 0, &flags); in gpio_halt_cb()
51 if (!gpio_is_valid(gpio)) in gpio_halt_cb()
59 gpio_set_value(gpio, trigger); in gpio_halt_cb()
76 int gpio, err, irq; in gpio_halt_probe() local
93 gpio = of_get_gpio_flags(halt_node, 0, &flags); in gpio_halt_probe()
94 if (!gpio_is_valid(gpio)) in gpio_halt_probe()
97 err = gpio_request(gpio, "gpio-halt"); in gpio_halt_probe()
100 gpio); in gpio_halt_probe()
107 gpio_direction_output(gpio, !trigger); in gpio_halt_probe()
[all …]
/linux-4.1.27/drivers/acpi/acpica/
Drsserial.c70 {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.gpio.revision_id),
71 AML_OFFSET(gpio.revision_id),
74 {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.gpio.producer_consumer),
75 AML_OFFSET(gpio.flags),
78 {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.gpio.sharable),
79 AML_OFFSET(gpio.int_flags),
82 {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.gpio.wake_capable),
83 AML_OFFSET(gpio.int_flags),
86 {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.gpio.io_restriction),
87 AML_OFFSET(gpio.int_flags),
[all …]
/linux-4.1.27/drivers/pinctrl/bcm/
Dpinctrl-cygnus-gpio.c123 unsigned gpio, bool set) in cygnus_set_bit() argument
125 unsigned int offset = CYGNUS_GPIO_REG(gpio, reg); in cygnus_set_bit()
126 unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); in cygnus_set_bit()
138 unsigned gpio) in cygnus_get_bit() argument
140 unsigned int offset = CYGNUS_GPIO_REG(gpio, reg); in cygnus_get_bit()
141 unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); in cygnus_get_bit()
183 unsigned gpio = d->hwirq; in cygnus_gpio_irq_ack() local
184 unsigned int offset = CYGNUS_GPIO_REG(gpio, in cygnus_gpio_irq_ack()
186 unsigned int shift = CYGNUS_GPIO_SHIFT(gpio); in cygnus_gpio_irq_ack()
202 unsigned gpio = d->hwirq; in cygnus_gpio_irq_set_mask() local
[all …]
/linux-4.1.27/arch/blackfin/include/asm/
Dgpio.h123 void bfin_special_gpio_free(unsigned gpio);
124 int bfin_special_gpio_request(unsigned gpio, const char *label);
134 int bfin_gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl);
178 int bfin_gpio_irq_request(unsigned gpio, const char *label);
179 void bfin_gpio_irq_free(unsigned gpio);
180 void bfin_gpio_irq_prepare(unsigned gpio);
193 static inline int gpio_get_value(unsigned int gpio) in gpio_get_value() argument
195 return __gpio_get_value(gpio); in gpio_get_value()
198 static inline void gpio_set_value(unsigned int gpio, int value) in gpio_set_value() argument
200 __gpio_set_value(gpio, value); in gpio_set_value()
[all …]
/linux-4.1.27/Documentation/devicetree/bindings/i2c/
Di2c-gpio.txt1 Device-Tree bindings for i2c gpio driver
4 - compatible = "i2c-gpio";
5 - gpios: sda and scl gpio
9 - i2c-gpio,sda-open-drain: sda as open drain
10 - i2c-gpio,scl-open-drain: scl as open drain
11 - i2c-gpio,scl-output-only: scl as output only
12 - i2c-gpio,delay-us: delay between GPIO operations (may depend on each platform)
13 - i2c-gpio,timeout-ms: timeout to get data
18 compatible = "i2c-gpio";
22 i2c-gpio,sda-open-drain;
[all …]
/linux-4.1.27/arch/metag/boot/dts/
Dtz1090.dtsi48 #gpio-range-cells = <3>;
54 #gpio-range-cells = <3>;
62 compatible = "img,tz1090-gpio";
66 gpio-controller;
68 #gpio-cells = <2>;
72 gpio-ranges = <&pinctrl 0 0 30>;
75 gpio-controller;
77 #gpio-cells = <2>;
81 gpio-ranges = <&pinctrl 0 30 30>;
84 gpio-controller;
[all …]
/linux-4.1.27/Documentation/devicetree/bindings/spi/
Dspi-gpio.txt5 - compatible: should be set to "spi-gpio"
8 - gpio-sck: GPIO spec for the SCK line to use
9 - gpio-miso: GPIO spec for the MISO line to use
10 - gpio-mosi: GPIO spec for the MOSI line to use
19 compatible = "spi-gpio";
23 gpio-sck = <&gpio 95 0>;
24 gpio-miso = <&gpio 98 0>;
25 gpio-mosi = <&gpio 97 0>;
26 cs-gpios = <&gpio 125 0>;
/linux-4.1.27/arch/avr32/mach-at32ap/include/mach/
Dgpio.h17 static inline int gpio_get_value(unsigned int gpio) in gpio_get_value() argument
19 return __gpio_get_value(gpio); in gpio_get_value()
22 static inline void gpio_set_value(unsigned int gpio, int value) in gpio_set_value() argument
24 __gpio_set_value(gpio, value); in gpio_set_value()
27 static inline int gpio_cansleep(unsigned int gpio) in gpio_cansleep() argument
29 return __gpio_cansleep(gpio); in gpio_cansleep()
33 static inline int gpio_to_irq(unsigned int gpio) in gpio_to_irq() argument
35 if (gpio < NR_GPIO_IRQS) in gpio_to_irq()
36 return gpio + GPIO_IRQ_BASE; in gpio_to_irq()
/linux-4.1.27/arch/arm/mach-davinci/
Dboard-dm644x-evm.c302 evm_led_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c) in evm_led_setup() argument
308 leds->gpio = gpio++; in evm_led_setup()
329 evm_led_teardown(struct i2c_client *client, int gpio, unsigned ngpio, void *c) in evm_led_teardown() argument
361 evm_u18_setup(struct i2c_client *client, int gpio, unsigned ngpio, void *c) in evm_u18_setup() argument
366 sw_gpio = gpio + 7; in evm_u18_setup()
378 gpio_request(gpio + 3, "pll_fs2"); in evm_u18_setup()
379 gpio_direction_output(gpio + 3, 0); in evm_u18_setup()
381 gpio_request(gpio + 2, "pll_fs1"); in evm_u18_setup()
382 gpio_direction_output(gpio + 2, 0); in evm_u18_setup()
384 gpio_request(gpio + 1, "pll_sr"); in evm_u18_setup()
[all …]
/linux-4.1.27/drivers/input/mouse/
Dgpio_mouse.c24 struct gpio_mouse_platform_data *gpio = dev->private; in gpio_mouse_scan() local
28 if (gpio->bleft >= 0) in gpio_mouse_scan()
30 gpio_get_value(gpio->bleft) ^ gpio->polarity); in gpio_mouse_scan()
31 if (gpio->bmiddle >= 0) in gpio_mouse_scan()
33 gpio_get_value(gpio->bmiddle) ^ gpio->polarity); in gpio_mouse_scan()
34 if (gpio->bright >= 0) in gpio_mouse_scan()
36 gpio_get_value(gpio->bright) ^ gpio->polarity); in gpio_mouse_scan()
38 x = (gpio_get_value(gpio->right) ^ gpio->polarity) in gpio_mouse_scan()
39 - (gpio_get_value(gpio->left) ^ gpio->polarity); in gpio_mouse_scan()
40 y = (gpio_get_value(gpio->down) ^ gpio->polarity) in gpio_mouse_scan()
[all …]
/linux-4.1.27/arch/arm/plat-samsung/
Dsetup-camif.c40 int gpio = gpio_start + i; in s3c_camif_gpio_get() local
42 if (gpio == gpio_reset) in s3c_camif_gpio_get()
45 ret = gpio_request(gpio, "camif"); in s3c_camif_gpio_get()
47 ret = s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); in s3c_camif_gpio_get()
49 pr_err("failed to configure GPIO %d\n", gpio); in s3c_camif_gpio_get()
51 gpio_free(gpio--); in s3c_camif_gpio_get()
54 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); in s3c_camif_gpio_get()
67 int gpio = gpio_start + i; in s3c_camif_gpio_put() local
68 if (gpio != gpio_reset) in s3c_camif_gpio_put()
69 gpio_free(gpio); in s3c_camif_gpio_put()
/linux-4.1.27/arch/arm/mach-s3c24xx/
Dmach-n30.c97 .gpio = S3C2410_GPF(0),
103 .gpio = S3C2410_GPG(9),
109 .gpio = S3C2410_GPG(8),
115 .gpio = S3C2410_GPG(7),
121 .gpio = S3C2410_GPF(7),
127 .gpio = S3C2410_GPF(6),
133 .gpio = S3C2410_GPF(5),
139 .gpio = S3C2410_GPF(4),
161 .gpio = S3C2410_GPF(0),
169 .gpio = S3C2410_GPG(9),
[all …]
Dmach-smdk2416.c172 unsigned int gpio; in s3c2416_fb_gpio_setup_24bpp() local
174 for (gpio = S3C2410_GPC(1); gpio <= S3C2410_GPC(4); gpio++) { in s3c2416_fb_gpio_setup_24bpp()
175 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); in s3c2416_fb_gpio_setup_24bpp()
176 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); in s3c2416_fb_gpio_setup_24bpp()
179 for (gpio = S3C2410_GPC(8); gpio <= S3C2410_GPC(15); gpio++) { in s3c2416_fb_gpio_setup_24bpp()
180 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); in s3c2416_fb_gpio_setup_24bpp()
181 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); in s3c2416_fb_gpio_setup_24bpp()
184 for (gpio = S3C2410_GPD(0); gpio <= S3C2410_GPD(15); gpio++) { in s3c2416_fb_gpio_setup_24bpp()
185 s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); in s3c2416_fb_gpio_setup_24bpp()
186 s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); in s3c2416_fb_gpio_setup_24bpp()
/linux-4.1.27/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/
Dgpio.txt1 Every GPIO controller node must have #gpio-cells property defined,
2 this information will be used to translate gpio-specifiers.
13 - #gpio-cells : Should be two. The first cell is the pin number and the
15 - gpio-controller : Marks the port as GPIO controller.
17 Example of three SOC GPIO banks defined as gpio-controller nodes:
19 CPM1_PIO_A: gpio-controller@950 {
20 #gpio-cells = <2>;
23 gpio-controller;
26 CPM1_PIO_B: gpio-controller@ab8 {
27 #gpio-cells = <2>;
[all …]
/linux-4.1.27/Documentation/devicetree/bindings/net/ieee802154/
Dcc2520.txt10 - fifo-gpio: GPIO spec for the FIFO pin
11 - fifop-gpio: GPIO spec for the FIFOP pin
12 - sfd-gpio: GPIO spec for the SFD pin
13 - cca-gpio: GPIO spec for the CCA pin
14 - vreg-gpio: GPIO spec for the VREG pin
15 - reset-gpio: GPIO spec for the RESET pin
27 fifo-gpio = <&gpio1 18 0>;
28 fifop-gpio = <&gpio1 19 0>;
29 sfd-gpio = <&gpio1 13 0>;
30 cca-gpio = <&gpio1 16 0>;
[all …]
/linux-4.1.27/arch/sh/include/asm/
Dgpio.h27 static inline int gpio_get_value(unsigned gpio) in gpio_get_value() argument
29 return __gpio_get_value(gpio); in gpio_get_value()
32 static inline void gpio_set_value(unsigned gpio, int value) in gpio_set_value() argument
34 __gpio_set_value(gpio, value); in gpio_set_value()
37 static inline int gpio_cansleep(unsigned gpio) in gpio_cansleep() argument
39 return __gpio_cansleep(gpio); in gpio_cansleep()
42 static inline int gpio_to_irq(unsigned gpio) in gpio_to_irq() argument
44 return __gpio_to_irq(gpio); in gpio_to_irq()
/linux-4.1.27/arch/arm/mach-imx/
Dmach-pcm037_eet.c71 .gpio = 0,
77 .gpio = 1,
83 .gpio = 2,
89 .gpio = 3,
95 .gpio = 32,
101 .gpio = 33,
107 .gpio = 34,
113 .gpio = 35,
119 .gpio = 38,
125 .gpio = 39,
[all …]
/linux-4.1.27/drivers/leds/trigger/
Dledtrig-gpio.c28 unsigned gpio; /* gpio that triggers the leds */ member
48 if (!gpio_data->gpio) in gpio_trig_work()
51 tmp = gpio_get_value_cansleep(gpio_data->gpio); in gpio_trig_work()
136 return sprintf(buf, "%u\n", gpio_data->gpio); in gpio_trig_gpio_show()
144 unsigned gpio; in gpio_trig_gpio_store() local
147 ret = sscanf(buf, "%u", &gpio); in gpio_trig_gpio_store()
154 if (gpio_data->gpio == gpio) in gpio_trig_gpio_store()
157 if (!gpio) { in gpio_trig_gpio_store()
158 if (gpio_data->gpio != 0) in gpio_trig_gpio_store()
159 free_irq(gpio_to_irq(gpio_data->gpio), led); in gpio_trig_gpio_store()
[all …]
/linux-4.1.27/arch/blackfin/mach-bf538/
Dext-gpio.c37 static int bf538_gpio_get_value(struct gpio_chip *chip, unsigned gpio) in bf538_gpio_get_value() argument
40 return !!(read_PORTIO(port) & (1u << gpio)); in bf538_gpio_get_value()
43 static void bf538_gpio_set_value(struct gpio_chip *chip, unsigned gpio, int value) in bf538_gpio_set_value() argument
47 write_PORTIO_SET(port, (1u << gpio)); in bf538_gpio_set_value()
49 write_PORTIO_CLEAR(port, (1u << gpio)); in bf538_gpio_set_value()
52 static int bf538_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) in bf538_gpio_direction_input() argument
55 write_PORTIO_DIR(port, read_PORTIO_DIR(port) & ~(1u << gpio)); in bf538_gpio_direction_input()
56 write_PORTIO_INEN(port, read_PORTIO_INEN(port) | (1u << gpio)); in bf538_gpio_direction_input()
60 static int bf538_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int value) in bf538_gpio_direction_output() argument
63 write_PORTIO_INEN(port, read_PORTIO_INEN(port) & ~(1u << gpio)); in bf538_gpio_direction_output()
[all …]
/linux-4.1.27/drivers/tty/serial/
Difx6x60.c123 gpio_set_value(ifx->gpio.mrdy, 1); in mrdy_set_high()
133 gpio_set_value(ifx->gpio.mrdy, 0); in mrdy_set_low()
260 int val = gpio_get_value(ifx_dev->gpio.srdy); in mrdy_assert()
704 srdy = gpio_get_value(ifx_dev->gpio.srdy); in ifx_spi_complete()
746 if (ifx_dev->gpio.unack_srdy_int_nb > 0) in ifx_spi_io()
747 ifx_dev->gpio.unack_srdy_int_nb--; in ifx_spi_io()
892 ifx_dev->gpio.unack_srdy_int_nb++; in ifx_spi_srdy_interrupt()
911 int val = gpio_get_value(ifx_dev->gpio.reset_out); in ifx_spi_reset_interrupt()
967 gpio_set_value(ifx_dev->gpio.po, 0); in ifx_spi_reset()
968 gpio_set_value(ifx_dev->gpio.reset, 0); in ifx_spi_reset()
[all …]
Dserial_mctrl_gpio.c26 struct gpio_desc *gpio[UART_GPIO_MAX]; member
52 if (!IS_ERR_OR_NULL(gpios->gpio[i]) && in mctrl_gpio_set()
54 desc_array[count] = gpios->gpio[i]; in mctrl_gpio_set()
65 return gpios->gpio[gidx]; in mctrl_gpio_to_gpiod()
74 if (gpios->gpio[i] && !mctrl_gpios_desc[i].dir_out) { in mctrl_gpio_get()
75 if (gpiod_get_value(gpios->gpio[i])) in mctrl_gpio_get()
103 gpios->gpio[i] = in mctrl_gpio_init()
108 if (IS_ERR(gpios->gpio[i])) in mctrl_gpio_init()
109 return ERR_CAST(gpios->gpio[i]); in mctrl_gpio_init()
121 if (!IS_ERR_OR_NULL(gpios->gpio[i])) in mctrl_gpio_free()
[all …]
/linux-4.1.27/Documentation/devicetree/bindings/sound/
Drt5677.txt13 - gpio-controller : Indicates this device is a GPIO controller.
15 - #gpio-cells : Should be two. The first cell is the pin number and the
20 - realtek,pow-ldo2-gpio : The GPIO that controls the CODEC's POW_LDO2 pin.
30 - realtek,gpio-config
36 - realtek,jd1-gpio
40 - realtek,jd2-gpio
41 - realtek,jd3-gpio
65 interrupt-parent = <&gpio>;
68 gpio-controller;
69 #gpio-cells = <2>;
[all …]
/linux-4.1.27/sound/soc/
Dsoc-ac97.c165 int gpio; in snd_soc_ac97_parse_pinctl() local
196 gpio = of_get_named_gpio(dev->of_node, "ac97-gpios", 0); in snd_soc_ac97_parse_pinctl()
197 if (gpio < 0) { in snd_soc_ac97_parse_pinctl()
199 return gpio; in snd_soc_ac97_parse_pinctl()
201 ret = devm_gpio_request(dev, gpio, "AC97 link sync"); in snd_soc_ac97_parse_pinctl()
206 cfg->gpio_sync = gpio; in snd_soc_ac97_parse_pinctl()
208 gpio = of_get_named_gpio(dev->of_node, "ac97-gpios", 1); in snd_soc_ac97_parse_pinctl()
209 if (gpio < 0) { in snd_soc_ac97_parse_pinctl()
210 dev_err(dev, "Can't find ac97-sdata gpio %d\n", gpio); in snd_soc_ac97_parse_pinctl()
211 return gpio; in snd_soc_ac97_parse_pinctl()
[all …]
Dsoc-jack.c248 static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio) in snd_soc_jack_gpio_detect() argument
250 struct snd_soc_jack *jack = gpio->jack; in snd_soc_jack_gpio_detect()
254 enable = gpiod_get_value_cansleep(gpio->desc); in snd_soc_jack_gpio_detect()
255 if (gpio->invert) in snd_soc_jack_gpio_detect()
259 report = gpio->report; in snd_soc_jack_gpio_detect()
263 if (gpio->jack_status_check) in snd_soc_jack_gpio_detect()
264 report = gpio->jack_status_check(gpio->data); in snd_soc_jack_gpio_detect()
266 snd_soc_jack_report(jack, report, gpio->report); in snd_soc_jack_gpio_detect()
272 struct snd_soc_jack_gpio *gpio = data; in gpio_handler() local
273 struct device *dev = gpio->jack->card->dev; in gpio_handler()
[all …]
/linux-4.1.27/drivers/leds/
Dleds-lt3593.c30 unsigned gpio; member
51 gpio_set_value_cansleep(led_dat->gpio, 0); in lt3593_led_work()
58 gpio_set_value_cansleep(led_dat->gpio, 0); in lt3593_led_work()
60 gpio_set_value_cansleep(led_dat->gpio, 1); in lt3593_led_work()
64 gpio_set_value_cansleep(led_dat->gpio, 1); in lt3593_led_work()
67 gpio_set_value_cansleep(led_dat->gpio, 0); in lt3593_led_work()
69 gpio_set_value_cansleep(led_dat->gpio, 1); in lt3593_led_work()
90 if (!gpio_is_valid(template->gpio)) { in create_lt3593_led()
92 KBUILD_MODNAME, template->gpio, template->name); in create_lt3593_led()
98 led_dat->gpio = template->gpio; in create_lt3593_led()
[all …]
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
Dgpio.c64 u16 gpio; in dcb_gpio_entry() local
67 gpio = dcb_gpio_table(bios, ver, &hdr, &cnt, len); in dcb_gpio_entry()
69 gpio = dcb_xpio_table(bios, idx, &xver, &hdr, &cnt, len); in dcb_gpio_entry()
71 if (gpio && ent < cnt) in dcb_gpio_entry()
72 return gpio + hdr + (ent * *len); in dcb_gpio_entry()
79 struct dcb_gpio_func *gpio) in dcb_gpio_parse() argument
85 *gpio = (struct dcb_gpio_func) { in dcb_gpio_parse()
95 *gpio = (struct dcb_gpio_func) { in dcb_gpio_parse()
105 *gpio = (struct dcb_gpio_func) { in dcb_gpio_parse()
120 u8 *ver, u8 *len, struct dcb_gpio_func *gpio) in dcb_gpio_match() argument
[all …]
/linux-4.1.27/drivers/media/pci/bt8xx/
Dbttv-input.c56 u32 gpio,data; in ir_handle_key() local
59 gpio = bttv_gpio_read(&btv->c); in ir_handle_key()
61 if (ir->last_gpio == gpio) in ir_handle_key()
63 ir->last_gpio = gpio; in ir_handle_key()
67 data = ir_extract_bits(gpio, ir->mask_keycode); in ir_handle_key()
69 gpio, data, in ir_handle_key()
71 (gpio & ir->mask_keydown) ? " down" : "", in ir_handle_key()
72 (gpio & ir->mask_keyup) ? " up" : ""); in ir_handle_key()
74 if ((ir->mask_keydown && (gpio & ir->mask_keydown)) || in ir_handle_key()
75 (ir->mask_keyup && !(gpio & ir->mask_keyup))) { in ir_handle_key()
[all …]
/linux-4.1.27/drivers/staging/fbtft/
Dfbtft-core.c78 const struct fbtft_gpio *gpio) in fbtft_request_gpios_match() argument
84 __func__, gpio->name); in fbtft_request_gpios_match()
86 if (strcasecmp(gpio->name, "reset") == 0) { in fbtft_request_gpios_match()
87 par->gpio.reset = gpio->gpio; in fbtft_request_gpios_match()
89 } else if (strcasecmp(gpio->name, "dc") == 0) { in fbtft_request_gpios_match()
90 par->gpio.dc = gpio->gpio; in fbtft_request_gpios_match()
92 } else if (strcasecmp(gpio->name, "cs") == 0) { in fbtft_request_gpios_match()
93 par->gpio.cs = gpio->gpio; in fbtft_request_gpios_match()
95 } else if (strcasecmp(gpio->name, "wr") == 0) { in fbtft_request_gpios_match()
96 par->gpio.wr = gpio->gpio; in fbtft_request_gpios_match()
[all …]
Dfb_agm1264k-fl.c38 #define EPIN gpio.wr
39 #define RS gpio.dc
40 #define RW gpio.aux[2]
41 #define CS0 gpio.aux[0]
42 #define CS1 gpio.aux[1]
94 if (par->gpio.reset == -1) in reset()
99 gpio_set_value(par->gpio.reset, 0); in reset()
101 gpio_set_value(par->gpio.reset, 1); in reset()
119 if (par->gpio.db[i] < 0) { in verify_gpios()
146 request_gpios_match(struct fbtft_par *par, const struct fbtft_gpio *gpio) in request_gpios_match() argument
[all …]
/linux-4.1.27/arch/mips/include/asm/mach-generic/
Dgpio.h9 int gpio_request(unsigned gpio, const char *label);
10 void gpio_free(unsigned gpio);
11 int gpio_direction_input(unsigned gpio);
12 int gpio_direction_output(unsigned gpio, int value);
13 int gpio_get_value(unsigned gpio);
14 void gpio_set_value(unsigned gpio, int value);
16 int gpio_to_irq(unsigned gpio);
/linux-4.1.27/drivers/gpu/drm/nouveau/nvkm/subdev/volt/
Dgpio.c37 struct nvkm_gpio *gpio = nvkm_gpio(volt); in nvkm_voltgpio_get() local
43 int ret = gpio->get(gpio, 0, tags[i], 0xff); in nvkm_voltgpio_get()
56 struct nvkm_gpio *gpio = nvkm_gpio(volt); in nvkm_voltgpio_set() local
61 int ret = gpio->set(gpio, 0, tags[i], 0xff, vid & 1); in nvkm_voltgpio_set()
73 struct nvkm_gpio *gpio = nvkm_gpio(volt); in nvkm_voltgpio_init() local
85 int ret = gpio->find(gpio, 0, tags[i], 0xff, &func); in nvkm_voltgpio_init()
/linux-4.1.27/arch/mips/ath79/
Dgpio.c32 static void __ath79_gpio_set_value(unsigned gpio, int value) in __ath79_gpio_set_value() argument
37 __raw_writel(1 << gpio, base + AR71XX_GPIO_REG_SET); in __ath79_gpio_set_value()
39 __raw_writel(1 << gpio, base + AR71XX_GPIO_REG_CLEAR); in __ath79_gpio_set_value()
42 static int __ath79_gpio_get_value(unsigned gpio) in __ath79_gpio_get_value() argument
44 return (__raw_readl(ath79_gpio_base + AR71XX_GPIO_REG_IN) >> gpio) & 1; in __ath79_gpio_get_value()
214 int gpio_get_value(unsigned gpio) in gpio_get_value() argument
216 if (gpio < ath79_gpio_count) in gpio_get_value()
217 return __ath79_gpio_get_value(gpio); in gpio_get_value()
219 return __gpio_get_value(gpio); in gpio_get_value()
223 void gpio_set_value(unsigned gpio, int value) in gpio_set_value() argument
[all …]
/linux-4.1.27/drivers/usb/phy/
Dphy-gpio-vbus-usb.c105 int gpio, status, vbus; in gpio_vbus_work() local
120 gpio = pdata->gpio_pullup; in gpio_vbus_work()
132 if (gpio_is_valid(gpio)) in gpio_vbus_work()
133 gpio_set_value(gpio, !pdata->gpio_pullup_inverted); in gpio_vbus_work()
140 if (gpio_is_valid(gpio)) in gpio_vbus_work()
141 gpio_set_value(gpio, pdata->gpio_pullup_inverted); in gpio_vbus_work()
183 int gpio; in gpio_vbus_set_peripheral() local
188 gpio = pdata->gpio_pullup; in gpio_vbus_set_peripheral()
195 if (gpio_is_valid(gpio)) in gpio_vbus_set_peripheral()
196 gpio_set_value(gpio, pdata->gpio_pullup_inverted); in gpio_vbus_set_peripheral()
[all …]
/linux-4.1.27/drivers/platform/x86/
Dintel_pmic_gpio.c79 static void pmic_program_irqtype(int gpio, int type) in pmic_program_irqtype() argument
82 intel_scu_ipc_update_register(GPIO0 + gpio, 0x20, 0x20); in pmic_program_irqtype()
84 intel_scu_ipc_update_register(GPIO0 + gpio, 0x00, 0x20); in pmic_program_irqtype()
87 intel_scu_ipc_update_register(GPIO0 + gpio, 0x10, 0x10); in pmic_program_irqtype()
89 intel_scu_ipc_update_register(GPIO0 + gpio, 0x00, 0x10); in pmic_program_irqtype()
165 u32 gpio = data->irq - pg->irq_base; in pmic_irq_type() local
167 if (gpio >= pg->chip.ngpio) in pmic_irq_type()
171 pg->update_type = gpio | GPIO_UPDATE_TYPE; in pmic_irq_type()
194 unsigned int gpio = pg->update_type & ~GPIO_UPDATE_TYPE; in pmic_bus_sync_unlock() local
196 pmic_program_irqtype(gpio, pg->trigger_type); in pmic_bus_sync_unlock()
[all …]
/linux-4.1.27/sound/pci/ice1712/
Dice1712.h376 } gpio; member
410 ice->gpio.set_dir(ice, bits); in snd_ice1712_gpio_set_dir()
415 return ice->gpio.get_dir(ice); in snd_ice1712_gpio_get_dir()
420 ice->gpio.set_mask(ice, bits); in snd_ice1712_gpio_set_mask()
425 ice->gpio.set_data(ice, val); in snd_ice1712_gpio_write()
430 return ice->gpio.get_data(ice); in snd_ice1712_gpio_read()
441 ice->gpio.saved[0] = ice->gpio.direction; in snd_ice1712_save_gpio_status()
442 ice->gpio.saved[1] = ice->gpio.write_mask; in snd_ice1712_save_gpio_status()
447 ice->gpio.set_dir(ice, ice->gpio.saved[0]); in snd_ice1712_restore_gpio_status()
448 ice->gpio.set_mask(ice, ice->gpio.saved[1]); in snd_ice1712_restore_gpio_status()
[all …]
/linux-4.1.27/drivers/clk/
Dclk-gpio-gate.c73 const char *parent_name, unsigned gpio, bool active_low, in clk_register_gpio_gate() argument
88 err = devm_gpio_request_one(dev, gpio, gpio_flags, name); in clk_register_gpio_gate()
90 err = gpio_request_one(gpio, gpio_flags, name); in clk_register_gpio_gate()
94 __func__, name, gpio); in clk_register_gpio_gate()
115 clk_gpio->gpiod = gpio_to_desc(gpio); in clk_register_gpio_gate()
128 gpio_free(gpio); in clk_register_gpio_gate()
154 int gpio; in of_clk_gpio_gate_delayed_register_get() local
164 gpio = of_get_named_gpio_flags(data->node, "enable-gpios", 0, in of_clk_gpio_gate_delayed_register_get()
166 if (gpio < 0) { in of_clk_gpio_gate_delayed_register_get()
168 if (gpio != -EPROBE_DEFER) in of_clk_gpio_gate_delayed_register_get()
[all …]
/linux-4.1.27/arch/mips/include/asm/mach-cavium-octeon/
Dgpio.h9 int gpio_request(unsigned gpio, const char *label);
10 void gpio_free(unsigned gpio);
11 int gpio_direction_input(unsigned gpio);
12 int gpio_direction_output(unsigned gpio, int value);
13 int gpio_get_value(unsigned gpio);
14 void gpio_set_value(unsigned gpio, int value);
/linux-4.1.27/Documentation/devicetree/bindings/extcon/
Dextcon-usb-gpio.txt7 - compatible: Should be "linux,extcon-usb-gpio"
8 - id-gpio: gpio for USB ID pin. See gpio binding.
10 Example: Examples of extcon-usb-gpio node in dra7-evm.dts as listed below:
12 compatible = "linux,extcon-usb-gpio";
13 id-gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>;
/linux-4.1.27/arch/arm/mach-omap1/
Dams-delta-fiq.c47 int gpio, irq_num, fiq_count; in deferred_fiq() local
56 for (gpio = AMS_DELTA_GPIO_PIN_KEYBRD_CLK; in deferred_fiq()
57 gpio <= AMS_DELTA_GPIO_PIN_HOOK_SWITCH; gpio++) { in deferred_fiq()
58 irq_num = gpio_to_irq(gpio); in deferred_fiq()
59 fiq_count = fiq_buffer[FIQ_CNT_INT_00 + gpio]; in deferred_fiq()
61 while (irq_counter[gpio] < fiq_count) { in deferred_fiq()
62 if (gpio != AMS_DELTA_GPIO_PIN_KEYBRD_CLK) { in deferred_fiq()
75 irq_counter[gpio]++; in deferred_fiq()
/linux-4.1.27/Documentation/devicetree/bindings/powerpc/fsl/cpm_qe/qe/
Dpar_io.txt27 via its own gpio-controller node:
30 - #gpio-cells : should be "2".
34 - gpio-controller : node to identify gpio controllers.
37 qe_pio_a: gpio-controller@1400 {
38 #gpio-cells = <2>;
42 gpio-controller;
45 qe_pio_e: gpio-controller@1460 {
46 #gpio-cells = <2>;
50 gpio-controller;
/linux-4.1.27/arch/arm/mach-nomadik/
Dcpu-8815.c119 int gpio, err; in cpu8815_mmcsd_init() local
126 gpio = of_get_gpio(cdbias, 0); in cpu8815_mmcsd_init()
127 if (gpio < 0) { in cpu8815_mmcsd_init()
131 err = gpio_request(gpio, "card detect bias"); in cpu8815_mmcsd_init()
133 pr_info("failed to request card detect bias GPIO %d\n", gpio); in cpu8815_mmcsd_init()
136 err = gpio_direction_output(gpio, 0); in cpu8815_mmcsd_init()
138 pr_info("failed to set GPIO %d as output, low\n", gpio); in cpu8815_mmcsd_init()
141 pr_info("enabled USB-S8815 CD bias GPIO %d, low\n", gpio); in cpu8815_mmcsd_init()
/linux-4.1.27/drivers/media/usb/tm6000/
Dtm6000-cards.c82 struct tm6000_gpio gpio; member
97 .gpio = {
124 .gpio = {
150 .gpio = {
181 .gpio = {
217 .gpio = {
298 .gpio = {
327 .gpio = {
362 .gpio = {
400 .gpio = {
[all …]
/linux-4.1.27/arch/arm/common/
Dscoop.c37 struct gpio_chip gpio; member
72 struct scoop_dev *sdev = container_of(chip, struct scoop_dev, gpio); in scoop_gpio_set()
84 struct scoop_dev *sdev = container_of(chip, struct scoop_dev, gpio); in scoop_gpio_get()
93 struct scoop_dev *sdev = container_of(chip, struct scoop_dev, gpio); in scoop_gpio_direction_input()
111 struct scoop_dev *sdev = container_of(chip, struct scoop_dev, gpio); in scoop_gpio_direction_output()
216 devptr->gpio.base = -1; in scoop_probe()
219 devptr->gpio.label = dev_name(&pdev->dev); in scoop_probe()
220 devptr->gpio.base = inf->gpio_base; in scoop_probe()
221 devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */ in scoop_probe()
222 devptr->gpio.set = scoop_gpio_set; in scoop_probe()
[all …]

12345678910