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:
Kevin K Wong
2016-03-07 16:06:12 -08:00
committed by chrome-bot
parent 52f7b3a0c8
commit f7ae91a590

View File

@@ -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);