Skip to content

RFC power: supply: bq27xxx: Call power_supply_changed on status change

Merlijn Wajer linux-omap linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1power: supply: bq27xxx: Call power_supply_changed on status changedrivers/power/supply/bq27xxx_battery.c include/linux/power/bq27xxx_battery.h+30 -301 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/1] power: supply: bq27xxx: Call power_supply_changed on status change

Hi,

It seems that bq27xxx_battery_update does not call power_supply_changed when the charging status changes, and instead only when the capacity changes.

This can cause considerable delays in reporting charging status changes to userspace. This patch turns the battery status reading function into one that returns the value directly (as other *_read functions), adds the status to the cache, uses the cache when reporting the values and finally will trigger power_supply_changed when the charging status changes.

There is still a noticable delay in detecting charger status, but that seems to have a different cause.

Cheers,
Merlijn