linux-stable/arch/arm/mach-pxa
Linus Walleij 1a6d8fab9d Input: ads7846 - Convert to use software nodes
[ Upstream commit 767d83361a ]

The Nokia 770 is using GPIOs from the global numberspace on the
CBUS node to pass down to the LCD controller. This regresses when we
let the OMAP GPIO driver use dynamic GPIO base.

The Nokia 770 now has dynamic allocation of IRQ numbers, so this
needs to be fixed for it to work.

As this is the only user of LCD MIPID we can easily augment the
driver to use a GPIO descriptor instead and resolve the issue.

The platform data .shutdown() callback wasn't even used in the
code, but we encode a shutdown asserting RESET in the remove()
callback for completeness sake.

The CBUS also has the ADS7846 touchscreen attached.

Populate the devices on the Nokia 770 CBUS I2C using software
nodes instead of platform data quirks. This includes the LCD
and the ADS7846 touchscreen so the conversion just brings the LCD
along with it as software nodes is an all-or-nothing design
pattern.

The ADS7846 has some limited support for using GPIO descriptors,
let's convert it over completely to using device properties and then
fix all remaining boardfile users to provide all platform data using
software nodes.

Dump the of includes and of_match_ptr() in the ADS7846 driver as part
of the job.

Since we have to move ADS7846 over to obtaining the GPIOs it is
using exclusively from descriptors, we provide descriptor tables
for the two remaining in-kernel boardfiles using ADS7846:

- PXA Spitz
- MIPS Alchemy DB1000 development board

It was too hard for me to include software node conversion of
these two remaining users at this time: the spitz is using a
hscync callback in the platform data that would require further
GPIO descriptor conversion of the Spitz, and moving the hsync
callback down into the driver: it will just become too big of
a job, but it can be done separately.

The MIPS Alchemy DB1000 is simply something I cannot test, so take
the easier approach of just providing some GPIO descriptors in
this case as I don't want the patch to grow too intrusive.

As we see that several device trees have incorrect polarity flags
and just expect to bypass the gpiolib polarity handling, fix up
all device trees too, in a separate patch.

Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Fixes: 92bf78b33b ("gpio: omap: use dynamic allocation of base")
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-19 16:35:47 +02:00
..
addr-map.h ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
am200epd.c fbcon: call fbcon_fb_(un)registered directly 2019-06-12 20:27:45 +02:00
am300epd.c ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
devices.c ARM: pxa: prune unused device support 2023-01-20 11:24:08 +01:00
devices.h ARM: pxa: remove unused pxa3xx-ulpi 2023-01-20 11:24:04 +01:00
generic.c ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
generic.h ARM: pxa: move clk register definitions to driver 2022-05-07 22:55:49 +02:00
gumstix.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
gumstix.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
irq.c ARM: pxa: Use of_property_read_bool() for boolean properties 2023-04-14 14:58:41 +02:00
irqs.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
Kconfig ARM: pxa: remove unused pxa3xx-ulpi 2023-01-20 11:24:04 +01:00
Makefile ARM: pxa: remove unused pxa3xx-ulpi 2023-01-20 11:24:04 +01:00
mfp-pxa2xx.c ARM: pxa: prune unused device support 2023-01-20 11:24:08 +01:00
mfp-pxa2xx.h ARM: pxa: move plat-pxa to drivers/soc/ 2022-05-07 22:56:16 +02:00
mfp-pxa3xx.c ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
mfp-pxa3xx.h ARM: pxa: move plat-pxa to drivers/soc/ 2022-05-07 22:56:16 +02:00
mfp-pxa25x.h ARM: pxa: prune unused device support 2023-01-20 11:24:08 +01:00
mfp-pxa27x.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mfp-pxa300.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mfp-pxa320.h ARM: pxa: restore mfp-pxa320.h 2023-02-08 22:10:39 +01:00
mfp.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
pm.c ARM: pxa: prune unused device support 2023-01-20 11:24:08 +01:00
pm.h ARM: pxa: prune unused device support 2023-01-20 11:24:08 +01:00
pxa-dt.c ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
pxa-regs.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
pxa2xx-regs.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
pxa2xx.c ARM: pxa: remove irda leftover 2023-01-20 11:24:00 +01:00
pxa3xx-regs.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
pxa3xx.c ARM: pxa: prune unused device support 2023-01-20 11:24:08 +01:00
pxa3xx.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
pxa25x.c ARM: pxa: prune unused device support 2023-01-20 11:24:08 +01:00
pxa25x.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
pxa27x-udc.h ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
pxa27x.c ARM: pxa: prune unused device support 2023-01-20 11:24:08 +01:00
pxa27x.h ARM: pxa: prune unused device support 2023-01-20 11:24:08 +01:00
pxa300.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
pxa300.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pxa320.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
pxa320.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
regs-ost.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
regs-rtc.h ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
reset.c ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
reset.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
sharpsl_pm.c ARM: Convert to platform remove callback returning void 2023-03-17 16:03:57 +01:00
sharpsl_pm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sleep.S ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
smemc.c ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
smemc.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
spitz.c Input: ads7846 - Convert to use software nodes 2023-07-19 16:35:47 +02:00
spitz.h ARM: pxa: move mach/*.h to mach-pxa/ 2022-05-07 22:56:17 +02:00
spitz_pm.c ARM: pxa: spitz: use gpio descriptors for audio 2022-05-07 22:55:47 +02:00
standby.S treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 1) 2022-06-10 14:51:35 +02:00
udc.h