Re: [PATCHv1 0/3] N900 battery status fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Pali Rohár
pali.rohar@xxxxxxxxx

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux