/linux/include/linux/gpio/ |
A D | driver.h | 23 struct gpio_chip; 227 int (*init_hw)(struct gpio_chip *gc); 376 struct gpio_chip { struct 382 int (*request)(struct gpio_chip *gc, argument 384 void (*free)(struct gpio_chip *gc, argument 392 int (*get)(struct gpio_chip *gc, argument 397 void (*set)(struct gpio_chip *gc, argument 402 int (*set_config)(struct gpio_chip *gc, argument 405 int (*to_irq)(struct gpio_chip *gc, argument 409 struct gpio_chip *gc); argument [all …]
|
/linux/drivers/gpio/ |
A D | gpio-tps6586x.c | 26 struct gpio_chip gpio_chip; member 88 tps6586x_gpio->gpio_chip.owner = THIS_MODULE; in tps6586x_gpio_probe() 89 tps6586x_gpio->gpio_chip.label = pdev->name; in tps6586x_gpio_probe() 90 tps6586x_gpio->gpio_chip.parent = &pdev->dev; in tps6586x_gpio_probe() 91 tps6586x_gpio->gpio_chip.ngpio = 4; in tps6586x_gpio_probe() 92 tps6586x_gpio->gpio_chip.can_sleep = true; in tps6586x_gpio_probe() 96 tps6586x_gpio->gpio_chip.set = tps6586x_gpio_set; in tps6586x_gpio_probe() 97 tps6586x_gpio->gpio_chip.get = tps6586x_gpio_get; in tps6586x_gpio_probe() 98 tps6586x_gpio->gpio_chip.to_irq = tps6586x_gpio_to_irq; in tps6586x_gpio_probe() 104 tps6586x_gpio->gpio_chip.base = pdata->gpio_base; in tps6586x_gpio_probe() [all …]
|
A D | gpio-rc5t583.c | 20 struct gpio_chip gpio_chip; member 107 rc5t583_gpio->gpio_chip.label = "gpio-rc5t583", in rc5t583_gpio_probe() 108 rc5t583_gpio->gpio_chip.owner = THIS_MODULE, in rc5t583_gpio_probe() 109 rc5t583_gpio->gpio_chip.free = rc5t583_gpio_free, in rc5t583_gpio_probe() 112 rc5t583_gpio->gpio_chip.set = rc5t583_gpio_set, in rc5t583_gpio_probe() 113 rc5t583_gpio->gpio_chip.get = rc5t583_gpio_get, in rc5t583_gpio_probe() 115 rc5t583_gpio->gpio_chip.ngpio = RC5T583_MAX_GPIO, in rc5t583_gpio_probe() 116 rc5t583_gpio->gpio_chip.can_sleep = true, in rc5t583_gpio_probe() 117 rc5t583_gpio->gpio_chip.parent = &pdev->dev; in rc5t583_gpio_probe() 118 rc5t583_gpio->gpio_chip.base = -1; in rc5t583_gpio_probe() [all …]
|
A D | gpio-tps65910.c | 21 struct gpio_chip gpio_chip; member 121 tps65910_gpio->gpio_chip.owner = THIS_MODULE; in tps65910_gpio_probe() 126 tps65910_gpio->gpio_chip.ngpio = TPS65910_NUM_GPIO; in tps65910_gpio_probe() 129 tps65910_gpio->gpio_chip.ngpio = TPS65911_NUM_GPIO; in tps65910_gpio_probe() 134 tps65910_gpio->gpio_chip.can_sleep = true; in tps65910_gpio_probe() 137 tps65910_gpio->gpio_chip.set = tps65910_gpio_set; in tps65910_gpio_probe() 138 tps65910_gpio->gpio_chip.get = tps65910_gpio_get; in tps65910_gpio_probe() 139 tps65910_gpio->gpio_chip.parent = &pdev->dev; in tps65910_gpio_probe() 144 tps65910_gpio->gpio_chip.base = pdata->gpio_base; in tps65910_gpio_probe() 146 tps65910_gpio->gpio_chip.base = -1; in tps65910_gpio_probe() [all …]
|
A D | gpio-rcar.c | 46 struct gpio_chip gpio_chip; member 471 if (p->gpio_chip.valid_mask) in gpio_rcar_enable_inputs() 481 struct gpio_chip *gpio_chip; in gpio_rcar_probe() local 518 gpio_chip = &p->gpio_chip; in gpio_rcar_probe() 528 gpio_chip->label = name; in gpio_rcar_probe() 529 gpio_chip->parent = dev; in gpio_rcar_probe() 531 gpio_chip->base = -1; in gpio_rcar_probe() 532 gpio_chip->ngpio = npins; in gpio_rcar_probe() 543 girq = &gpio_chip->irq; in gpio_rcar_probe() 577 gpiochip_remove(gpio_chip); in gpio_rcar_probe() [all …]
|
A D | gpio-em.c | 28 struct gpio_chip gpio_chip; member 96 dev_err(p->gpio_chip.parent, in em_gio_irq_reqres() 272 struct gpio_chip *gpio_chip; in em_gio_probe() local 308 gpio_chip = &p->gpio_chip; in em_gio_probe() 311 gpio_chip->get = em_gio_get; in em_gio_probe() 313 gpio_chip->set = em_gio_set; in em_gio_probe() 316 gpio_chip->free = em_gio_free; in em_gio_probe() 317 gpio_chip->label = name; in em_gio_probe() 318 gpio_chip->parent = dev; in em_gio_probe() 320 gpio_chip->base = -1; in em_gio_probe() [all …]
|
A D | gpio-moxtet.c | 30 struct gpio_chip gpio_chip; member 88 static int moxtet_gpio_direction_input(struct gpio_chip *gc, in moxtet_gpio_direction_input() 135 chip->gpio_chip.parent = dev; in moxtet_gpio_probe() 140 chip->gpio_chip.label = dev_name(dev); in moxtet_gpio_probe() 141 chip->gpio_chip.get_direction = moxtet_gpio_get_direction; in moxtet_gpio_probe() 144 chip->gpio_chip.get = moxtet_gpio_get_value; in moxtet_gpio_probe() 145 chip->gpio_chip.set = moxtet_gpio_set_value; in moxtet_gpio_probe() 146 chip->gpio_chip.base = -1; in moxtet_gpio_probe() 148 chip->gpio_chip.ngpio = MOXTET_GPIO_NGPIOS; in moxtet_gpio_probe() 150 chip->gpio_chip.can_sleep = true; in moxtet_gpio_probe() [all …]
|
A D | gpio-madera.c | 20 struct gpio_chip gpio_chip; member 109 static const struct gpio_chip madera_gpio_chip = { 138 madera_gpio->gpio_chip = madera_gpio_chip; in madera_gpio_probe() 139 madera_gpio->gpio_chip.parent = pdev->dev.parent; in madera_gpio_probe() 143 madera_gpio->gpio_chip.ngpio = CS47L15_NUM_GPIOS; in madera_gpio_probe() 146 madera_gpio->gpio_chip.ngpio = CS47L35_NUM_GPIOS; in madera_gpio_probe() 150 madera_gpio->gpio_chip.ngpio = CS47L85_NUM_GPIOS; in madera_gpio_probe() 168 madera_gpio->gpio_chip.base = pdata->gpio_base; in madera_gpio_probe() 170 madera_gpio->gpio_chip.base = -1; in madera_gpio_probe() 173 &madera_gpio->gpio_chip, in madera_gpio_probe() [all …]
|
A D | gpio-74x164.c | 21 struct gpio_chip gpio_chip; member 55 static void gen_74x164_set_value(struct gpio_chip *gc, in gen_74x164_set_value() 134 chip->gpio_chip.label = spi->modalias; in gen_74x164_probe() 136 chip->gpio_chip.get = gen_74x164_get_value; in gen_74x164_probe() 137 chip->gpio_chip.set = gen_74x164_set_value; in gen_74x164_probe() 139 chip->gpio_chip.base = -1; in gen_74x164_probe() 144 chip->gpio_chip.can_sleep = true; in gen_74x164_probe() 145 chip->gpio_chip.parent = &spi->dev; in gen_74x164_probe() 146 chip->gpio_chip.owner = THIS_MODULE; in gen_74x164_probe() 156 ret = gpiochip_add_data(&chip->gpio_chip, chip); in gen_74x164_probe() [all …]
|
A D | gpio-palmas.c | 19 struct gpio_chip gpio_chip; member 163 palmas_gpio->gpio_chip.owner = THIS_MODULE; in palmas_gpio_probe() 164 palmas_gpio->gpio_chip.label = dev_name(&pdev->dev); in palmas_gpio_probe() 165 palmas_gpio->gpio_chip.ngpio = dev_data->ngpio; in palmas_gpio_probe() 166 palmas_gpio->gpio_chip.can_sleep = true; in palmas_gpio_probe() 169 palmas_gpio->gpio_chip.to_irq = palmas_gpio_to_irq; in palmas_gpio_probe() 170 palmas_gpio->gpio_chip.set = palmas_gpio_set; in palmas_gpio_probe() 171 palmas_gpio->gpio_chip.get = palmas_gpio_get; in palmas_gpio_probe() 172 palmas_gpio->gpio_chip.parent = &pdev->dev; in palmas_gpio_probe() 174 palmas_gpio->gpio_chip.of_node = pdev->dev.of_node; in palmas_gpio_probe() [all …]
|
A D | gpio-max77620.c | 18 struct gpio_chip gpio_chip; member 53 struct gpio_chip *chip = irq_data_get_irq_chip_data(data); in max77620_gpio_irq_mask() 61 struct gpio_chip *chip = irq_data_get_irq_chip_data(data); in max77620_gpio_irq_unmask() 309 mgpio->gpio_chip.label = pdev->name; in max77620_gpio_probe() 310 mgpio->gpio_chip.parent = pdev->dev.parent; in max77620_gpio_probe() 312 mgpio->gpio_chip.get = max77620_gpio_get; in max77620_gpio_probe() 314 mgpio->gpio_chip.set = max77620_gpio_set; in max77620_gpio_probe() 316 mgpio->gpio_chip.ngpio = MAX77620_GPIO_NR; in max77620_gpio_probe() 317 mgpio->gpio_chip.can_sleep = 1; in max77620_gpio_probe() 318 mgpio->gpio_chip.base = -1; in max77620_gpio_probe() [all …]
|
A D | gpio-wm8350.c | 24 struct gpio_chip gpio_chip; member 27 static int wm8350_gpio_direction_in(struct gpio_chip *chip, unsigned offset) in wm8350_gpio_direction_in() 36 static int wm8350_gpio_get(struct gpio_chip *chip, unsigned offset) in wm8350_gpio_get() 63 static int wm8350_gpio_direction_out(struct gpio_chip *chip, in wm8350_gpio_direction_out() 81 static int wm8350_gpio_to_irq(struct gpio_chip *chip, unsigned offset) in wm8350_gpio_to_irq() 92 static const struct gpio_chip template_chip = { 115 wm8350_gpio->gpio_chip = template_chip; in wm8350_gpio_probe() 116 wm8350_gpio->gpio_chip.ngpio = 13; in wm8350_gpio_probe() 117 wm8350_gpio->gpio_chip.parent = &pdev->dev; in wm8350_gpio_probe() 119 wm8350_gpio->gpio_chip.base = pdata->gpio_base; in wm8350_gpio_probe() [all …]
|
A D | gpio-exar.c | 29 struct gpio_chip gpio_chip; member 68 static int exar_get_value(struct gpio_chip *chip, unsigned int offset) in exar_get_value() 173 exar_gpio->gpio_chip.label = exar_gpio->name; in gpio_exar_probe() 174 exar_gpio->gpio_chip.parent = dev; in gpio_exar_probe() 175 exar_gpio->gpio_chip.direction_output = exar_direction_output; in gpio_exar_probe() 176 exar_gpio->gpio_chip.direction_input = exar_direction_input; in gpio_exar_probe() 177 exar_gpio->gpio_chip.get_direction = exar_get_direction; in gpio_exar_probe() 178 exar_gpio->gpio_chip.get = exar_get_value; in gpio_exar_probe() 179 exar_gpio->gpio_chip.set = exar_set_value; in gpio_exar_probe() 180 exar_gpio->gpio_chip.base = -1; in gpio_exar_probe() [all …]
|
A D | gpio-wm8994.c | 27 struct gpio_chip gpio_chip; member 30 static int wm8994_gpio_request(struct gpio_chip *chip, unsigned offset) in wm8994_gpio_request() 62 static int wm8994_gpio_get(struct gpio_chip *chip, unsigned offset) in wm8994_gpio_get() 78 static int wm8994_gpio_direction_out(struct gpio_chip *chip, in wm8994_gpio_direction_out() 123 static int wm8994_gpio_to_irq(struct gpio_chip *chip, unsigned offset) in wm8994_gpio_to_irq() 247 static const struct gpio_chip template_chip = { 273 wm8994_gpio->gpio_chip = template_chip; in wm8994_gpio_probe() 274 wm8994_gpio->gpio_chip.ngpio = WM8994_GPIO_MAX; in wm8994_gpio_probe() 275 wm8994_gpio->gpio_chip.parent = &pdev->dev; in wm8994_gpio_probe() 277 wm8994_gpio->gpio_chip.base = pdata->gpio_base; in wm8994_gpio_probe() [all …]
|
A D | gpiolib-of.h | 6 struct gpio_chip; 14 int of_gpiochip_add(struct gpio_chip *gc); 15 void of_gpiochip_remove(struct gpio_chip *gc); 17 bool of_gpio_need_valid_mask(const struct gpio_chip *gc); 18 void of_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev); 27 static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; } in of_gpiochip_add() 28 static inline void of_gpiochip_remove(struct gpio_chip *gc) { } in of_gpiochip_remove() 33 static inline bool of_gpio_need_valid_mask(const struct gpio_chip *gc) in of_gpio_need_valid_mask() 37 static inline void of_gpio_dev_init(struct gpio_chip *gc, in of_gpio_dev_init()
|
A D | gpio-wm831x.c | 26 struct gpio_chip gpio_chip; member 43 static int wm831x_gpio_get(struct gpio_chip *chip, unsigned offset) in wm831x_gpio_get() 68 static int wm831x_gpio_direction_out(struct gpio_chip *chip, in wm831x_gpio_direction_out() 91 static int wm831x_gpio_to_irq(struct gpio_chip *chip, unsigned offset) in wm831x_gpio_to_irq() 246 static const struct gpio_chip template_chip = { 271 wm831x_gpio->gpio_chip = template_chip; in wm831x_gpio_probe() 272 wm831x_gpio->gpio_chip.ngpio = wm831x->num_gpio; in wm831x_gpio_probe() 273 wm831x_gpio->gpio_chip.parent = &pdev->dev; in wm831x_gpio_probe() 275 wm831x_gpio->gpio_chip.base = pdata->gpio_base; in wm831x_gpio_probe() 277 wm831x_gpio->gpio_chip.base = -1; in wm831x_gpio_probe() [all …]
|
A D | gpio-ts5500.c | 34 struct gpio_chip gpio_chip; member 338 priv->gpio_chip.owner = THIS_MODULE; in ts5500_dio_probe() 339 priv->gpio_chip.label = name; in ts5500_dio_probe() 340 priv->gpio_chip.parent = dev; in ts5500_dio_probe() 343 priv->gpio_chip.get = ts5500_gpio_get; in ts5500_dio_probe() 344 priv->gpio_chip.set = ts5500_gpio_set; in ts5500_dio_probe() 345 priv->gpio_chip.to_irq = ts5500_gpio_to_irq; in ts5500_dio_probe() 346 priv->gpio_chip.base = -1; in ts5500_dio_probe() 351 priv->gpio_chip.ngpio = ARRAY_SIZE(ts5500_dio1); in ts5500_dio_probe() 360 priv->gpio_chip.ngpio = ARRAY_SIZE(ts5500_dio2); in ts5500_dio_probe() [all …]
|
A D | gpio-arizona.c | 24 struct gpio_chip gpio_chip; member 50 static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset) in arizona_gpio_get() 96 static int arizona_gpio_direction_out(struct gpio_chip *chip, in arizona_gpio_direction_out() 137 static const struct gpio_chip template_chip = { 160 arizona_gpio->gpio_chip = template_chip; in arizona_gpio_probe() 161 arizona_gpio->gpio_chip.parent = &pdev->dev; in arizona_gpio_probe() 163 arizona_gpio->gpio_chip.of_node = arizona->dev->of_node; in arizona_gpio_probe() 173 arizona_gpio->gpio_chip.ngpio = 5; in arizona_gpio_probe() 177 arizona_gpio->gpio_chip.ngpio = 2; in arizona_gpio_probe() 186 arizona_gpio->gpio_chip.base = pdata->gpio_base; in arizona_gpio_probe() [all …]
|
A D | gpio-ts4900.c | 35 struct gpio_chip gpio_chip; member 39 static int ts4900_gpio_get_direction(struct gpio_chip *chip, in ts4900_gpio_get_direction() 53 static int ts4900_gpio_direction_input(struct gpio_chip *chip, in ts4900_gpio_direction_input() 65 static int ts4900_gpio_direction_output(struct gpio_chip *chip, in ts4900_gpio_direction_output() 80 static int ts4900_gpio_get(struct gpio_chip *chip, unsigned int offset) in ts4900_gpio_get() 107 static const struct gpio_chip template_chip = { 145 priv->gpio_chip = template_chip; in ts4900_gpio_probe() 146 priv->gpio_chip.label = "ts4900-gpio"; in ts4900_gpio_probe() 147 priv->gpio_chip.ngpio = ngpio; in ts4900_gpio_probe() 148 priv->gpio_chip.parent = &client->dev; in ts4900_gpio_probe() [all …]
|
A D | gpiolib-acpi.h | 36 void acpi_gpiochip_add(struct gpio_chip *chip); 37 void acpi_gpiochip_remove(struct gpio_chip *chip); 39 void acpi_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev); 41 void acpi_gpiochip_request_interrupts(struct gpio_chip *chip); 42 void acpi_gpiochip_free_interrupts(struct gpio_chip *chip); 60 static inline void acpi_gpiochip_add(struct gpio_chip *chip) { } in acpi_gpiochip_add() 61 static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { } in acpi_gpiochip_remove() 63 static inline void acpi_gpio_dev_init(struct gpio_chip *gc, struct gpio_device *gdev) { } in acpi_gpio_dev_init() 66 acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { } in acpi_gpiochip_request_interrupts() 69 acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { } in acpi_gpiochip_free_interrupts()
|
A D | gpio-tps65218.c | 20 struct gpio_chip gpio_chip; member 23 static int tps65218_gpio_get(struct gpio_chip *gc, unsigned offset) in tps65218_gpio_get() 37 static void tps65218_gpio_set(struct gpio_chip *gc, unsigned offset, in tps65218_gpio_set() 54 static int tps65218_gpio_output(struct gpio_chip *gc, unsigned offset, in tps65218_gpio_output() 62 static int tps65218_gpio_input(struct gpio_chip *gc, unsigned offset) in tps65218_gpio_input() 67 static int tps65218_gpio_request(struct gpio_chip *gc, unsigned offset) in tps65218_gpio_request() 172 static const struct gpio_chip template_chip = { 197 tps65218_gpio->gpio_chip = template_chip; in tps65218_gpio_probe() 198 tps65218_gpio->gpio_chip.parent = &pdev->dev; in tps65218_gpio_probe() 200 tps65218_gpio->gpio_chip.of_node = pdev->dev.of_node; in tps65218_gpio_probe() [all …]
|
/linux/arch/mips/alchemy/common/ |
A D | gpiolib.c | 40 static int gpio2_get(struct gpio_chip *chip, unsigned offset) in gpio2_get() 45 static void gpio2_set(struct gpio_chip *chip, unsigned offset, int value) in gpio2_set() 50 static int gpio2_direction_input(struct gpio_chip *chip, unsigned offset) in gpio2_direction_input() 62 static int gpio2_to_irq(struct gpio_chip *chip, unsigned offset) in gpio2_to_irq() 68 static int gpio1_get(struct gpio_chip *chip, unsigned offset) in gpio1_get() 73 static void gpio1_set(struct gpio_chip *chip, in gpio1_set() 84 static int gpio1_direction_output(struct gpio_chip *chip, in gpio1_direction_output() 91 static int gpio1_to_irq(struct gpio_chip *chip, unsigned offset) in gpio1_to_irq() 96 struct gpio_chip alchemy_gpio_chip[] = { 119 static int alchemy_gpic_get(struct gpio_chip *chip, unsigned int off) in alchemy_gpic_get() [all …]
|
/linux/drivers/pinctrl/ |
A D | pinctrl-stmfx.c | 85 struct gpio_chip gpio_chip; member 422 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_pinctrl_irq_mask() local 432 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_pinctrl_irq_unmask() local 442 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_pinctrl_irq_set_type() local 480 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_pinctrl_irq_bus_lock() local 488 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_pinctrl_irq_bus_sync_unlock() local 517 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_gpio_irq_request_resources() local 529 struct gpio_chip *gpio_chip = irq_data_get_irq_chip_data(data); in stmfx_gpio_irq_release_resources() local 565 struct gpio_chip *gc = &pctl->gpio_chip; in stmfx_pinctrl_irq_thread_fn() 675 pctl->gpio_chip.base = -1; in stmfx_pinctrl_probe() [all …]
|
/linux/drivers/video/fbdev/via/ |
A D | via-gpio.c | 74 struct gpio_chip gpio_chip; member 144 .gpio_chip = { 199 for (i = 0; i < viafb_gpio_config.gpio_chip.ngpio; i++) in viafb_gpio_lookup() 201 return viafb_gpio_config.gpio_chip.base + i; in viafb_gpio_lookup() 233 viafb_gpio_config.gpio_chip.ngpio = ngpio; in viafb_gpio_probe() 251 viafb_gpio_config.gpio_chip.base = -1; /* Dynamic */ in viafb_gpio_probe() 252 ret = gpiochip_add_data(&viafb_gpio_config.gpio_chip, in viafb_gpio_probe() 256 viafb_gpio_config.gpio_chip.ngpio = 0; in viafb_gpio_probe() 277 if (viafb_gpio_config.gpio_chip.ngpio > 0) { in viafb_gpio_remove() 278 gpiochip_remove(&viafb_gpio_config.gpio_chip); in viafb_gpio_remove() [all …]
|
/linux/drivers/mfd/ |
A D | htc-i2cpld.c | 37 struct gpio_chip chip_out; 41 struct gpio_chip chip_in; 402 struct gpio_chip *gpio_chip; in htcpld_register_chip_gpio() local 412 gpio_chip = &(chip->chip_out); in htcpld_register_chip_gpio() 414 gpio_chip->parent = dev; in htcpld_register_chip_gpio() 415 gpio_chip->owner = THIS_MODULE; in htcpld_register_chip_gpio() 418 gpio_chip->direction_input = NULL; in htcpld_register_chip_gpio() 423 gpio_chip = &(chip->chip_in); in htcpld_register_chip_gpio() 425 gpio_chip->parent = dev; in htcpld_register_chip_gpio() 428 gpio_chip->set = NULL; in htcpld_register_chip_gpio() [all …]
|