Thread (27 messages) 27 messages, 7 authors, 2022-01-04

Re: [PATCH v2 1/2] pinctrl: bcm2835: Change init order for gpio hogs

From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2021-12-07 18:32:50
Also in: linux-devicetree

On 12/6/21 1:22 AM, Phil Elwell wrote:
...and gpio-ranges

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.

This also solves a similar problem with the gpio-ranges property, which
is required in order for released pins to be returned to inputs.

Fixes: 73345a18d464b ("pinctrl: bcm2835: Pass irqchip when adding gpiochip")
Signed-off-by: Phil Elwell <redacted>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help