mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
charger_state_v2: force static battery info update on battery change
BUG=none BRANCH=none TEST=on system which has different static battery info based on battery present, when the present status has changed, verify the battery info is also changed. Change-Id: Id58c545e3315dc63c6dd6b59141b6302d767bfb7 Signed-off-by: Kevin K Wong <kevin.k.wong@intel.com> Reviewed-on: https://chromium-review.googlesource.com/331655 Reviewed-by: Li1 Feng <li1.feng@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
@@ -649,6 +649,11 @@ void charger_task(void)
|
||||
|
||||
if (prev_bp != curr.batt.is_present) {
|
||||
prev_bp = curr.batt.is_present;
|
||||
|
||||
/* Update battery info due to change of battery */
|
||||
batt_info = battery_get_info();
|
||||
need_static = 1;
|
||||
|
||||
curr.desired_input_current =
|
||||
get_desired_input_current(prev_bp, info);
|
||||
charger_set_input_current(curr.desired_input_current);
|
||||
|
||||
Reference in New Issue
Block a user