mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
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 <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/621776 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user