diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-05-17 16:08:05 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-05-21 20:35:47 +0000 |
commit | f52b23e96423fa0447013d58da1c6677ac8ae9f8 (patch) | |
tree | 83dc601edaa46e9310dff542eaf7784b3aadcddc /board/fruitpie | |
parent | ffac23c0ea1bd4ff4568f5bd709a98f912b833a7 (diff) | |
download | chrome-ec-f52b23e96423fa0447013d58da1c6677ac8ae9f8.tar.gz |
samus_pd: when sinking power detect loss of VBUS and disconnect
Detect loss of VBUS when acting as PD sink and go to the disconnected
state. This allows us to renegotiate power when power supply drops
and switches to 5V.
BUG=none
BRANCH=none
TEST=On a samus, tested by running for a couple of hours, and verifying
that occasionally when zinger drops from 20V to 5V, we detect it and
go to the disconnected state. Note, this only happens a couple times
every hour.
Change-Id: I237d267824ff564662c9c02e525ce2613ed229e6
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/200365
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/fruitpie')
-rw-r--r-- | board/fruitpie/usb_pd_config.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/board/fruitpie/usb_pd_config.h b/board/fruitpie/usb_pd_config.h index 3c53d5e923..75d3b112c3 100644 --- a/board/fruitpie/usb_pd_config.h +++ b/board/fruitpie/usb_pd_config.h @@ -84,6 +84,11 @@ static inline int pd_adc_read(int cc) return adc_read_channel(ADC_CH_CC2_PD); } +static inline int pd_snk_is_vbus_provided(void) +{ + return 1; +} + /* Standard-current DFP : no-connect voltage is 1.55V */ #define PD_SRC_VNC 1550 /* mV */ |