Re: [PATCH v4 0/5] gpio: Add GPIO Aggregator
From: Eugeniu Rosca <hidden>
Date: 2020-01-20 13:26:16
Also in:
linux-gpio, linux-renesas-soc, lkml, qemu-devel
From: Eugeniu Rosca <hidden>
Date: 2020-01-20 13:26:16
Also in:
linux-gpio, linux-renesas-soc, lkml, qemu-devel
Hi Geert, On Wed, Jan 15, 2020 at 07:15:18PM +0100, Geert Uytterhoeven wrote:
Hi all,
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 this adds a GPIO driver to aggregate existing GPIOs, and expose
them as a new gpiochip. This is useful for implementing access control,
and assigning a set of GPIOs to a specific user. Furthermore, this
simplifies and hardens exporting GPIOs to a virtual machine, as the VM
can just grab the full GPIO controller, and no longer needs to care
about which GPIOs to grab and which not, reducing the attack surface.
Recently, other use cases have been discovered[1]:
- Describing simple GPIO-operated devices in DT, and using the GPIO
Aggregator as a generic GPIO driver for userspace, which is useful
for industrial control.As per comments and test results in [*] (accidentally attached to v3): Reviewed-by: Eugeniu Rosca <redacted> Tested-by: Eugeniu Rosca <redacted> [*] https://lore.kernel.org/linux-renesas-soc/20200120121439.GA24951@lxhi-065.adit-jv.com/ (local) ("Re: [PATCH v3 0/7] gpio: Add GPIO Aggregator/Repeater") -- Best Regards, Eugeniu Rosca