[PATCH] ARM/pxa/mfd/power/sound: Switch Tosa to GPIO descriptors

Sebastian Reichel sre at kernel.org
Mon Jul 19 07:36:54 PDT 2021


Hi,

On Thu, Jul 15, 2021 at 05:16:25PM +0200, Linus Walleij wrote:
> 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.

Yeah, the wm97xx-battery situation is a huge mess with
two different drivers for the same hardware on different
platforms :(

> Cc: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
> Cc: Dirk Opfer <dirk at opfer-online.de>
> Cc: Robert Jarzmik <robert.jarzmik at free.fr>
> Cc: Daniel Mack <daniel at zonque.org>
> Cc: Haojian Zhuang <haojian.zhuang at gmail.com>
> Cc: Lee Jones <lee.jones at linaro.org>
> Cc: Sebastian Reichel <sre at kernel.org>
> Cc: Liam Girdwood <lgirdwood at gmail.com>
> Cc: Mark Brown <broonie at kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
> ---
> Dmitry/Dirk: it'd be great if you could test this patch on
> the Tosa and try to help me iron out any bugs.
> 
> Merging strategy: please provide ACKs and I will attempt
> to merge this through the SoC tree.
> ---
>  drivers/power/supply/tosa_battery.c   | 171 ++++++++++++++++----------
> [...]

Acked-by: Sebastian Reichel <sebastian.reichel at collabora.com>

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210719/b5ad6141/attachment.sig>


More information about the linux-arm-kernel mailing list