Thread (22 messages) 22 messages, 9 authors, 2019-11-05

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

From: Linus Walleij <hidden>
Date: 2019-11-05 09:28:29
Also in: linux-arm-kernel, lkml

On Fri, Oct 18, 2019 at 5:42 PM Arnd Bergmann [off-list ref] 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 <redacted>

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help