mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-07 16:11:43 +00:00
isl923x: Don't initialize ICL on sysjump.
The ISL923x init function would initialize the charger's input current to the board's defined default. For some boards like meowth and zoombini, the default input current was set quite low, 128mA. When sysjumping, all HOOK_INITs are called again and therefore the input current limit would be reset even thought it would have been set correctly prior to jumping. Setting the current limit so low, without a battery, would cause a power failure and the PMIC would drop its power OK signal and go into emergency shutdown. This commit simply adds a check to whether the EC jumped to this image. If it has, the charger input current limit is left unchanged. It will be updated to the correct value by charge manager later on after determine the attached charge supplier. BUG=b:72129338 BRANCH=None TEST=Flash meowth; Boot to S0 without a battery; Verify that PMIC_DPWROK remains high. TEST=Repeat above test for zoombini. Change-Id: I7e5bbbbf3ec604c876cc4fa0163f8bb7feff4cc9 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/896960 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Caveh Jalali <caveh@google.com>
This commit is contained in:
committed by
chrome-bot
parent
d138e4dc63
commit
61b602d292
@@ -14,6 +14,7 @@
|
||||
#include "hooks.h"
|
||||
#include "i2c.h"
|
||||
#include "isl923x.h"
|
||||
#include "system.h"
|
||||
#include "task.h"
|
||||
#include "timer.h"
|
||||
#include "util.h"
|
||||
@@ -365,6 +366,13 @@ static void isl923x_init(void)
|
||||
if (raw_write16(ISL9238_REG_CONTROL3, reg))
|
||||
goto init_fail;
|
||||
|
||||
/*
|
||||
* 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())
|
||||
return;
|
||||
|
||||
/*
|
||||
* Initialize the input current limit to the board's default.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user