linux-stable/arch/arm/mach-pxa
Linus Walleij 813c2aee51 ARM/pxa/mfd/power/sound: Switch Tosa to GPIO descriptors
The Tosa device (Sharp SL-6000) has a mishmash driver set-up
for the Toshiba TC6393xb MFD that includes a battery charger
and touchscreen and has some kind of relationship to the SoC
sound driver for the AC97 codec. Other devices define a chip
like this but seem only half-implemented, not really handling
battery charging etc.

This patch switches the Toshiba MFD device to provide GPIO
descriptors to the battery charger and SoC codec. As a result
some descriptors need to be moved out of the Tosa boardfile
and new one added: all SoC GPIO resources to these drivers
now comes from the main boardfile, while the MFD provide
GPIOs for its portions.

As a result we can request one GPIO from our own GPIO chip
and drop two hairy callbacks into the board file.

This platform badly needs to have its drivers split up and
converted to device tree probing to handle this quite complex
relationship in an orderly manner. I just do my best in solving
the GPIO descriptor part of the puzzle. Please don't ask me
to fix everything that is wrong with these driver to todays
standards, I am just trying to fix one aspect. I do try to
use modern devres resource management and handle deferred
probe using new functions where appropriate.

Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Dirk Opfer <dirk@opfer-online.de>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Reviewed-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2022-05-07 22:55:33 +02:00
..
include/mach ARM/pxa/mfd/power/sound: Switch Tosa to GPIO descriptors 2022-05-07 22:55:33 +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: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
balloon3-pcmcia.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
balloon3.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
balloon3.h ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
capc7117.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
cm-x300.c ARM: pxa: maybe fix gpio lookup tables 2022-04-20 13:29:44 +02:00
colibri-evalboard.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
colibri-pcmcia.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
colibri-pxa3xx.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
colibri-pxa270-income.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
colibri-pxa270.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
colibri-pxa300.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
colibri-pxa320.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
colibri.h mtd: nand: use Marvell reworked NAND controller driver with all platforms 2018-02-23 21:55:04 +01:00
corgi.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
corgi_pm.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
csb701.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
csb726.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
csb726.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
devices.c watchdog: sa1100: use platform device registration 2022-04-19 21:33:57 +02:00
devices.h ARM: pxa: add dma slave map 2018-06-18 21:29:16 +02:00
e740-pcmcia.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
eseries-irq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
eseries.c ARM/pxa/mfd/power/sound: Switch Tosa to GPIO descriptors 2022-05-07 22:55:33 +02:00
ezx.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
generic.c ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
generic.h ARM: pxa: split mach/generic.h 2022-04-19 16:25:50 +02:00
gumstix.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
gumstix.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
h5000.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
h5000.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
himalaya.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
hx4700-pcmcia.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
hx4700.c ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
icontrol.c spi: pxa2xx_spi: Convert to use GPIO descriptors 2022-01-31 15:17:27 +00:00
idp.c ARM: pxa: stop using mach/bitfield.h 2022-04-19 16:28:04 +02:00
idp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
irq.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
Kconfig ARM: pxa: remove Intel Imote2 and Stargate 2 boards 2022-02-28 15:08:14 +01:00
littleton.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
littleton.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lpd270.c ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
lpd270.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
lubbock.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
magician.c ARM: pxa: maybe fix gpio lookup tables 2022-04-20 13:29:44 +02:00
mainstone.c ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
mainstone.h ARM: pxa: make mainstone.h private 2022-04-19 16:25:59 +02:00
Makefile ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
Makefile.boot treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mfp-pxa2xx.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
mfp-pxa2xx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mfp-pxa3xx.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
mfp-pxa3xx.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mfp-pxa25x.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mfp-pxa930.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mioa701.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
mioa701.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mioa701_bootresume.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 429 2019-06-05 17:37:16 +02:00
mp900.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mxm8x10.c ARM: pxa: pxa2xx-ac97-lib: use IRQ resource 2022-04-19 21:34:05 +02:00
mxm8x10.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
palm27x.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
palm27x.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
palmld-pcmcia.c ARM: pxa: use pdev resource for palmld mmio 2022-04-20 13:29:34 +02:00
palmld.c ARM: pxa: use pdev resource for palmld mmio 2022-04-20 13:29:34 +02:00
palmld.h ARM: pxa: use pdev resource for palmld mmio 2022-04-20 13:29:34 +02:00
palmt5.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
palmt5.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
palmtc-pcmcia.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
palmtc.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
palmtc.h ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
palmte2.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
palmte2.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
palmtreo.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
palmtreo.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
palmtx-pcmcia.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
palmtx.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
palmtx.h ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
palmz72.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
palmz72.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pcm027.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
pcm027.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pcm990-baseboard.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
pcm990_baseboard.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
pm.c ARM: pxa: Delete an error message for a failed memory allocation in pxa_pm_init() 2017-06-14 08:32:21 +02:00
pm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
poodle.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
pxa-dt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 332 2019-06-05 17:37:06 +02:00
pxa-regs.h ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
pxa2xx.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
pxa3xx-ulpi.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
pxa3xx.c ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
pxa3xx.h ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
pxa25x.c ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
pxa25x.h ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
pxa27x-udc.h ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
pxa27x.c ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
pxa27x.h ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02: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
pxa930.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
pxa930.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pxa_cplds_irqs.c ARM: Bulk conversion to generic_handle_domain_irq() 2021-08-12 11:39:39 +01:00
regs-rtc.h ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
regs-u2d.h ARM: pxa: stop using mach/bitfield.h 2022-04-19 16:28:04 +02:00
regs-uart.h ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
reset.c watchdog: sa1100: use platform device registration 2022-04-19 21:33:57 +02:00
saar.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 332 2019-06-05 17:37:06 +02:00
sharpsl_pm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02: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: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
smemc.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
spitz.c spi: pxa2xx_spi: Convert to use GPIO descriptors 2022-01-31 15:17:27 +00:00
spitz_pm.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
standby.S ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
tavorevb.c backlight: pwm_bl: Switch to full GPIO descriptor 2020-03-18 15:05:57 +00:00
tosa-bt.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tosa.c ARM/pxa/mfd/power/sound: Switch Tosa to GPIO descriptors 2022-05-07 22:55:33 +02:00
tosa_bt.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
trizeps4-pcmcia.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
trizeps4.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
trizeps4.h ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
udc.h ARM: pxa: make more mach/*.h files local 2015-12-01 21:52:50 +01:00
viper-pcmcia.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
viper-pcmcia.h ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
viper.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
viper.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vpac270-pcmcia.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
vpac270.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
vpac270.h ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
xcep.c ARM: pxa: make addr-map.h header local 2022-04-19 21:34:06 +02:00
z2.c spi: pxa2xx_spi: Convert to use GPIO descriptors 2022-01-31 15:17:27 +00:00
zeus.c ARM: pxa: move pcmcia board data into mach-pxa 2022-04-19 21:34:05 +02:00
zeus.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
zylonite.c ARM: pxa: move mach/sound.h to linux/platform_data/ 2022-04-19 16:28:41 +02:00
zylonite.h ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
zylonite_pxa300.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00
zylonite_pxa320.c ARM: pxa: split up mach/hardware.h 2022-04-19 16:27:05 +02:00