diff options
author | Edward Hill <ecgh@chromium.org> | 2018-06-04 11:12:16 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-07 08:35:53 -0700 |
commit | 31815b74ffdcd3979ba075e04f39e7fb704957f8 (patch) | |
tree | c1d59a6c29be6363271009332b3bdc13f66009b2 /baseboard | |
parent | 718b86e1d2e44862602b9f87e391aa0963bf0ee7 (diff) | |
download | chrome-ec-31815b74ffdcd3979ba075e04f39e7fb704957f8.tar.gz |
sn5s330: Track source enabled state locally
sn5s330_init() will turn off the PP1 (source) FET, but
sn5s330_is_sourcing_vbus() can be called before PPC init: by
usb_charger_init() and pd_power_supply_reset() from pd_task().
Keep track of the PP1 (source) FET state locally, and use this for
sn5s330_is_sourcing_vbus(), instead of reading the state from the PPC chip
over I2C every time.
This solves the problem of sn5s330_is_sourcing_vbus() being called before
sn5s330_init(), and also avoids other problems caused by
sn5s330_is_sourcing_vbus() doing I2C communication:
crrev.com/c/969701/7/board/cheza/board.c#85
BUG=b:80203727
BRANCH=none
TEST=Reboot Grunt EC while one USB-C port is VBUS source.
Change-Id: Ie0fdd3d672bc747fcdbb746586149e194165fdac
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1086115
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'baseboard')
0 files changed, 0 insertions, 0 deletions