ARM/mfd/gpio: Fixup TPS65010 regression on OMAP1 OSK1
authorLinus Walleij <linus.walleij@linaro.org>
Sun, 30 Apr 2023 09:35:05 +0000 (11:35 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 24 May 2023 13:01:22 +0000 (15:01 +0200)
commitc32c81f3dbdfd68f6ab20a29ad86f811aed36e4e
tree4b2b457ce25735fcc465c956a022c903b3daf424
parentac9a78681b921877518763ba0e89202254349d1b
ARM/mfd/gpio: Fixup TPS65010 regression on OMAP1 OSK1

Aaro reports problems on the OSK1 board after we altered
the dynamic base for GPIO allocations.

It appears this happens because the OMAP driver now
allocates GPIO numbers dynamically, so all that is
references by number is a bit up in the air.

Let's bite the bullet and try to just move the gpio_chip
in the tps65010 MFD driver over to using dynamic allocations.
Alter everything in the OSK1 board file to use a GPIO
descriptor table and lookups.

Utilize the NULL device to define some board-specific
GPIO lookups and use these to immediately look up the
same GPIOs, convert to IRQ numbers and pass as resources
to the devices. This is ugly but should work.

The .setup() callback for tps65010 was used for some GPIO
hogging, but since the OSK1 is the only user in the entire
kernel we can alter the signatures to something that
is helpful and make a clean transition.

Fixes: 92bf78b33b0b ("gpio: omap: use dynamic allocation of base")
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: andy.shevchenko@gmail.com
Cc: Andreas Kemnade <andreas@kemnade.info>
Acked-by: Lee Jones <lee@kernel.org>
Reviewed-by: Lee Jones <lee@kernel.org>
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-omap1/board-osk.c
drivers/mfd/tps65010.c
include/linux/mfd/tps65010.h