diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-06-12 09:36:19 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-06-13 05:35:16 +0000 |
commit | 6c41e626e2240c98a7620905a125e48560e81808 (patch) | |
tree | a9f9a61b0d1a657e8593b15b9e4b15e1d4778495 | |
parent | 9e7cca1625d0c88322cce21b08f838c3fec4b99a (diff) | |
download | chrome-ec-6c41e626e2240c98a7620905a125e48560e81808.tar.gz |
fruitpie: detect source disconnect and go to disconnected state
Detect when VBUS is disconnected when acting as a sink and go to
the disconnected state.
BUG=none
BRANCH=none
TEST=Connect a zinger to fruitpie, run pd state from console to
verify it is in SNK_READY, then remove zinger and verify the state
changes to SNK_DISCONNECTED.
Change-Id: I0b46cfe3ac129f1ec9c11327c9e0d45c0c6761e8
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/203564
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r-- | board/fruitpie/usb_pd_config.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/board/fruitpie/usb_pd_config.h b/board/fruitpie/usb_pd_config.h index f05b71c920..0f51c87038 100644 --- a/board/fruitpie/usb_pd_config.h +++ b/board/fruitpie/usb_pd_config.h @@ -105,7 +105,7 @@ static inline int pd_adc_read(int cc) static inline int pd_snk_is_vbus_provided(void) { - return 1; + return gpio_get_level(GPIO_VBUS_WAKE); } /* Standard-current DFP : no-connect voltage is 1.55V */ |