Re: [PATCH 26/46] ARM: pxa: zylonite: use gpio lookup instead mfp header

From: Linus Walleij
Date: Tue Nov 05 2019 - 04:28:32 EST


On Fri, Oct 18, 2019 at 5:42 PM Arnd Bergmann <arnd@xxxxxxxx> wrote:

> The mach/mfp.h header is only used by this one driver
> for hardcoded gpio numbers. Change that to use a lookup
> table instead.
>
> Cc: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
> Cc: linux-input@xxxxxxxxxxxxxxx
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
(...)
> + GPIO_LOOKUP("gpio-pxa", mfp_to_gpio(MFP_PIN_GPIO15),
> + "touch", GPIO_ACTIVE_LOW),

What I tried to do with code like this, when I was ambitious,
was to wind out mfp_to_gpio() as well and either just encode
the offset on gpio-pxa as a define locally.

But this works too, the kernel looks better after than before
and I am not perfectionist, so:
Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Yours,
Linus Walleij