Skip to content

Commit 72748b7

Browse files
authored
Merge pull request #7 from DHowett/dh/bug/6
Avoid resetting charge_max_level during CHG_LIMIT_GET_LIMIT
2 parents 5374ce8 + 489a20c commit 72748b7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

baseboard/fwk/battery.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,7 @@ static enum ec_status cmd_charging_limit_control(struct host_cmd_handler_args *a
401401
charging_maximum_level = charging_maximum_level | CHG_LIMIT_OVERRIDE;
402402

403403
if (p->modes & CHG_LIMIT_GET_LIMIT) {
404-
system_get_bbram(SYSTEM_BBRAM_IDX_CHG_MAX, &charging_maximum_level);
405-
r->max_percentage = charging_maximum_level;
404+
system_get_bbram(SYSTEM_BBRAM_IDX_CHG_MAX, &r->max_percentage);
406405
args->response_size = sizeof(*r);
407406
}
408407

0 commit comments

Comments
 (0)