1
0
Fork 0
alistair23-linux/include/linux/gpio
Michael Walle ebe363197e gpio: add a reusable generic gpio_chip using regmap
There are quite a lot simple GPIO controller which are using regmap to
access the hardware. This driver tries to be a base to unify existing
code into one place. This won't cover everything but it should be a good
starting point.

It does not implement its own irq_chip because there is already a
generic one for regmap based devices. Instead, the irq_chip will be
instantiated in the parent driver and its irq domain will be associate
to this driver.

For now it consists of the usual registers, like set (and an optional
clear) data register, an input register and direction registers.
Out-of-the-box, it supports consecutive register mappings and mappings
where the registers have gaps between them with a linear mapping between
GPIO offset and bit position. For weirder mappings the user can register
its own .xlate().

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200528145845.31436-3-michael@walle.cc
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2020-06-03 10:48:37 +02:00
..
aspeed.h gpio: aspeed: Add interfaces for co-processor to grab GPIOs 2018-07-02 16:10:15 +02:00
consumer.h gpiolib: Introduce gpiod_set_config() 2020-03-27 22:36:29 +01:00
driver.h gpiolib: Introduce gpiochip_irqchip_add_domain() 2020-06-03 10:48:37 +02:00
gpio-reg.h gpio: Add comments on #if/#else/#endif 2019-06-27 15:56:50 +01:00
machine.h gpiolib: Add support for GPIO lookup by line name 2020-05-18 10:12:42 +02:00
regmap.h gpio: add a reusable generic gpio_chip using regmap 2020-06-03 10:48:37 +02:00