From 8e7bad04821fb7b288ab2d3b4e1e3551ee7d6e94 Mon Sep 17 00:00:00 2001 From: Philip Chen Date: Fri, 18 Aug 2017 12:17:37 -0700 Subject: [PATCH] battery/max17055: Specify desired charging voltage/current BUG=b:64821815, b:63870414 CQ-DEPEND=CL:621777 BRANCH=none TEST=plug in AC, and check 'charger' command on ec console Change-Id: Ic60bcab7fd0ccc2ea73471ac46e9b0b887f251d9 Signed-off-by: Philip Chen Reviewed-on: https://chromium-review.googlesource.com/621776 Commit-Ready: Philip Chen Tested-by: Philip Chen Reviewed-by: Shawn N --- driver/battery/max17055.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driver/battery/max17055.c b/driver/battery/max17055.c index 1814fc57ea..beeaa4bc42 100644 --- a/driver/battery/max17055.c +++ b/driver/battery/max17055.c @@ -256,8 +256,8 @@ void battery_get_params(struct batt_params *batt) batt->current = CURRENT_CONV((int16_t)reg); - /* Default to not desiring voltage and current */ - batt->desired_voltage = batt->desired_current = 0; + batt->desired_voltage = battery_get_info()->voltage_max; + batt->desired_current = BATTERY_DESIRED_CHARGING_CURRENT; /* If any of those reads worked, the battery is responsive */ if ((batt->flags & flags_to_check) != flags_to_check) {