pinctrl: bcm2835: Change init order for gpio hogs
authorPhil Elwell <phil@raspberrypi.org>
Mon, 6 Jan 2020 14:05:42 +0000 (14:05 +0000)
committerPhil Elwell <pelwell@users.noreply.github.com>
Mon, 6 Jan 2020 16:30:00 +0000 (16:30 +0000)
commitc0927733d71433b13e4ae19e21c37fca4276ff55
tree04777e6765e9dc2acfb8e1dcc2855eec04820b7c
parent1baa00ef5960efe61396a2d6e521bd7854b8405b
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