Home
last modified time | relevance | path

Searched hist:"828546 e24280f721350a7a0dcc92416e917b4382" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/gpio/
H A Dgpio-aggregator.c828546e24280f721350a7a0dcc92416e917b4382 Mon May 11 16:52:55 CEST 2020 Geert Uytterhoeven <geert+renesas@glider.be> gpio: Add GPIO Aggregator

GPIO controllers are exported to userspace using /dev/gpiochip*
character devices. Access control to these devices is provided by
standard UNIX file system permissions, on an all-or-nothing basis:
either a GPIO controller is accessible for a user, or it is not.
Currently no mechanism exists to control access to individual GPIOs.

Hence add a GPIO driver to aggregate existing GPIOs, and expose them as
a new gpiochip.

This supports the following use cases:
- Aggregating GPIOs using Sysfs
This is useful for implementing access control, and assigning a set
of GPIOs to a specific user or virtual machine.
- Generic GPIO Driver
This is useful for industrial control, where it can provide
userspace access to a simple GPIO-operated device described in DT,
cfr. e.g. spidev for SPI-operated devices.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Link: https://lore.kernel.org/r/20200511145257.22970-5-geert+renesas@glider.be
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>