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

Linus Walleij
2019-11-05T09:28:29Z

On Fri, Oct 18, 2019 at 5:42 PM Arnd Bergmann <arnd@arndb.de> 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@gmail.com>
> Cc: linux-input@vger.kernel.org
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
(...)
> + 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@linaro.org>

Yours,
Linus Walleij