Thread (20 messages) 20 messages, 5 authors, 2023-10-02

Re: [PATCH RFC v4 4/6] ARM: pxa: Convert reset driver to GPIO descriptors

From: Andy Shevchenko <hidden>
Date: 2023-10-01 14:41:14
Also in: linux-arm-kernel, linux-gpio, linux-spi, linux-usb, lkml

On Sun, Oct 1, 2023 at 5:13 PM Duje Mihanović [off-list ref] wrote:
The PXA reset driver still uses the legacy GPIO interface for
configuring and asserting the reset pin.

Convert it to use the GPIO descriptor interface.
Acked-by: Linus Walleij <redacted>
I dunno how.

...
+       reset_gpio = gpiod_get(NULL, "reset generator", GPIOD_ASIS);
+       if (IS_ERR(reset_gpio)) {
+               pr_err("Can't request reset_gpio: %pe\n", reset_gpio);
+               return PTR_ERR(reset_gpio);
        }
Here you asked for the GPIO named as "reset generator-gpio(s)" (The
"(s)" part is for new bindings), but you must not use spaces in the
GPIO names. Moreover the string literal there is for labeling, and not
for matching.

...
+GPIO_LOOKUP_SINGLE(spitz_reset_gpio_table, NULL, "pxa-gpio",
And here should be gpios. That's what you have to request, but because
of the global (device-less) nature of this, you have to be very
careful to avoid any clashes.
+               SPITZ_GPIO_ON_RESET, "reset generator", GPIO_ACTIVE_HIGH);
...

TBH, I don't know how it is supposed to work with your current code
and if Linus really was okay with this.

-- 
With Best Regards,
Andy Shevchenko
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help