diff options
author | Caveh Jalali <caveh@chromium.org> | 2020-06-24 17:59:04 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-06-25 21:30:41 +0000 |
commit | 47c824e1f28c773b402b40a7dd2722ad53a42e9e (patch) | |
tree | 90bcf9368f739cd929650000ea7bd7275f215507 | |
parent | 2976123d483824bf49c21198f26447df95db712d (diff) | |
download | chrome-ec-47c824e1f28c773b402b40a7dd2722ad53a42e9e.tar.gz |
isl9241: set current limit after EFS2 sysjump
this fixes an issue where the charger current limit is not set as
early as intended due to EFS2 interactions.
when EFS2 is enabled, we sysjump to RW very early - before INIT_HOOKS
run. any code in INIT_HOOK functions that is predicated by
system_jumped_to_this_image() will either always run or never
run. this is not the intended behavior.
charger_chips_init() is called from INIT_HOOKS, and that's where we
call isl9241_init(). we now need to check system_jumped_late() instead
of system_jumped_to_this_image() to get the intended behavior.
BRANCH=none
BUG=b:159769490, chromium:1072743
TEST=isl9241_init now sets current limit to 512mA right after EFS2
sysjump (verified with additional debug printfs)
Change-Id: I6de12d947ea9abb8e6db85dee0129a7053d0708c
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2265303
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
Tested-by: Keith Short <keithshort@chromium.org>
-rw-r--r-- | driver/charger/isl9241.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/charger/isl9241.c b/driver/charger/isl9241.c index ffd2ff6e17..2951a1bfd2 100644 --- a/driver/charger/isl9241.c +++ b/driver/charger/isl9241.c @@ -383,7 +383,7 @@ static void isl9241_init(int chgnum) * No need to proceed with the rest of init if we sysjump'd to this * image as the input current limit has already been set. */ - if (system_jumped_to_this_image()) + if (system_jumped_late()) return; /* Initialize the input current limit to the board's default. */ |