Commits

Anonymous committed c33ff3d

power: android-battery: push uevent whenever charge source changes

Ensure userspace reads an up-to-date value for charging status whenever the
charge source is updated. Avoid races where stale charging state may be
reflected in userspace until the next battery state poll.

Change-Id: Ia744db48584e9e9abf442710c279af9e3a25c079
Signed-off-by: Todd Poynor <toddpoynor@google.com>

  • Participants
  • Parent commits 4bed54c
  • Branches android-3.4

Comments (0)

Files changed (1)

File drivers/power/android_battery.c

 
 	mutex_unlock(&android_bat_state_lock);
 	wake_lock_timeout(&battery->charger_wake_lock, HZ * 2);
+	power_supply_changed(&battery->psy_bat);
 }