Searched refs:gpio (Results 1 - 25 of 521) sorted by relevance

1234567891011>>

/drivers/staging/cptm1217/
H A Dcp_tm1217.h6 int gpio; /* If not set uses the IRQ resource 0 */ member in struct:cp_tm1217_platform_data
/drivers/gpio/
H A DMakefile1 # generic gpio support: platform drivers, dedicated expander chips, etc
8 obj-$(CONFIG_GPIO_GENERIC) += gpio-generic.o
10 obj-$(CONFIG_GPIO_74X164) += gpio-74x164.o
11 obj-$(CONFIG_GPIO_AB8500) += gpio-ab8500.o
12 obj-$(CONFIG_GPIO_ADP5520) += gpio-adp5520.o
13 obj-$(CONFIG_GPIO_ADP5588) += gpio-adp5588.o
14 obj-$(CONFIG_GPIO_BT8XX) += gpio-bt8xx.o
15 obj-$(CONFIG_GPIO_CS5535) += gpio-cs5535.o
16 obj-$(CONFIG_GPIO_DA9052) += gpio-da9052.o
17 obj-$(CONFIG_ARCH_DAVINCI) += gpio
[all...]
H A Ddevres.c2 * drivers/gpio/devres.c - managed gpio resources
18 #include <linux/gpio.h>
24 unsigned *gpio = res; local
26 gpio_free(*gpio);
31 unsigned *this = res, *gpio = data; local
33 return *this == *gpio;
37 * devm_gpio_request - request a gpio for a managed device
38 * @dev: device to request the gpio for
39 * @gpio
51 devm_gpio_request(struct device *dev, unsigned gpio, const char *label) argument
83 devm_gpio_free(struct device *dev, unsigned int gpio) argument
[all...]
H A Dgpio-pcf857x.c23 #include <linux/gpio.h>
72 struct pcf857x *gpio = container_of(chip, struct pcf857x, chip); local
75 mutex_lock(&gpio->lock);
76 gpio->out |= (1 << offset);
77 status = i2c_smbus_write_byte(gpio->client, gpio->out);
78 mutex_unlock(&gpio->lock);
85 struct pcf857x *gpio = container_of(chip, struct pcf857x, chip); local
88 value = i2c_smbus_read_byte(gpio->client);
94 struct pcf857x *gpio local
140 struct pcf857x *gpio = container_of(chip, struct pcf857x, chip); local
153 struct pcf857x *gpio = container_of(chip, struct pcf857x, chip); local
162 struct pcf857x *gpio = container_of(chip, struct pcf857x, chip); local
188 struct pcf857x *gpio; local
319 struct pcf857x *gpio = i2c_get_clientdata(client); local
[all...]
H A Dgpio-tps65910.c19 #include <linux/gpio.h>
25 struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio);
39 struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio);
52 struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio);
63 struct tps65910 *tps65910 = container_of(gc, struct tps65910, gpio);
77 tps65910->gpio.owner = THIS_MODULE;
78 tps65910->gpio.label = tps65910->i2c_client->name;
79 tps65910->gpio.dev = tps65910->dev;
80 tps65910->gpio.base = gpio_base;
84 tps65910->gpio
[all...]
H A Dgpiolib.c10 #include <linux/gpio.h>
16 #include <trace/events/gpio.h>
57 #define FLAG_SYSFS 4 /* exported via /sys/class/gpio/control */
100 const int gpio = chip->base + offset; local
103 "autorequest GPIO-%d\n", gpio)) {
105 pr_err("GPIO-%d: module can't be gotten \n", gpio);
118 /* caller holds gpio_lock *OR* gpio is marked as requested */
119 struct gpio_chip *gpio_to_chip(unsigned gpio) argument
121 return gpio_desc[gpio].chip;
155 * @start: starting gpio numbe
245 unsigned gpio = desc - gpio_desc; local
272 unsigned gpio = desc - gpio_desc; local
297 unsigned gpio = desc - gpio_desc; local
613 long gpio; local
645 long gpio; local
701 gpio_export(unsigned gpio, bool direction_may_change) argument
787 gpio_export_link(struct device *dev, const char *name, unsigned gpio) argument
834 gpio_sysfs_set_active_low(unsigned gpio, int value) argument
874 gpio_unexport(unsigned gpio) argument
937 unsigned gpio; local
977 unsigned gpio; local
1185 gpio_request(unsigned gpio, const char *label) argument
1239 gpio_free(unsigned gpio) argument
1284 gpio_request_one(unsigned gpio, unsigned long flags, const char *label) argument
1361 unsigned gpio = chip->base + offset; local
1385 gpio_direction_input(unsigned gpio) argument
1440 gpio_direction_output(unsigned gpio, int value) argument
1508 gpio_set_debounce(unsigned gpio, unsigned debounce) argument
1578 __gpio_get_value(unsigned gpio) argument
1598 _gpio_set_open_drain_value(unsigned gpio, struct gpio_chip *chip, int value) argument
1623 _gpio_set_open_source_value(unsigned gpio, struct gpio_chip *chip, int value) argument
1652 __gpio_set_value(unsigned gpio, int value) argument
1677 __gpio_cansleep(unsigned gpio) argument
1697 __gpio_to_irq(unsigned gpio) argument
1712 gpio_get_value_cansleep(unsigned gpio) argument
1725 gpio_set_value_cansleep(unsigned gpio, int value) argument
1747 unsigned gpio = chip->base; local
1769 unsigned gpio; local
[all...]
H A Dgpio-da9052.c18 #include <linux/gpio.h>
66 struct da9052_gpio *gpio = to_da9052_gpio(gc); local
70 ret = da9052_reg_read(gpio->da9052,
85 ret = da9052_reg_read(gpio->da9052,
88 ret = da9052_reg_read(gpio->da9052,
108 struct da9052_gpio *gpio = to_da9052_gpio(gc); local
112 ret = da9052_reg_update(gpio->da9052, (offset >> 1) +
117 dev_err(gpio->da9052->dev,
118 "Failed to updated gpio odd reg,%d",
121 ret = da9052_reg_update(gpio
134 struct da9052_gpio *gpio = to_da9052_gpio(gc); local
160 struct da9052_gpio *gpio = to_da9052_gpio(gc); local
185 struct da9052_gpio *gpio = to_da9052_gpio(gc); local
206 struct da9052_gpio *gpio; local
238 struct da9052_gpio *gpio = platform_get_drvdata(pdev); local
[all...]
H A Dgpio-msm-v2.c22 #include <linux/gpio.h>
61 * gpio. If this bit is 0, this register will not be updated.
82 #define GPIO_INTR_CFG_SU(gpio) (MSM_TLMM_BASE + 0x0400 + (0x04 * (gpio)))
83 #define GPIO_CONFIG(gpio) (MSM_TLMM_BASE + 0x1000 + (0x10 * (gpio)))
84 #define GPIO_IN_OUT(gpio) (MSM_TLMM_BASE + 0x1004 + (0x10 * (gpio)))
85 #define GPIO_INTR_CFG(gpio) (MSM_TLMM_BASE + 0x1008 + (0x10 * (gpio)))
215 msm_gpio_update_dual_edge_pos(unsigned gpio) argument
238 int gpio = msm_irq_to_gpio(&msm_gpio.gpio_chip, d->irq); local
247 int gpio = msm_irq_to_gpio(&msm_gpio.gpio_chip, d->irq); local
259 int gpio = msm_irq_to_gpio(&msm_gpio.gpio_chip, d->irq); local
271 int gpio = msm_irq_to_gpio(&msm_gpio.gpio_chip, d->irq); local
333 int gpio = msm_irq_to_gpio(&msm_gpio.gpio_chip, d->irq); local
[all...]
H A Dgpio-ucb1400.c19 struct ucb1400_gpio *gpio; local
20 gpio = container_of(gc, struct ucb1400_gpio, gc);
21 ucb1400_gpio_set_direction(gpio->ac97, off, 0);
27 struct ucb1400_gpio *gpio; local
28 gpio = container_of(gc, struct ucb1400_gpio, gc);
29 ucb1400_gpio_set_direction(gpio->ac97, off, 1);
30 ucb1400_gpio_set_value(gpio->ac97, off, val);
36 struct ucb1400_gpio *gpio; local
37 gpio = container_of(gc, struct ucb1400_gpio, gc);
38 return ucb1400_gpio_get_value(gpio
43 struct ucb1400_gpio *gpio; local
[all...]
H A Dgpio-tnetv107x.c17 #include <linux/gpio.h>
30 #define gpio_reg_index(gpio) ((gpio) >> 5)
31 #define gpio_reg_bit(gpio) BIT((gpio) & 0x1f)
36 #define gpio_reg_set_bit(reg, gpio) \
37 gpio_reg_rmw((reg) + gpio_reg_index(gpio), 0, gpio_reg_bit(gpio))
39 #define gpio_reg_clear_bit(reg, gpio) \
40 gpio_reg_rmw((reg) + gpio_reg_index(gpio), gpio_reg_bi
56 unsigned gpio = chip->base + offset; local
72 unsigned gpio = chip->base + offset; local
86 unsigned gpio = chip->base + offset; local
103 unsigned gpio = chip->base + offset; local
124 unsigned gpio = chip->base + offset; local
137 unsigned gpio = chip->base + offset; local
[all...]
H A Dgpio-mpc5200.c2 * MPC52xx gpio driver
28 #include <asm/gpio.h>
57 static int mpc52xx_wkup_gpio_get(struct gpio_chip *gc, unsigned int gpio) argument
63 ret = (in_8(&regs->wkup_ival) >> (7 - gpio)) & 1;
65 pr_debug("%s: gpio: %d ret: %d\n", __func__, gpio, ret);
71 __mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) argument
79 chip->shadow_dvo |= 1 << (7 - gpio);
81 chip->shadow_dvo &= ~(1 << (7 - gpio));
87 mpc52xx_wkup_gpio_set(struct gpio_chip *gc, unsigned int gpio, in argument
100 mpc52xx_wkup_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) argument
124 mpc52xx_wkup_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) argument
219 mpc52xx_simple_gpio_get(struct gpio_chip *gc, unsigned int gpio) argument
231 __mpc52xx_simple_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) argument
246 mpc52xx_simple_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val) argument
259 mpc52xx_simple_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio) argument
283 mpc52xx_simple_gpio_dir_out(struct gpio_chip *gc, unsigned int gpio, int val) argument
[all...]
/drivers/net/wireless/ath/ath5k/
H A Dgpio.c103 * @gpio: GPIO pin to set as input
106 ath5k_hw_set_gpio_input(struct ath5k_hw *ah, u32 gpio) argument
108 if (gpio >= AR5K_NUM_GPIO)
112 (ath5k_hw_reg_read(ah, AR5K_GPIOCR) & ~AR5K_GPIOCR_OUT(gpio))
113 | AR5K_GPIOCR_IN(gpio), AR5K_GPIOCR);
121 * @gpio: The GPIO pin to set as output
124 ath5k_hw_set_gpio_output(struct ath5k_hw *ah, u32 gpio) argument
126 if (gpio >= AR5K_NUM_GPIO)
130 (ath5k_hw_reg_read(ah, AR5K_GPIOCR) & ~AR5K_GPIOCR_OUT(gpio))
131 | AR5K_GPIOCR_OUT(gpio), AR5K_GPIOC
142 ath5k_hw_get_gpio(struct ath5k_hw *ah, u32 gpio) argument
159 ath5k_hw_set_gpio(struct ath5k_hw *ah, u32 gpio, u32 val) argument
189 ath5k_hw_set_gpio_intr(struct ath5k_hw *ah, unsigned int gpio, u32 interrupt_level) argument
[all...]
H A Drfkill.c41 ATH5K_DBG(ah, ATH5K_DEBUG_ANY, "rfkill disable (gpio:%d polarity:%d)\n",
42 ah->rf_kill.gpio, ah->rf_kill.polarity);
43 ath5k_hw_set_gpio_output(ah, ah->rf_kill.gpio);
44 ath5k_hw_set_gpio(ah, ah->rf_kill.gpio, !ah->rf_kill.polarity);
50 ATH5K_DBG(ah, ATH5K_DEBUG_ANY, "rfkill enable (gpio:%d polarity:%d)\n",
51 ah->rf_kill.gpio, ah->rf_kill.polarity);
52 ath5k_hw_set_gpio_output(ah, ah->rf_kill.gpio);
53 ath5k_hw_set_gpio(ah, ah->rf_kill.gpio, ah->rf_kill.polarity);
60 ath5k_hw_set_gpio_input(ah, ah->rf_kill.gpio);
61 curval = ath5k_hw_get_gpio(ah, ah->rf_kill.gpio);
[all...]
/drivers/mfd/
H A Dpcf50633-gpio.c21 #include <linux/mfd/pcf50633/gpio.h>
38 int pcf50633_gpio_set(struct pcf50633 *pcf, int gpio, u8 val) argument
42 reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG;
48 u8 pcf50633_gpio_get(struct pcf50633 *pcf, int gpio) argument
52 reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG;
59 int pcf50633_gpio_invert_set(struct pcf50633 *pcf, int gpio, int invert) argument
63 reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG;
70 int pcf50633_gpio_invert_get(struct pcf50633 *pcf, int gpio) argument
74 reg = gpio - PCF50633_GPIO1 + PCF50633_REG_GPIO1CFG;
82 int gpio, in
81 pcf50633_gpio_power_supply_set(struct pcf50633 *pcf, int gpio, int regulator, int on) argument
[all...]
H A Dwm8350-gpio.c20 #include <linux/mfd/wm8350/gpio.h>
23 static int gpio_set_dir(struct wm8350 *wm8350, int gpio, int dir) argument
31 1 << gpio);
35 1 << gpio);
40 static int wm8350_gpio_set_debounce(struct wm8350 *wm8350, int gpio, int db) argument
44 1 << gpio);
47 WM8350_GPIO_DEBOUNCE, 1 << gpio);
50 static int gpio_set_func(struct wm8350 *wm8350, int gpio, int func) argument
55 switch (gpio) {
143 static int gpio_set_pull_up(struct wm8350 *wm8350, int gpio, in argument
155 gpio_set_pull_down(struct wm8350 *wm8350, int gpio, int down) argument
167 gpio_set_polarity(struct wm8350 *wm8350, int gpio, int pol) argument
179 gpio_set_invert(struct wm8350 *wm8350, int gpio, int invert) argument
188 wm8350_gpio_config(struct wm8350 *wm8350, int gpio, int dir, int func, int pol, int pull, int invert, int debounce) argument
[all...]
/drivers/staging/android/
H A Dtimed_gpio.h19 #define TIMED_GPIO_NAME "timed-gpio"
23 unsigned gpio; member in struct:timed_gpio
/drivers/pinctrl/
H A Dpinctrl-coh901.c22 #include <linux/gpio.h>
27 #include <mach/gpio-u300.h>
120 struct u300_gpio *gpio; member in struct:u300_gpio_port
128 * Macro to expand to read a specific register found in the "gpio"
129 * struct. It requires the struct u300_gpio *gpio variable to exist in
135 (gpio->base + (pin >> 3) * gpio->stride + gpio->reg)
138 * Provides a bitmask for a specific gpio pin inside an 8-bit GPIO
320 * @chip: the gpio chi
333 int gpio = chip->base + offset; local
340 int gpio = chip->base + offset; local
347 struct u300_gpio *gpio = to_u300_gpio(chip); local
354 struct u300_gpio *gpio = to_u300_gpio(chip); local
371 struct u300_gpio *gpio = to_u300_gpio(chip); local
387 struct u300_gpio *gpio = to_u300_gpio(chip); local
415 struct u300_gpio *gpio = to_u300_gpio(chip); local
428 struct u300_gpio *gpio = to_u300_gpio(chip); local
486 struct u300_gpio *gpio = to_u300_gpio(chip); local
546 u300_toggle_trigger(struct u300_gpio *gpio, unsigned offset) argument
568 struct u300_gpio *gpio = port->gpio; local
604 struct u300_gpio *gpio = port->gpio; local
618 struct u300_gpio *gpio = port->gpio; local
640 struct u300_gpio *gpio = port->gpio; local
676 u300_gpio_init_pin(struct u300_gpio *gpio, int offset, const struct u300_gpio_confdata *conf) argument
708 u300_gpio_init_coh901571(struct u300_gpio *gpio, struct u300_gpio_platform *plat) argument
731 u300_gpio_free_ports(struct u300_gpio *gpio) argument
746 struct u300_gpio *gpio; local
927 struct u300_gpio *gpio = platform_get_drvdata(pdev); local
[all...]
/drivers/pcmcia/
H A Dpxa2xx_colibri.c17 #include <linux/gpio.h>
47 static struct gpio colibri_pcmcia_gpios[] = {
65 skt->socket.pci_irq = gpio_to_irq(colibri_pcmcia_gpios[READY].gpio);
66 skt->stat[SOC_STAT_CD].irq = gpio_to_irq(colibri_pcmcia_gpios[DETECT].gpio);
83 state->detect = !!gpio_get_value(colibri_pcmcia_gpios[DETECT].gpio);
84 state->ready = !!gpio_get_value(colibri_pcmcia_gpios[READY].gpio);
85 state->bvd1 = !!gpio_get_value(colibri_pcmcia_gpios[BVD1].gpio);
86 state->bvd2 = !!gpio_get_value(colibri_pcmcia_gpios[BVD2].gpio);
95 gpio_set_value(colibri_pcmcia_gpios[PPEN].gpio,
97 gpio_set_value(colibri_pcmcia_gpios[RESET].gpio,
[all...]
/drivers/i2c/muxes/
H A DMakefile4 obj-$(CONFIG_I2C_MUX_GPIO) += gpio-i2cmux.o
/drivers/staging/ste_rmi4/
H A Dboard-mop500-u8500uib-rmi4.c6 #include <linux/gpio.h>
8 #include <mach/gpio.h>
/drivers/mmc/core/
H A Dcd-gpio.c12 #include <linux/gpio.h>
15 #include <linux/mmc/cd-gpio.h>
21 unsigned int gpio; member in struct:mmc_cd_gpio
32 int mmc_cd_gpio_request(struct mmc_host *host, unsigned int gpio) argument
36 int irq = gpio_to_irq(gpio);
48 ret = gpio_request_one(gpio, GPIOF_DIR_IN, cd->label);
58 cd->gpio = gpio;
65 gpio_free(gpio);
80 gpio_free(cd->gpio);
[all...]
/drivers/input/mouse/
H A Dgpio_mouse.c15 #include <linux/gpio.h>
25 struct gpio_mouse_platform_data *gpio = dev->private; local
29 if (gpio->bleft >= 0)
31 gpio_get_value(gpio->bleft) ^ gpio->polarity);
32 if (gpio->bmiddle >= 0)
34 gpio_get_value(gpio->bmiddle) ^ gpio->polarity);
35 if (gpio->bright >= 0)
37 gpio_get_value(gpio
[all...]
/drivers/gpu/drm/gma500/
H A Dintel_gmbus.c99 static u32 get_reserved(struct intel_gpio *gpio) argument
101 struct drm_psb_private *dev_priv = gpio->dev_priv;
106 reserved = REG_READ(gpio->reg) &
115 struct intel_gpio *gpio = data; local
116 struct drm_psb_private *dev_priv = gpio->dev_priv;
118 u32 reserved = get_reserved(gpio);
119 REG_WRITE(gpio->reg, reserved | GPIO_CLOCK_DIR_MASK);
120 REG_WRITE(gpio->reg, reserved);
121 return (REG_READ(gpio->reg) & GPIO_CLOCK_VAL_IN) != 0;
126 struct intel_gpio *gpio local
137 struct intel_gpio *gpio = data; local
155 struct intel_gpio *gpio = data; local
184 struct intel_gpio *gpio; local
225 struct intel_gpio *gpio = container_of(adapter, local
[all...]
/drivers/leds/
H A Dleds-lt3593.c8 * Based on leds-gpio.c,
25 #include <linux/gpio.h>
31 unsigned gpio; member in struct:lt3593_led_data
52 gpio_set_value_cansleep(led_dat->gpio, 0);
59 gpio_set_value_cansleep(led_dat->gpio, 0);
61 gpio_set_value_cansleep(led_dat->gpio, 1);
65 gpio_set_value_cansleep(led_dat->gpio, 1);
68 gpio_set_value_cansleep(led_dat->gpio, 0);
70 gpio_set_value_cansleep(led_dat->gpio, 1);
91 if (!gpio_is_valid(template->gpio)) {
[all...]
/drivers/video/via/
H A Dvia-gpio.c9 #include <linux/gpio.h>
12 #include <linux/via-gpio.h>
90 struct viafb_gpio *gpio; local
94 gpio = cfg->active_gpios[nr];
95 reg = via_read_reg(VIASR, gpio->vg_port_index);
96 reg |= 0x40 << gpio->vg_mask_shift; /* output enable */
98 reg |= 0x10 << gpio->vg_mask_shift;
100 reg &= ~(0x10 << gpio->vg_mask_shift);
101 via_write_reg(VIASR, gpio->vg_port_index, reg);
121 struct viafb_gpio *gpio; local
138 struct viafb_gpio *gpio; local
166 viafb_gpio_enable(struct viafb_gpio *gpio) argument
171 viafb_gpio_disable(struct viafb_gpio *gpio) argument
220 struct viafb_gpio *gpio; local
[all...]

Completed in 545 milliseconds

1234567891011>>