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

From: Andy Shevchenko
Date: Sun Oct 01 2023 - 10:41:15 EST


On Sun, Oct 1, 2023 at 5:13 PM Duje Mihanović <duje.mihanovic@xxxxxxxx> 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 <linus.walleij@xxxxxxxxxx>

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