mbox series

[0/2] pinctrl: bcm2835: Fix gpio hogs and pin reinitialisation

Message ID 20211129105556.675235-1-phil@raspberrypi.com
Headers show
Series pinctrl: bcm2835: Fix gpio hogs and pin reinitialisation | expand

Message

Phil Elwell Nov. 29, 2021, 10:55 a.m. UTC
Tackle two problems with the pinctrl-bcm2835 driver and its Device Tree
configuration:

1. The pinctrl-bcm2835 driver is a combined pinctrl/gpio driver.
Currently the gpio side is registered first, but this breaks gpio hogs
(which are configured during gpiochip_add_data).

2. Since [1], a "gpio-ranges" property is required in order for pins
to be returned to inputs when freed. Note that without patch 1, the
device never gets out of EPROBE_DEFER.

Note that the Fixes: tags are little more than hooks to hang the back-ports
on - no blame is intended.

[1] commit 2ab73c6d8323 ("gpio: Support GPIO controllers without
        pin-ranges")

Phil Elwell (2):
  pinctrl: bcm2835: Change init order for gpio hogs
  ARM: dts: gpio-ranges property is now required

 arch/arm/boot/dts/bcm2711.dtsi        |  2 ++
 arch/arm/boot/dts/bcm283x.dtsi        |  2 ++
 drivers/pinctrl/bcm/pinctrl-bcm2835.c | 29 +++++++++++++++------------
 3 files changed, 20 insertions(+), 13 deletions(-)