bcm2835-virtgpio: Virtual GPIO driver
authorpopcornmix <popcornmix@gmail.com>
Tue, 23 Feb 2016 19:56:04 +0000 (19:56 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:32:46 +0000 (11:32 +0000)
commita84a4ec4e1c024c2ba481fe8a1e15168987b252b
tree99a26dc0de1eabb478462839679cbf8ed27182b1
parentb8be9d41f6fcf0b63fbe1cb439e54f247c360c4a
bcm2835-virtgpio: Virtual GPIO driver

Add a virtual GPIO driver that uses the firmware mailbox interface to
request that the VPU toggles LEDs.

gpio: bcm-virt: Fix the get() method

The get() method does not understand the on-the-wire encoding of the
remote GPIO states, thinking they are simple on/off bits when they are
really pairs of 16-bit counts. Rewrite the get() handler to return the
value last written, which will eventually match the actual GPIO state
if there are no other changes.

See: https://github.com/raspberrypi/linux/issues/4638

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
drivers/gpio/Kconfig
drivers/gpio/Makefile
drivers/gpio/gpio-bcm-virt.c [new file with mode: 0644]