mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 18:11:05 +00:00
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>