gpio_brcmstb: Allow to build for ARCH_BCM2835
authorDom Cobley <popcornmix@gmail.com>
Fri, 21 May 2021 11:33:38 +0000 (12:33 +0100)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:33:41 +0000 (11:33 +0000)
commit5f4e9eadecf10486f6c61dd4102c4d27e63af84a
tree54f8bbc58846ecef8c768aa76506153abda27b40
parent9c9f00949ac0e8dd5b3e47b49c1ccf5c557a1bf6
gpio_brcmstb: Allow to build for ARCH_BCM2835

gpio-brcmstb: Report the correct bank width

gpio: brcmstb: Use bank address as gpiochip label

If the path to the device node is used as gpiochip label then
gpio-brcmstb instances with multiple banks end up with duplicated
names. Instead, use a combination of the driver name with the physical
address of the bank, which is both unique and helpful for devmem
debugging.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
gpio: mmio: Add DIRECT mode for shared access

The generic MMIO GPIO library uses shadow registers for efficiency,
but this breaks attempts by raspi-gpio to change other GPIOs in the
same bank. Add a DIRECT mode that makes fewer assumptions about the
existing register contents, but note that genuinely simultaneous
accesses are likely to lose updates.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
gpio: brcmstb: Don't always clear interrupt mask

If the GPIO controller is not being used as an interrupt source
leave the interrupt mask register alone. On BCM2712 it might be used
to generate interrupts to the VPU firmware, and on other devices it
doesn't matter since no interrupts will be generated.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
drivers/gpio/Kconfig
drivers/gpio/gpio-brcmstb.c
drivers/gpio/gpio-mmio.c
include/linux/gpio/driver.h