mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
charge_state_v2: return correct host command error codes
Return host command error codes for EC_CMD_CHARGE_CONTROL instead of returning the result of EC functions which typically return element from enum ec_error_list, which is a different error list. BUG=chrome-os-partner:37171 BRANCH=samus TEST=make -j buildall Change-Id: Ia13cc8a2f747ddeafdc059c6e575dcc2f5b20b8d Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/254721 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
16eec7f14c
commit
1dccd0450e
@@ -981,12 +981,12 @@ static int charge_command_charge_control(struct host_cmd_handler_args *args)
|
||||
|
||||
rv = charge_force_idle(p->mode != CHARGE_CONTROL_NORMAL);
|
||||
if (rv != EC_SUCCESS)
|
||||
return rv;
|
||||
return EC_RES_ERROR;
|
||||
|
||||
#ifdef CONFIG_CHARGER_DISCHARGE_ON_AC
|
||||
rv = board_discharge_on_ac(p->mode == CHARGE_CONTROL_DISCHARGE);
|
||||
if (rv != EC_SUCCESS)
|
||||
return rv;
|
||||
return EC_RES_ERROR;
|
||||
#endif
|
||||
|
||||
return EC_RES_SUCCESS;
|
||||
|
||||
Reference in New Issue
Block a user