power: supply: bq27xxx/bq25890 status update fixes
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest10 patches 1 replyIn review
- v19 patches 3 repliesSuperseded
Changes in v2 from the cover letter
- Do not use bq->charger in bq25890_external_power_changed(), because it may not be set yet (avoid NULL ptr deref on race)
- Add "power: supply: bq24190: Call power_supply_changed() after updating input current" to the series
Patches in v2 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 00/10] power: supply: bq27xxx/bq25890 status update fixes
Hi all,
Here is v2 if my bq* status update fixes series
Changes in v2:
- Do not use bq->charger in bq25890_external_power_changed(), because it may not be set yet (avoid NULL ptr deref on race)
- Add "power: supply: bq24190: Call power_supply_changed() after updating input current" to the series
The main goal of this series is to fix userspace sometimes not getting notified in a timely manner of charging <-> discharging status changes, causing e.g. battery status icons to lag and the lagging of updates also effects power_supply_leds.c .
While working on this I noticed a number of races surrounding bq27xxx_battery_update(), so patches 1-4 fix those first.
Patches 5-10 take care of the status update lagging issues.
Regards,
Hans
Hans de Goede (10):
power: supply: bq27xxx: Fix bq27xxx_battery_update() race condition
power: supply: bq27xxx: Fix I2C IRQ race on remove
power: supply: bq27xxx: Fix poll_interval handling and races on remove
power: supply: bq27xxx: Add cache parameter to
bq27xxx_battery_current_and_status()
power: supply: bq27xxx: Move bq27xxx_battery_update() down
power: supply: bq27xxx: Ensure power_supply_changed() is called on
current sign changes
power: supply: bq27xxx: After charger plug in/out wait 0.5s for things
to stabilize
power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() +
schedule()
power: supply: bq25890: Call power_supply_changed() after updating
input current or voltage
power: supply: bq24190: Call power_supply_changed() after updating
input current
drivers/power/supply/bq24190_charger.c | 1 + drivers/power/supply/bq25890_charger.c | 3 + drivers/power/supply/bq27xxx_battery.c | 181 +++++++++++---------- drivers/power/supply/bq27xxx_battery_i2c.c | 3 +- include/linux/power/bq27xxx_battery.h | 4 + 5 files changed, 108 insertions(+), 84 deletions(-)
Signature · 1 line
2.39.1