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@xxxxxxxxx> > Cc: Dirk Opfer <dirk@xxxxxxxxxxxxxxx> > Cc: Robert Jarzmik <robert.jarzmik@xxxxxxx> > Cc: Daniel Mack <daniel@xxxxxxxxxx> > Cc: Haojian Zhuang <haojian.zhuang@xxxxxxxxx> > Cc: Lee Jones <lee.jones@xxxxxxxxxx> > Cc: Sebastian Reichel <sre@xxxxxxxxxx> > Cc: Liam Girdwood <lgirdwood@xxxxxxxxx> > Cc: Mark Brown <broonie@xxxxxxxxxx> > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> > --- > 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@xxxxxxxxxxxxx> -- Sebastian
Attachment:
signature.asc
Description: PGP signature