Thread (4 messages) flat view 4 messages, 3 authors, 2022-11-08

Re: [PATCH] soc: fsl: qe: request pins non-exclusively

From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: 2022-11-08 16:20:46
Also in: linux-arm-kernel, linux-usb, lkml

On November 8, 2022 2:50:07 AM PST, Linus Walleij [off-list ref] wrote:
On Tue, Nov 8, 2022 at 4:16 AM Dmitry Torokhov
[off-list ref] wrote:
quoted
Commit 84582f9ed090 ("soc: fsl: qe: Avoid using gpio_to_desc()") changed
qe_pin_request() to request and hold GPIO corresponding to a given pin.
Unfortunately this does not work, as fhci-hcd requests these GPIOs
first, befor calling qe_pin_request() (see
drivers/usb/host/fhci-hcd.c::of_fhci_probe()).
To fix it change qe_pin_request() to request GPIOs non-exclusively, and
free them once the code determines GPIO controller and offset for each
GPIO/pin.

Also reaching deep into gpiolib implementation is not the best idea. We
should either export gpio_chip_hwgpio() or keep converting to the global
gpio numbers space until we fix the driver to implement proper pin
control.

Fixes: 84582f9ed090 ("soc: fsl: qe: Avoid using gpio_to_desc()")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Wow! Thanks for fixing this!

Reviewed-by: Linus Walleij <redacted>

I just sent that patch into the SoC patch tracker (soc@kernel.org)
with a not to apply it directly, I suggest you do the same (or ask me
to sign it off and send it).
I am not really plugged into soc patch/workflow so if you could do that that would be wonderful. 

Thanks!


-- 
Dmitry
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help