diff options
author | Alec Berg <alecaberg@chromium.org> | 2014-12-31 14:18:32 -0800 |
---|---|---|
committer | Alec Berg <alecaberg@chromium.org> | 2015-01-10 23:43:25 +0000 |
commit | d83bd6b892e696c13f3584b5d3e1e0f51aafe710 (patch) | |
tree | 366798000953d830de5ed6c5902a8c76e570cdde /board/zinger | |
parent | 193e23509f8b9df44852b4581c357f2d7caed0aa (diff) | |
download | chrome-ec-d83bd6b892e696c13f3584b5d3e1e0f51aafe710.tar.gz |
pd: implement new type-C connect state machine
Implement the new type-C connect state machine which removes
lock and hold times and adds a debounce time to make sure
CC lines settle before going into the attached state.
This also adds detection of accessories, but doesn't do anything
when an accessory is detected.
BUG=chrome-os-partner:33680
BRANCH=samus
TEST=test samus connected zinger and samus connected to samus. make
sure that the connection is always formed. also tested with a third
party with old state machine implementation and formed a connection
every time.
Change-Id: I91a7a6031bc35082cc19d7697142e4aa92ef46f2
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/238210
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/zinger')
-rw-r--r-- | board/zinger/usb_pd_config.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/board/zinger/usb_pd_config.h b/board/zinger/usb_pd_config.h index c22e68858d..0456a24652 100644 --- a/board/zinger/usb_pd_config.h +++ b/board/zinger/usb_pd_config.h @@ -107,8 +107,8 @@ static inline void pd_tx_init(void) static inline int pd_adc_read(int port, int cc) { - /* only one CC line */ - return adc_read_channel(ADC_CH_CC1_PD); + /* only one CC line, assume other one is always high */ + return (cc == 0) ? adc_read_channel(ADC_CH_CC1_PD) : 4096; } /* 3.0A DFP : no-connect voltage is 2.45V */ |