diff options
author | Diana Z <dzigterman@chromium.org> | 2020-08-19 15:19:16 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-26 23:16:48 +0000 |
commit | 358fe610d559d663c22940d9ff810bcd9d6399cd (patch) | |
tree | b271ccdc82834c75c02a73dc110e865665911601 /board/lingcod/board.c | |
parent | 64330aa254e35bb6b20a5162b35ff945ee367803 (diff) | |
download | chrome-ec-358fe610d559d663c22940d9ff810bcd9d6399cd.tar.gz |
SM5803: Improve flow control setting
This change adds a new Vbus sink enable command which will be called on
initial sink connection and detach. This will separate out most of the
FLOW1 and FLOW2 register control from the set_mode() driver API which is
regularly called from the charger task. This means that, if charging on
a port fails, the charging will no longer be automatically re-enabled by
the charger task.
Additionally, this folds the verification that we aren't disabling
sourcing into the sink enable so board files no longer need to verify
this before calling the sink enable/disable API. It also allows the OTG
disable to fully clear the FLOW1 mode since calls to OTG are more
targeted than the sink enable/disable, which happens any time another
charge port is set.
BRANCH=None
BUG=b:163511546,b:165677311
TEST=on waddledee and drawlat, confirm expected FLOW1 contents and Vbus
level:
- sinking C0 or C1
- sourcing C0 or C1
- sourcing both C0 and C1
- sinking C0 while sourcing C1
- sinking C1 while sourcing C0
- battery cutoff with charger in C0 or C1
- no battery boot with charger in C0 or C1
- power role swap with HooToo hub in C0 and C1
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ifdc7786243bdf0a634d8db99b4deb53457232ad3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2372738
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2378963
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
Tested-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'board/lingcod/board.c')
0 files changed, 0 insertions, 0 deletions