On Thu, Feb 22, 2018 at 09:31:37PM +0100, Pali Rohár wrote: > On Thursday 22 February 2018 21:23:46 Sebastian Reichel wrote: > > Hi, > > > > Merlijn Wajer reported an issue on N900, that battery status is reported > > "not charging" when the charger is not connected. This is a bug in > > bq27xxx driver, which does not properly handle error codes, like > > -ENODEV, for power_supply_am_i_supplied(). This is fixed in the first > > patch. > > > > It also exposed, that the charger relationship is not described in > > the N900 DT. This is fixed by patch 3, which depends on patch 2 > > (DT reference support for bq2415x). > > > > Patch 1 and 2 has no dependencies. Patch 3 requires a kernel with > > patch 2 applied, otherwise bq27xxx will probe defer infinitely > > > > -- Sebastian > > > > Sebastian Reichel (3): > > power: supply: bq27xxx: support missing supplier device > > power: supply: bq2415x: add DT referencing support > > ARM: dts: omap3-n900: Add link between battery and charger > > > > arch/arm/boot/dts/omap3-n900.dts | 1 + > > drivers/power/supply/bq2415x_charger.c | 5 ++++- > > drivers/power/supply/bq27xxx_battery.c | 2 +- > > 3 files changed, 6 insertions(+), 2 deletions(-) > > > > Patch series looks good, you can add my: > > Reviewed-by: Pali Rohár <pali.rohar@xxxxxxxxx> > > Some suggestion for future: Currently kernel power supply management > exports 4 devices: 2 batteries (bq27200 and rx51_battery) and 2 chargers > (bq24150a and isp1707). It is because there are 3 chips + ADC for > battery management at HW level. But in reality in N900 is just one > battery (with one charger). So it would be a good idea if kernel can > combine those two battery devices and two charger devices into one and > exports to userspace. Or provide some information to userspace that > bq27200 and rx51_battery represent just one physical battery. That is probably something Charger Manager (*) was once about to solve, but I've actually never seen it used. Anyone has a clue what happened with it? (*) https://elinux.org/images/c/c6/Elce11_ham.pdf -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html