mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-06 15:01:35 +00:00
Do not trickle charge when battery ask for no current
When battery ask for no current, we should go back to init state to determine what to do next. BUG=chrome-os-partner:10946 TEST=none Change-Id: Idf3ac7554a0774655138c5efe9c5e6de7f6cb7a0 Reviewed-on: https://gerrit.chromium.org/gerrit/26310 Reviewed-by: Rong Chang <rongchang@chromium.org> Tested-by: Vic Yang <victoryang@chromium.org> Commit-Ready: Vic Yang <victoryang@chromium.org>
This commit is contained in:
@@ -335,7 +335,8 @@ static enum power_state state_charge(struct power_state_context *ctx)
|
||||
if (ctx->curr.error)
|
||||
return PWR_STATE_ERROR;
|
||||
|
||||
if (ctx->curr.batt.desired_current < ctx->charger->current_min)
|
||||
if (ctx->curr.batt.desired_current < ctx->charger->current_min &&
|
||||
ctx->curr.batt.desired_current > 0)
|
||||
return trickle_charge(ctx);
|
||||
|
||||
/* Check charger reset */
|
||||
|
||||
Reference in New Issue
Block a user