/linux-master/drivers/gpio/ |
H A D | gpio-en7523.c | 6 #include <linux/gpio/driver.h> 34 static int airoha_dir_set(struct gpio_chip *gc, unsigned int gpio, argument 38 u32 dir = ioread32(ctrl->dir[gpio / 16]); 40 u32 mask = BIT((gpio % 16) * 2); 44 output |= BIT(gpio); 47 output &= ~BIT(gpio); 50 iowrite32(dir, ctrl->dir[gpio / 16]); 53 gc->set(gc, gpio, val); 60 static int airoha_dir_out(struct gpio_chip *gc, unsigned int gpio, argument 63 return airoha_dir_set(gc, gpio, va 66 airoha_dir_in(struct gpio_chip *gc, unsigned int gpio) argument 71 airoha_get_dir(struct gpio_chip *gc, unsigned int gpio) argument [all...] |
H A D | gpio-bcm-kona.c | 11 #include <linux/gpio/driver.h> 24 #define GPIO_BANK(gpio) ((gpio) >> 5) 25 #define GPIO_BIT(gpio) ((gpio) & (GPIO_PER_BANK - 1)) 28 #define GPIO_CONTROL(gpio) (0x00000100 + ((gpio) << 2)) 84 unsigned gpio) 88 int bank_id = GPIO_BANK(gpio); 93 val |= BIT(gpio); 83 bcm_kona_gpio_lock_gpio(struct bcm_kona_gpio *kona_gpio, unsigned gpio) argument 99 bcm_kona_gpio_unlock_gpio(struct bcm_kona_gpio *kona_gpio, unsigned gpio) argument 115 bcm_kona_gpio_get_dir(struct gpio_chip *chip, unsigned gpio) argument 125 bcm_kona_gpio_set(struct gpio_chip *chip, unsigned gpio, int value) argument 152 bcm_kona_gpio_get(struct gpio_chip *chip, unsigned gpio) argument 179 bcm_kona_gpio_request(struct gpio_chip *chip, unsigned gpio) argument 187 bcm_kona_gpio_free(struct gpio_chip *chip, unsigned gpio) argument 194 bcm_kona_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) argument 215 bcm_kona_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int value) argument 244 bcm_kona_gpio_to_irq(struct gpio_chip *chip, unsigned gpio) argument 254 bcm_kona_gpio_set_debounce(struct gpio_chip *chip, unsigned gpio, unsigned debounce) argument 303 bcm_kona_gpio_set_config(struct gpio_chip *chip, unsigned gpio, unsigned long config) argument 334 unsigned gpio = d->hwirq; local 355 unsigned gpio = d->hwirq; local 377 unsigned gpio = d->hwirq; local 399 unsigned gpio = d->hwirq; local [all...] |
H A D | gpio-viperboard.c | 18 #include <linux/gpio/driver.h> 63 struct gpio_chip gpioa; /* gpio a related things */ 66 struct gpio_chip gpiob; /* gpio b related things */ 77 "gpio-a sampling freq in Hz (default is 1000Hz) valid values: 10, 100, 1000, 10000, 100000, 1000000"); 85 struct vprbrd_gpio *gpio = gpiochip_get_data(chip); local 86 struct vprbrd *vb = gpio->vb; 90 if (gpio->gpioa_out & (1 << offset)) 91 return !!(gpio->gpioa_val & (1 << offset)); 135 struct vprbrd_gpio *gpio = gpiochip_get_data(chip); local 136 struct vprbrd *vb = gpio 176 struct vprbrd_gpio *gpio = gpiochip_get_data(chip); local 213 struct vprbrd_gpio *gpio = gpiochip_get_data(chip); local 280 struct vprbrd_gpio *gpio = gpiochip_get_data(chip); local 311 struct vprbrd_gpio *gpio = gpiochip_get_data(chip); local 344 struct vprbrd_gpio *gpio = gpiochip_get_data(chip); local 365 struct vprbrd_gpio *gpio = gpiochip_get_data(chip); local [all...] |
H A D | gpio-tangier.c | 28 #include <linux/gpio/driver.h> 30 #include "gpio-tangier.h" 200 irq_hw_number_t gpio = irqd_to_hwirq(d); local 204 gisr = gpio_reg_and_bit(&priv->chip, gpio, GISR, &shift); 211 static void tng_irq_unmask_mask(struct tng_gpio *priv, u32 gpio, bool unmask) argument 217 gimr = gpio_reg_and_bit(&priv->chip, gpio, GIMR, &shift); 233 irq_hw_number_t gpio = irqd_to_hwirq(d); local 235 tng_irq_unmask_mask(priv, gpio, false); 236 gpiochip_disable_irq(&priv->chip, gpio); 243 irq_hw_number_t gpio local 253 irq_hw_number_t gpio = irqd_to_hwirq(d); local 309 irq_hw_number_t gpio = irqd_to_hwirq(d); local 348 unsigned long base, gpio; local 413 devm_tng_gpio_probe(struct device *dev, struct tng_gpio *gpio) argument [all...] |
H A D | gpio-xlp.c | 7 #include <linux/gpio/driver.h> 23 * offset = (gpio / XLP_GPIO_REGSZ) * 4; 26 * where addr is base address of the that feature register and gpio is the pin. 68 static int xlp_gpio_get_reg(void __iomem *addr, unsigned gpio) argument 72 pos = gpio % XLP_GPIO_REGSZ; 73 regset = (gpio / XLP_GPIO_REGSZ) * 4; 77 static void xlp_gpio_set_reg(void __iomem *addr, unsigned gpio, int state) argument 81 pos = gpio % XLP_GPIO_REGSZ; 82 regset = (gpio / XLP_GPIO_REGSZ) * 4; 186 int gpio, regof local 205 xlp_gpio_dir_output(struct gpio_chip *gc, unsigned gpio, int state) argument 215 xlp_gpio_dir_input(struct gpio_chip *gc, unsigned gpio) argument 225 xlp_gpio_get(struct gpio_chip *gc, unsigned gpio) argument 233 xlp_gpio_set(struct gpio_chip *gc, unsigned gpio, int state) argument [all...] |
H A D | gpio-kempld.c | 15 #include <linux/gpio/driver.h> 60 struct kempld_gpio_data *gpio = gpiochip_get_data(chip); local 61 struct kempld_device_data *pld = gpio->pld; 68 struct kempld_gpio_data *gpio = gpiochip_get_data(chip); local 69 struct kempld_device_data *pld = gpio->pld; 78 struct kempld_gpio_data *gpio = gpiochip_get_data(chip); local 79 struct kempld_device_data *pld = gpio->pld; 91 struct kempld_gpio_data *gpio = gpiochip_get_data(chip); local 92 struct kempld_device_data *pld = gpio->pld; 104 struct kempld_gpio_data *gpio local 138 struct kempld_gpio_data *gpio; local [all...] |
H A D | gpio-pxa.c | 3 * linux/arch/arm/plat-pxa/gpio.c 14 #include <linux/gpio/driver.h> 15 #include <linux/gpio-pxa.h> 86 int (*set_wake)(unsigned int gpio, unsigned int on); 159 static inline void __iomem *gpio_bank_base(struct gpio_chip *c, int gpio) argument 162 struct pxa_gpio_bank *bank = p->banks + (gpio / 32); 168 unsigned gpio) 170 return chip_to_pxachip(c)->banks + gpio / 32; 181 static inline int __gpio_is_inverted(int gpio) argument 183 if ((gpio_type == PXA26X_GPIO) && (gpio > 8 167 gpio_to_pxabank(struct gpio_chip *c, unsigned gpio) argument 194 __gpio_is_occupied(struct pxa_gpio_chip *pchip, unsigned gpio) argument 343 int i, gpio, nbanks = DIV_ROUND_UP(ngpio, 32); local 393 unsigned int gpio = irqd_to_hwirq(d); local 437 int loop, gpio, n, handled = 0; local 480 unsigned int gpio = irqd_to_hwirq(d); local 489 unsigned int gpio = irqd_to_hwirq(d); local 505 unsigned int gpio = irqd_to_hwirq(d); local 516 unsigned int gpio = irqd_to_hwirq(d); local 615 int gpio, ret; local 753 int gpio; local 774 int gpio; local [all...] |
H A D | gpio-max3191x.c | 3 * gpio-max3191x.c - GPIO driver for Maxim MAX3191x industrial serializer 24 * gpio-pisosr.c can be used alternatively to this driver. 36 #include <linux/gpio/consumer.h> 37 #include <linux/gpio/driver.h> 48 * @gpio: GPIO controller struct 73 struct gpio_chip gpio; member in struct:max3191x_chip 96 static int max3191x_get_direction(struct gpio_chip *gpio, unsigned int offset) argument 101 static int max3191x_direction_input(struct gpio_chip *gpio, unsigned int offset) argument 106 static int max3191x_direction_output(struct gpio_chip *gpio, argument 112 static void max3191x_set(struct gpio_chip *gpio, unsigne argument 115 max3191x_set_multiple(struct gpio_chip *gpio, unsigned long *mask, unsigned long *bits) argument 207 max3191x_get(struct gpio_chip *gpio, unsigned int offset) argument 232 max3191x_get_multiple(struct gpio_chip *gpio, unsigned long *mask, unsigned long *bits) argument 266 max3191x_set_config(struct gpio_chip *gpio, unsigned int offset, unsigned long config) argument [all...] |
H A D | gpio-msc313.c | 10 #include <linux/gpio/driver.h> 14 #include <dt-bindings/gpio/msc313-gpio.h> 17 #define DRIVER_NAME "gpio-msc313" 25 * gpio state when resuming from suspend to memory. 226 * that are actually called gpio probably because they 445 * of the registers that control the gpio. 490 struct msc313_gpio *gpio = gpiochip_get_data(chip); local 491 u8 gpioreg = readb_relaxed(gpio->base + gpio 503 struct msc313_gpio *gpio = gpiochip_get_data(chip); local 510 struct msc313_gpio *gpio = gpiochip_get_data(chip); local 521 struct msc313_gpio *gpio = gpiochip_get_data(chip); local 612 struct msc313_gpio *gpio; local 696 struct msc313_gpio *gpio = dev_get_drvdata(dev); local 707 struct msc313_gpio *gpio = dev_get_drvdata(dev); local [all...] |
/linux-master/drivers/misc/mchp_pci1xxxx/ |
H A D | mchp_pci1xxxx_gpio.c | 3 // pci1xxxx gpio driver 7 #include <linux/gpio/driver.h> 40 struct gpio_chip gpio; member in struct:pci1xxxx_gpio 45 static int pci1xxxx_gpio_get_direction(struct gpio_chip *gpio, unsigned int nr) argument 47 struct pci1xxxx_gpio *priv = gpiochip_get_data(gpio); 76 static int pci1xxxx_gpio_direction_input(struct gpio_chip *gpio, unsigned int nr) argument 78 struct pci1xxxx_gpio *priv = gpiochip_get_data(gpio); 89 static int pci1xxxx_gpio_get(struct gpio_chip *gpio, unsigned int nr) argument 91 struct pci1xxxx_gpio *priv = gpiochip_get_data(gpio); 96 static int pci1xxxx_gpio_direction_output(struct gpio_chip *gpio, argument 117 pci1xxxx_gpio_set(struct gpio_chip *gpio, unsigned int nr, int val) argument 128 pci1xxxx_gpio_set_config(struct gpio_chip *gpio, unsigned int offset, unsigned long config) argument 163 unsigned int gpio = irqd_to_hwirq(data); local 175 unsigned int gpio = irqd_to_hwirq(data); local 201 unsigned int gpio = irqd_to_hwirq(data); local [all...] |
/linux-master/drivers/gpu/drm/bridge/ |
H A D | ti-tpd12s015.c | 14 #include <linux/gpio/consumer.h> 115 struct gpio_desc *gpio; local 141 gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 0, 143 if (IS_ERR(gpio)) 144 return PTR_ERR(gpio); 146 tpd->ct_cp_hpd_gpio = gpio; 148 gpio = devm_gpiod_get_index_optional(&pdev->dev, NULL, 1, 150 if (IS_ERR(gpio)) 151 return PTR_ERR(gpio); 153 tpd->ls_oe_gpio = gpio; [all...] |
/linux-master/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/ |
H A D | gf119.c | 27 gf119_gpio_reset(struct nvkm_gpio *gpio, u8 match) argument 29 struct nvkm_device *device = gpio->subdev.device; 47 nvkm_gpio_set(gpio, 0, func, line, defs); 56 gf119_gpio_drive(struct nvkm_gpio *gpio, int line, int dir, int out) argument 58 struct nvkm_device *device = gpio->subdev.device; 66 gf119_gpio_sense(struct nvkm_gpio *gpio, int line) argument 68 struct nvkm_device *device = gpio->subdev.device;
|
/linux-master/sound/soc/ |
H A D | soc-jack.c | 11 #include <linux/gpio.h> 12 #include <linux/gpio/consumer.h> 210 /* gpio detect */ 211 static void snd_soc_jack_gpio_detect(struct snd_soc_jack_gpio *gpio) argument 213 struct snd_soc_jack *jack = gpio->jack; 217 enable = gpiod_get_value_cansleep(gpio->desc); 218 if (gpio->invert) 222 report = gpio->report; 226 if (gpio->jack_status_check) 227 report = gpio 235 struct snd_soc_jack_gpio *gpio = data; local 252 struct snd_soc_jack_gpio *gpio; local 261 struct snd_soc_jack_gpio *gpio = local [all...] |
/linux-master/arch/arm/mach-omap1/ |
H A D | ams-delta-fiq.c | 13 #include <linux/gpio/consumer.h> 14 #include <linux/gpio/machine.h> 15 #include <linux/gpio/driver.h> 56 int gpio, irq_num, fiq_count; local 62 for (gpio = AMS_DELTA_GPIO_PIN_KEYBRD_CLK; 63 gpio <= AMS_DELTA_GPIO_PIN_HOOK_SWITCH; gpio++) { 64 d = irq_data[gpio]; 66 fiq_count = fiq_buffer[FIQ_CNT_INT_00 + gpio]; 68 if (irq_counter[gpio] < fiq_coun [all...] |
/linux-master/drivers/pcmcia/ |
H A D | sa1111_jornada720.c | 11 #include <linux/gpio/consumer.h> 33 struct gpio_desc *gpio[J720_GPIO_MAX]; member in struct:jornada720_data 45 j->gpio[J720_GPIO_PWR] = devm_gpiod_get(dev, skt->nr ? "s1-power" : 47 if (IS_ERR(j->gpio[J720_GPIO_PWR])) 48 return PTR_ERR(j->gpio[J720_GPIO_PWR]); 50 j->gpio[J720_GPIO_3V] = devm_gpiod_get(dev, skt->nr ? "s1-3v" : 52 if (IS_ERR(j->gpio[J720_GPIO_3V])) 53 return PTR_ERR(j->gpio[J720_GPIO_3V]); 116 ret = gpiod_set_array_value_cansleep(J720_GPIO_MAX, j->gpio,
|
H A D | max1600.c | 9 #include <linux/gpio/consumer.h> 51 m->gpio[i] = devm_gpiod_get(dev, name, GPIOD_OUT_LOW); 53 m->gpio[i] = devm_gpiod_get_optional(dev, name, 55 if (!m->gpio[i]) 58 if (IS_ERR(m->gpio[i])) 59 return PTR_ERR(m->gpio[i]); 73 if (m->gpio[MAX1600_GPIO_0VPP]) { 118 return gpiod_set_array_value_cansleep(n, m->gpio, NULL, values);
|
/linux-master/drivers/net/wireless/realtek/rtl818x/rtl8187/ |
H A D | rfkill.c | 22 u8 gpio; local 24 gpio = rtl818x_ioread8(priv, &priv->map->GPIO0); 25 rtl818x_iowrite8(priv, &priv->map->GPIO0, gpio & ~priv->rfkill_mask); 26 gpio = rtl818x_ioread8(priv, &priv->map->GPIO1); 28 return gpio & priv->rfkill_mask;
|
/linux-master/drivers/gpu/drm/nouveau/nvkm/subdev/bus/ |
H A D | nv04.c | 27 #include <subdev/gpio.h> 43 struct nvkm_gpio *gpio = device->gpio; local 44 if (gpio) 45 nvkm_subdev_intr(&gpio->subdev);
|
/linux-master/arch/mips/lantiq/xway/ |
H A D | vmmc.c | 9 #include <linux/gpio/consumer.h> 30 struct gpio_desc *gpio; local 41 gpio = devm_gpiod_get_index(&pdev->dev, 43 error = PTR_ERR_OR_ZERO(gpio); 51 gpiod_set_consumer_name(gpio, "vmmc-relay");
|
/linux-master/drivers/platform/x86/intel/int3472/ |
H A D | led.c | 5 #include <linux/gpio/consumer.h> 15 gpiod_set_value_cansleep(int3472->pled.gpio, brightness); 19 int skl_int3472_register_pled(struct int3472_discrete_device *int3472, struct gpio_desc *gpio) argument 27 int3472->pled.gpio = gpio;
|
/linux-master/drivers/input/mouse/ |
H A D | gpio_mouse.c | 12 #include <linux/gpio/consumer.h> 48 struct gpio_mouse *gpio = input_get_drvdata(input); local 51 if (gpio->bleft) 53 gpiod_get_value(gpio->bleft)); 54 if (gpio->bmiddle) 56 gpiod_get_value(gpio->bmiddle)); 57 if (gpio->bright) 59 gpiod_get_value(gpio->bright)); 61 x = gpiod_get_value(gpio->right) - gpiod_get_value(gpio [all...] |
/linux-master/drivers/gpu/drm/amd/display/dc/gpio/ |
H A D | hw_ddc.c | 46 struct gpio; 84 regval = REG_GET_3(gpio.MASK_reg, 99 REG_SET(gpio.MASK_reg, regval, DC_GPIO_DDC1DATA_PD_EN, 1); 101 REG_SET_2(gpio.MASK_reg, regval, 113 REG_GET_2(gpio.MASK_reg, 118 REG_SET(gpio.MASK_reg, regval, 127 REG_SET(gpio.MASK_reg, regval, 148 REG_UPDATE(gpio.MASK_reg, 163 REG_SET(gpio.MASK_reg, regval, 248 struct hw_gpio_pin *dal_hw_ddc_get_pin(struct gpio *gpi argument [all...] |
/linux-master/drivers/pinctrl/mediatek/ |
H A D | pinctrl-mtmips.h | 14 .func = _func, .gpio = _mask, \ 19 .func = _func, .gpio = _gpio, \ 44 const char gpio; member in struct:mtmips_pmx_group
|
/linux-master/drivers/pinctrl/meson/ |
H A D | pinctrl-meson-axg-pmx.h | 52 #define GPIO_GROUP(gpio) \ 54 .name = #gpio, \ 55 .pins = (const unsigned int[]){ gpio }, \
|
/linux-master/sound/aoa/fabrics/ |
H A D | layout.c | 613 struct gpio_runtime gpio; member in struct:layout_dev 644 struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \ 645 if (gpio->methods && gpio->methods->get_##n) \ 647 gpio->methods->get_##n(gpio); \ 653 struct gpio_runtime *gpio = snd_kcontrol_chip(kcontrol); \ 654 if (gpio->methods && gpio->methods->set_##n) \ 655 gpio [all...] |