pinctrl: bcm2835: Change init order for gpio hogs
authorPhil Elwell <phil@raspberrypi.org>
Mon, 6 Jan 2020 14:05:42 +0000 (14:05 +0000)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:33:13 +0000 (16:33 +0100)
commit711f23648f5082642f852a6f414fc5a1793dd6ce
tree28554ae304ab06405cecff8c64287834dce99165
parent184e9fdc839d6f7c5edb0307b421bea036b9582c
pinctrl: bcm2835: Change init order for gpio hogs

pinctrl-bcm2835 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). Part of the hog initialisation
is a call to pinctrl_gpio_request, and since the pinctrl driver hasn't
yet been registered this results in an -EPROBE_DEFER from which it can
never recover.

Change the initialisation sequence to register the pinctrl driver
first.

See: https://www.raspberrypi.org/forums/viewtopic.php?f=107&t=260600

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/pinctrl/bcm/pinctrl-bcm2835.c