diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-08-08 10:54:08 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-08-12 05:11:39 +0000 |
commit | 283fe98939fa56c61280529e2f933bedb122a52a (patch) | |
tree | 9f23119e61da776c19363b572204071549ae2b0b /common/host_command_pd.c | |
parent | adbd5a0c9a6749468b7c085029cf5e5a41595dbf (diff) | |
download | chrome-ec-283fe98939fa56c61280529e2f933bedb122a52a.tar.gz |
samus: ryu: fix charge state machine init of input currentstabilize-6146.B
Currently charge state machine resets input current limit to default
every time AC is connected. Problem is by the time charge state machine
gets around to setting input current, it could have already been set
by successful PD negotiation, and this ends up overriding that value.
This fix has the state machine store desired input current limit, as
determined from PD negotation or any other place, and send last desired
input current limit on AC connect.
BUG=chrome-os-partner:24461
BRANCH=none
TEST=load on samus, test toggling between "pd 0 dev 5" and "pd 0 dev 20",
and test plugging and unplugging zinger numerous times, and verify charger
command always gives the expected input current limit based on PD
negotiation.
Change-Id: I18d8acc9e2085739e783c9c70c682d46bcce7fdb
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/211639
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'common/host_command_pd.c')
-rw-r--r-- | common/host_command_pd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/host_command_pd.c b/common/host_command_pd.c index 1216d28ae3..82d58f79aa 100644 --- a/common/host_command_pd.c +++ b/common/host_command_pd.c @@ -57,7 +57,7 @@ static void pd_exchange_status(void) */ pd_status.curr_lim_ma = pd_status.curr_lim_ma * 2 / 3; #endif - rv = charger_set_input_current(MAX(pd_status.curr_lim_ma, + rv = charge_set_input_current_limit(MAX(pd_status.curr_lim_ma, CONFIG_CHARGER_INPUT_CURRENT)); if (rv < 0) CPRINTS("Failed to set input current limit from PD MCU"); |