Home
last modified time | relevance | path

Searched refs:gpio (Results 1 – 25 of 543) sorted by relevance

12345678910>>...22

/drivers/gpio/
DMakefile13 obj-$(CONFIG_GPIO_GENERIC) += gpio-generic.o
16 gpio-generic-$(CONFIG_GPIO_GENERIC) += gpio-mmio.o
18 obj-$(CONFIG_GPIO_104_DIO_48E) += gpio-104-dio-48e.o
19 obj-$(CONFIG_GPIO_104_IDIO_16) += gpio-104-idio-16.o
20 obj-$(CONFIG_GPIO_104_IDI_48) += gpio-104-idi-48.o
21 obj-$(CONFIG_GPIO_74X164) += gpio-74x164.o
22 obj-$(CONFIG_GPIO_74XX_MMIO) += gpio-74xx-mmio.o
23 obj-$(CONFIG_GPIO_ADNP) += gpio-adnp.o
24 obj-$(CONFIG_GPIO_ADP5520) += gpio-adp5520.o
25 obj-$(CONFIG_GPIO_ADP5588) += gpio-adp5588.o
[all …]
Dgpio-dwapb.c77 struct dwapb_gpio *gpio; member
92 static inline u32 dwapb_read(struct dwapb_gpio *gpio, unsigned int offset) in dwapb_read() argument
94 struct gpio_chip *gc = &gpio->ports[0].gc; 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 gpio_chip *gc = &gpio->ports[0].gc; in dwapb_write()
104 void __iomem *reg_base = gpio->regs; in dwapb_write()
112 struct dwapb_gpio *gpio = port->gpio; in dwapb_gpio_to_irq() local
114 return irq_find_mapping(gpio->domain, offset); in dwapb_gpio_to_irq()
117 static void dwapb_toggle_trigger(struct dwapb_gpio *gpio, unsigned int offs) in dwapb_toggle_trigger() argument
[all …]
Dgpio-pcf857x.c140 struct pcf857x *gpio = gpiochip_get_data(chip); in pcf857x_input() local
143 mutex_lock(&gpio->lock); in pcf857x_input()
144 gpio->out |= (1 << offset); in pcf857x_input()
145 status = gpio->write(gpio->client, gpio->out); in pcf857x_input()
146 mutex_unlock(&gpio->lock); in pcf857x_input()
153 struct pcf857x *gpio = gpiochip_get_data(chip); in pcf857x_get() local
156 value = gpio->read(gpio->client); in pcf857x_get()
162 struct pcf857x *gpio = gpiochip_get_data(chip); in pcf857x_output() local
166 mutex_lock(&gpio->lock); in pcf857x_output()
168 gpio->out |= bit; in pcf857x_output()
[all …]
Dgpio-aspeed.c93 static void __iomem *bank_val_reg(struct aspeed_gpio *gpio, in bank_val_reg() argument
97 return gpio->base + bank->val_regs + reg; in bank_val_reg()
100 static void __iomem *bank_irq_reg(struct aspeed_gpio *gpio, in bank_irq_reg() argument
104 return gpio->base + bank->irq_regs + reg; in bank_irq_reg()
109 struct aspeed_gpio *gpio = gpiochip_get_data(gc); in aspeed_gpio_get() local
112 return !!(ioread32(bank_val_reg(gpio, bank, GPIO_DATA)) in aspeed_gpio_get()
119 struct aspeed_gpio *gpio = gpiochip_get_data(gc); in __aspeed_gpio_set() local
124 addr = bank_val_reg(gpio, bank, GPIO_DATA); in __aspeed_gpio_set()
138 struct aspeed_gpio *gpio = gpiochip_get_data(gc); in aspeed_gpio_set() local
141 spin_lock_irqsave(&gpio->lock, flags); in aspeed_gpio_set()
[all …]
Dgpio-pisosr.c42 static int pisosr_gpio_refresh(struct pisosr_gpio *gpio) in pisosr_gpio_refresh() argument
46 mutex_lock(&gpio->lock); in pisosr_gpio_refresh()
48 if (gpio->load_gpio) { in pisosr_gpio_refresh()
49 gpiod_set_value_cansleep(gpio->load_gpio, 1); in pisosr_gpio_refresh()
51 gpiod_set_value_cansleep(gpio->load_gpio, 0); in pisosr_gpio_refresh()
55 ret = spi_read(gpio->spi, gpio->buffer, gpio->buffer_size); in pisosr_gpio_refresh()
57 mutex_unlock(&gpio->lock); in pisosr_gpio_refresh()
85 struct pisosr_gpio *gpio = gpiochip_get_data(chip); in pisosr_gpio_get() local
88 pisosr_gpio_refresh(gpio); in pisosr_gpio_get()
90 return (gpio->buffer[offset / 8] >> (offset % 8)) & 0x1; in pisosr_gpio_get()
[all …]
Dgpio-zynq.c152 struct zynq_gpio *gpio) in zynq_gpio_get_bank_pin() argument
156 for (bank = 0; bank < gpio->p_data->max_bank; bank++) { in zynq_gpio_get_bank_pin()
157 if ((pin_num >= gpio->p_data->bank_min[bank]) && in zynq_gpio_get_bank_pin()
158 (pin_num <= gpio->p_data->bank_max[bank])) { in zynq_gpio_get_bank_pin()
161 gpio->p_data->bank_min[bank]; in zynq_gpio_get_bank_pin()
185 struct zynq_gpio *gpio = gpiochip_get_data(chip); in zynq_gpio_get_value() local
187 zynq_gpio_get_bank_pin(pin, &bank_num, &bank_pin_num, gpio); in zynq_gpio_get_value()
189 data = readl_relaxed(gpio->base_addr + in zynq_gpio_get_value()
209 struct zynq_gpio *gpio = gpiochip_get_data(chip); in zynq_gpio_set_value() local
211 zynq_gpio_get_bank_pin(pin, &bank_num, &bank_pin_num, gpio); in zynq_gpio_set_value()
[all …]
Dgpio-axp209.c51 struct axp20x_gpio *gpio = gpiochip_get_data(chip); in axp20x_gpio_input() local
58 return regmap_update_bits(gpio->regmap, reg, in axp20x_gpio_input()
65 struct axp20x_gpio *gpio = gpiochip_get_data(chip); in axp20x_gpio_get() local
73 ret = regmap_read(gpio->regmap, reg, &val); in axp20x_gpio_get()
82 struct axp20x_gpio *gpio = gpiochip_get_data(chip); in axp20x_gpio_get_direction() local
90 ret = regmap_read(gpio->regmap, reg, &val); in axp20x_gpio_get_direction()
112 struct axp20x_gpio *gpio = gpiochip_get_data(chip); in axp20x_gpio_output() local
119 return regmap_update_bits(gpio->regmap, reg, in axp20x_gpio_output()
134 struct axp20x_gpio *gpio; in axp20x_gpio_probe() local
145 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); in axp20x_gpio_probe()
[all …]
Dgpio-da9052.c61 struct da9052_gpio *gpio = gpiochip_get_data(gc); in da9052_gpio_get() local
65 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
80 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
83 ret = da9052_reg_read(gpio->da9052, in da9052_gpio_get()
100 struct da9052_gpio *gpio = gpiochip_get_data(gc); in da9052_gpio_set() local
104 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_set()
109 dev_err(gpio->da9052->dev, in da9052_gpio_set()
113 ret = da9052_reg_update(gpio->da9052, (offset >> 1) + in da9052_gpio_set()
118 dev_err(gpio->da9052->dev, in da9052_gpio_set()
126 struct da9052_gpio *gpio = gpiochip_get_data(gc); in da9052_gpio_direction_input() local
[all …]
Dgpio-crystalcove.c89 static inline int to_reg(int gpio, enum ctrl_register reg_type) in to_reg() argument
93 if (gpio >= CRYSTALCOVE_GPIO_NUM) { in to_reg()
98 switch (gpio) { in to_reg()
107 if (gpio < 8) in to_reg()
112 if (gpio < 8) in to_reg()
118 return reg + gpio % 8; in to_reg()
122 int gpio) in crystalcove_update_irq_mask() argument
124 u8 mirqs0 = gpio < 8 ? MGPIO0IRQS0 : MGPIO1IRQS0; in crystalcove_update_irq_mask()
125 int mask = BIT(gpio % 8); in crystalcove_update_irq_mask()
133 static void crystalcove_update_irq_ctrl(struct crystalcove_gpio *cg, int gpio) in crystalcove_update_irq_ctrl() argument
[all …]
Dgpio-tegra.c121 int gpio, int value) in tegra_gpio_mask_write() argument
125 val = 0x100 << GPIO_BIT(gpio); in tegra_gpio_mask_write()
127 val |= 1 << GPIO_BIT(gpio); in tegra_gpio_mask_write()
131 static void tegra_gpio_enable(struct tegra_gpio_info *tgi, int gpio) in tegra_gpio_enable() argument
133 tegra_gpio_mask_write(tgi, GPIO_MSK_CNF(tgi, gpio), gpio, 1); in tegra_gpio_enable()
136 static void tegra_gpio_disable(struct tegra_gpio_info *tgi, int gpio) in tegra_gpio_disable() argument
138 tegra_gpio_mask_write(tgi, GPIO_MSK_CNF(tgi, gpio), gpio, 0); in tegra_gpio_disable()
252 int gpio = d->hwirq; in tegra_gpio_irq_ack() local
254 tegra_gpio_writel(tgi, 1 << GPIO_BIT(gpio), GPIO_INT_CLR(tgi, gpio)); in tegra_gpio_irq_ack()
261 int gpio = d->hwirq; in tegra_gpio_irq_mask() local
[all …]
Dgpio-tps65912.c34 struct tps65912_gpio *gpio = gpiochip_get_data(gc); in tps65912_gpio_get_direction() local
38 ret = regmap_read(gpio->tps->regmap, TPS65912_GPIO1 + offset, &val); in tps65912_gpio_get_direction()
50 struct tps65912_gpio *gpio = gpiochip_get_data(gc); in tps65912_gpio_direction_input() local
52 return regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_direction_input()
59 struct tps65912_gpio *gpio = gpiochip_get_data(gc); in tps65912_gpio_direction_output() local
62 regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_direction_output()
65 return regmap_update_bits(gpio->tps->regmap, TPS65912_GPIO1 + offset, in tps65912_gpio_direction_output()
71 struct tps65912_gpio *gpio = gpiochip_get_data(gc); in tps65912_gpio_get() local
74 ret = regmap_read(gpio->tps->regmap, TPS65912_GPIO1 + offset, &val); in tps65912_gpio_get()
87 struct tps65912_gpio *gpio = gpiochip_get_data(gc); in tps65912_gpio_set() local
[all …]
Dgpio-da9055.c40 struct da9055_gpio *gpio = gpiochip_get_data(gc); in da9055_gpio_get() local
45 ret = da9055_reg_read(gpio->da9055, (offset >> 1) + DA9055_REG_GPIO0_1); in da9055_gpio_get()
53 ret = da9055_reg_read(gpio->da9055, DA9055_REG_STATUS_B); in da9055_gpio_get()
58 ret = da9055_reg_read(gpio->da9055, DA9055_REG_GPIO_MODE0_2); in da9055_gpio_get()
69 struct da9055_gpio *gpio = gpiochip_get_data(gc); in da9055_gpio_set() local
71 da9055_reg_update(gpio->da9055, in da9055_gpio_set()
79 struct da9055_gpio *gpio = gpiochip_get_data(gc); in da9055_gpio_direction_input() local
85 return da9055_reg_update(gpio->da9055, (offset >> 1) + in da9055_gpio_direction_input()
95 struct da9055_gpio *gpio = gpiochip_get_data(gc); in da9055_gpio_direction_output() local
102 ret = da9055_reg_update(gpio->da9055, (offset >> 1) + in da9055_gpio_direction_output()
[all …]
Dgpio-mb86s7x.c46 static int mb86s70_gpio_request(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_request() argument
54 val = readl(gchip->base + PFR(gpio)); in mb86s70_gpio_request()
55 if (!(val & OFFSET(gpio))) { in mb86s70_gpio_request()
60 val &= ~OFFSET(gpio); in mb86s70_gpio_request()
61 writel(val, gchip->base + PFR(gpio)); in mb86s70_gpio_request()
68 static void mb86s70_gpio_free(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_free() argument
76 val = readl(gchip->base + PFR(gpio)); in mb86s70_gpio_free()
77 val |= OFFSET(gpio); in mb86s70_gpio_free()
78 writel(val, gchip->base + PFR(gpio)); in mb86s70_gpio_free()
83 static int mb86s70_gpio_direction_input(struct gpio_chip *gc, unsigned gpio) in mb86s70_gpio_direction_input() argument
[all …]
Dgpio-lp873x.c49 struct lp873x_gpio *gpio = gpiochip_get_data(chip); in lp873x_gpio_direction_output() local
52 return regmap_update_bits(gpio->lp873->regmap, LP873X_REG_GPO_CTRL, in lp873x_gpio_direction_output()
59 struct lp873x_gpio *gpio = gpiochip_get_data(chip); in lp873x_gpio_get() local
62 ret = regmap_read(gpio->lp873->regmap, LP873X_REG_GPO_CTRL, &val); in lp873x_gpio_get()
72 struct lp873x_gpio *gpio = gpiochip_get_data(chip); in lp873x_gpio_set() local
74 regmap_update_bits(gpio->lp873->regmap, LP873X_REG_GPO_CTRL, in lp873x_gpio_set()
81 struct lp873x_gpio *gpio = gpiochip_get_data(gc); in lp873x_gpio_request() local
90 ret = regmap_update_bits(gpio->lp873->regmap, LP873X_REG_CONFIG, in lp873x_gpio_request()
107 struct lp873x_gpio *gpio = gpiochip_get_data(gc); in lp873x_gpio_set_single_ended() local
111 return regmap_update_bits(gpio->lp873->regmap, in lp873x_gpio_set_single_ended()
[all …]
Dgpio-wcove.c108 static inline unsigned int to_reg(int gpio, enum ctrl_register reg_type) in to_reg() argument
113 if (gpio < BANK0_NR_PINS) in to_reg()
115 else if (gpio < BANK0_NR_PINS + BANK1_NR_PINS) in to_reg()
128 static void wcove_update_irq_mask(struct wcove_gpio *wg, int gpio) in wcove_update_irq_mask() argument
132 if (gpio < GROUP0_NR_IRQS) { in wcove_update_irq_mask()
134 mask = BIT(gpio % GROUP0_NR_IRQS); in wcove_update_irq_mask()
137 mask = BIT((gpio - GROUP0_NR_IRQS) % GROUP1_NR_IRQS); in wcove_update_irq_mask()
146 static void wcove_update_irq_ctrl(struct wcove_gpio *wg, int gpio) in wcove_update_irq_ctrl() argument
148 unsigned int reg = to_reg(gpio, CTRL_IN); in wcove_update_irq_ctrl()
153 static int wcove_gpio_dir_in(struct gpio_chip *chip, unsigned int gpio) in wcove_gpio_dir_in() argument
[all …]
Dgpio-tps65086.c45 struct tps65086_gpio *gpio = gpiochip_get_data(chip); in tps65086_gpio_direction_output() local
48 regmap_update_bits(gpio->tps->regmap, TPS65086_GPOCTRL, in tps65086_gpio_direction_output()
56 struct tps65086_gpio *gpio = gpiochip_get_data(chip); in tps65086_gpio_get() local
59 ret = regmap_read(gpio->tps->regmap, TPS65086_GPOCTRL, &val); in tps65086_gpio_get()
69 struct tps65086_gpio *gpio = gpiochip_get_data(chip); in tps65086_gpio_set() local
71 regmap_update_bits(gpio->tps->regmap, TPS65086_GPOCTRL, in tps65086_gpio_set()
90 struct tps65086_gpio *gpio; in tps65086_gpio_probe() local
93 gpio = devm_kzalloc(&pdev->dev, sizeof(*gpio), GFP_KERNEL); in tps65086_gpio_probe()
94 if (!gpio) in tps65086_gpio_probe()
97 platform_set_drvdata(pdev, gpio); in tps65086_gpio_probe()
[all …]
/drivers/ssb/
Ddriver_gpio.c26 static int ssb_gpio_to_irq(struct gpio_chip *chip, unsigned int gpio) in ssb_gpio_to_irq() argument
31 return irq_find_mapping(bus->irq_domain, gpio); in ssb_gpio_to_irq()
41 static int ssb_gpio_chipco_get_value(struct gpio_chip *chip, unsigned int gpio) in ssb_gpio_chipco_get_value() argument
45 return !!ssb_chipco_gpio_in(&bus->chipco, 1 << gpio); in ssb_gpio_chipco_get_value()
48 static void ssb_gpio_chipco_set_value(struct gpio_chip *chip, unsigned int gpio, in ssb_gpio_chipco_set_value() argument
53 ssb_chipco_gpio_out(&bus->chipco, 1 << gpio, value ? 1 << gpio : 0); in ssb_gpio_chipco_set_value()
57 unsigned int gpio) in ssb_gpio_chipco_direction_input() argument
61 ssb_chipco_gpio_outen(&bus->chipco, 1 << gpio, 0); in ssb_gpio_chipco_direction_input()
66 unsigned int gpio, int value) in ssb_gpio_chipco_direction_output() argument
70 ssb_chipco_gpio_outen(&bus->chipco, 1 << gpio, 1 << gpio); in ssb_gpio_chipco_direction_output()
[all …]
/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/
Dbase.c29 nvkm_gpio_drive(struct nvkm_gpio *gpio, int idx, int line, int dir, int out) in nvkm_gpio_drive() argument
31 return gpio->func->drive(gpio, line, dir, out); in nvkm_gpio_drive()
35 nvkm_gpio_sense(struct nvkm_gpio *gpio, int idx, int line) in nvkm_gpio_sense() argument
37 return gpio->func->sense(gpio, line); in nvkm_gpio_sense()
41 nvkm_gpio_reset(struct nvkm_gpio *gpio, u8 func) in nvkm_gpio_reset() argument
43 if (gpio->func->reset) in nvkm_gpio_reset()
44 gpio->func->reset(gpio, func); in nvkm_gpio_reset()
48 nvkm_gpio_find(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, in nvkm_gpio_find() argument
51 struct nvkm_device *device = gpio->subdev.device; in nvkm_gpio_find()
80 nvkm_gpio_set(struct nvkm_gpio *gpio, int idx, u8 tag, u8 line, int state) in nvkm_gpio_set() argument
[all …]
/drivers/pinctrl/
Dpinctrl-coh901.c62 struct u300_gpio *gpio; member
94 (gpio->base + (pin >> 3) * gpio->stride + gpio->reg)
213 struct u300_gpio *gpio = gpiochip_get_data(chip); in u300_gpio_get() local
220 struct u300_gpio *gpio = gpiochip_get_data(chip); in u300_gpio_set() local
237 struct u300_gpio *gpio = gpiochip_get_data(chip); in u300_gpio_direction_input() local
253 struct u300_gpio *gpio = gpiochip_get_data(chip); in u300_gpio_direction_output() local
284 struct u300_gpio *gpio = gpiochip_get_data(chip); in u300_gpio_config_get() local
342 struct u300_gpio *gpio = gpiochip_get_data(chip); in u300_gpio_config_set() local
383 dev_err(gpio->dev, "illegal configuration requested\n"); in u300_gpio_config_set()
401 static void u300_toggle_trigger(struct u300_gpio *gpio, unsigned offset) in u300_toggle_trigger() argument
[all …]
/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 …]
/drivers/bcma/
Ddriver_gpio.c20 static int bcma_gpio_get_value(struct gpio_chip *chip, unsigned gpio) in bcma_gpio_get_value() argument
24 return !!bcma_chipco_gpio_in(cc, 1 << gpio); in bcma_gpio_get_value()
27 static void bcma_gpio_set_value(struct gpio_chip *chip, unsigned gpio, in bcma_gpio_set_value() argument
32 bcma_chipco_gpio_out(cc, 1 << gpio, value ? 1 << gpio : 0); in bcma_gpio_set_value()
35 static int bcma_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) in bcma_gpio_direction_input() argument
39 bcma_chipco_gpio_outen(cc, 1 << gpio, 0); in bcma_gpio_direction_input()
43 static int bcma_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, in bcma_gpio_direction_output() argument
48 bcma_chipco_gpio_outen(cc, 1 << gpio, 1 << gpio); in bcma_gpio_direction_output()
49 bcma_chipco_gpio_out(cc, 1 << gpio, value ? 1 << gpio : 0); in bcma_gpio_direction_output()
53 static int bcma_gpio_request(struct gpio_chip *chip, unsigned gpio) in bcma_gpio_request() argument
[all …]
/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 …]
/drivers/pinctrl/bcm/
Dpinctrl-nsp-gpio.c103 unsigned int reg, unsigned gpio, bool set) in nsp_set_bit() argument
115 val |= BIT(gpio); in nsp_set_bit()
117 val &= ~BIT(gpio); in nsp_set_bit()
127 unsigned int reg, unsigned gpio) in nsp_get_bit() argument
130 return !!(readl(chip->io_ctrl + reg) & BIT(gpio)); in nsp_get_bit()
132 return !!(readl(chip->base + reg) & BIT(gpio)); in nsp_get_bit()
173 unsigned gpio = d->hwirq; in nsp_gpio_irq_ack() local
174 u32 val = BIT(gpio); in nsp_gpio_irq_ack()
179 nsp_set_bit(chip, REG, NSP_GPIO_EVENT, gpio, val); in nsp_gpio_irq_ack()
191 unsigned gpio = d->hwirq; in nsp_gpio_irq_set_mask() local
[all …]
/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 …]
/drivers/rtc/
Drtc-v3020.c58 struct gpio *gpio; member
105 static struct gpio v3020_gpio[] = {
117 v3020_gpio[V3020_CS].gpio = pdata->gpio_cs; in v3020_gpio_map()
118 v3020_gpio[V3020_WR].gpio = pdata->gpio_wr; in v3020_gpio_map()
119 v3020_gpio[V3020_RD].gpio = pdata->gpio_rd; in v3020_gpio_map()
120 v3020_gpio[V3020_IO].gpio = pdata->gpio_io; in v3020_gpio_map()
125 chip->gpio = v3020_gpio; in v3020_gpio_map()
137 gpio_direction_output(chip->gpio[V3020_IO].gpio, bit); in v3020_gpio_write_bit()
138 gpio_set_value(chip->gpio[V3020_CS].gpio, 0); in v3020_gpio_write_bit()
139 gpio_set_value(chip->gpio[V3020_WR].gpio, 0); in v3020_gpio_write_bit()
[all …]

12345678910>>...22