diff options
author | John Crossley <crossley@lionsemi.corp-partner.google.com> | 2021-05-06 17:03:32 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-05-07 04:16:35 +0000 |
commit | ab745b89a9efb81aac73f8c5bcfe8a8ff60e857d (patch) | |
tree | 66d92271be5081e20203f0eff0b8fe4bb69df97f /include/driver | |
parent | 13b2bbc4f99c7e21a913c439a99cd1bdb402e45b (diff) | |
download | chrome-ec-ab745b89a9efb81aac73f8c5bcfe8a8ff60e857d.tar.gz |
ln9310: check software workaround is in place for every power-up
Current software sets some registers only during initial
powering of LN9310 (when battery is plugged in). If LN9310
was reset for any reason and then a system power on was
attempted (power button press), then LN9310 would attempt a
startup without the workaround (bad idea). This change adds a
check before every LN9310 enable/disable event and
re-initializes LN9310 if a reset has occurred .
BRANCH=Trogdor
BUG=b:185308433
TEST=Should not break the current boot flow, i.e. power-up and
power-down (using long-press of the power button) should function
Change-Id: I98c08f50bfd48e09776033eac64658f6e27fb58f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2876869
Reviewed-by: John Crossley <crossley@lionsemi.corp-partner.google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: John Crossley <crossley@lionsemi.corp-partner.google.com>
Tested-by: John Crossley <crossley@lionsemi.corp-partner.google.com>
Diffstat (limited to 'include/driver')
-rw-r--r-- | include/driver/ln9310.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/driver/ln9310.h b/include/driver/ln9310.h index e4bd0bc7e0..59ae888781 100644 --- a/include/driver/ln9310.h +++ b/include/driver/ln9310.h @@ -134,7 +134,11 @@ #define LN9310_LION_CTRL_MASK 0xFF #define LN9310_LION_CTRL_UNLOCK_AND_EN_TM 0xAA #define LN9310_LION_CTRL_UNLOCK 0x5B -#define LN9310_LION_CTRL_LOCK 0x00 +/* + * value changed to 0x22 to distinguish from reset value of 0x00 + * 0x22 and 0x00 are functionally equivalent within LN9310 + */ +#define LN9310_LION_CTRL_LOCK 0x22 #define LN9310_REG_CFG_0 0x3C #define LN9310_CFG_0_LS_HELPER_IDLE_MSK_MASK 0x20 |