linux-stable/include/linux/gpio
Sergio Paracuellos 4e804c39f1 gpiolib: convert 'devprop_gpiochip_set_names' to support multiple gpiochip banks per device
The default gpiolib-of implementation does not work with the multiple
gpiochip banks per device structure used for example by the gpio-mt7621
and gpio-brcmstb drivers. To fix these kind of situations driver code
is forced to fill the names to avoid the gpiolib code to set names
repeated along the banks. Instead of continue with that antipattern
fix the gpiolib core function to get expected behaviour for every
single situation adding a field 'offset' in the gpiochip structure.
Doing in this way, we can assume this offset will be zero for normal
driver code where only one gpiochip bank per device is used but
can be set explicitly in those drivers that really need more than
one gpiochip.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
2021-07-29 19:41:12 +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: acpi: Introduce acpi_get_and_request_gpiod() helper 2021-06-04 16:24:19 +03:00
driver.h gpiolib: convert 'devprop_gpiochip_set_names' to support multiple gpiochip banks per device 2021-07-29 19:41:12 +02:00
gpio-reg.h gpio: Add comments on #if/#else/#endif 2019-06-27 15:56:50 +01:00
machine.h gpio: aggregator: Use compound literal from the header 2021-02-15 11:43:32 +01:00
regmap.h gpio: regmap: move drvdata to config data 2021-06-07 15:39:19 +02:00