summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2014-09-22 18:56:19 +0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-09-23 06:29:01 +0000
commita22e5d33b0d9820ebb611275e5d84cfd2bbfc24e (patch)
tree8a65a70eedfcfce4c4c60eaac4c56b4beda5561e
parentbf368218e517c47bc5dfe92566431182e55c68b7 (diff)
downloadchrome-ec-a22e5d33b0d9820ebb611275e5d84cfd2bbfc24e.tar.gz
plankton: Set polarity when connected
When a cable is connected, set USBC_POLARITY to the right polarity. This is done in a different way than how we do this on other boards because we only want to control polarity automatically on cable connection. BUG=chrome-os-partner:32163 TEST=Flip the cable, check USBC_POLARITY changes. BRANCH=None Change-Id: I903123b8fd729e8c913014b83812d20328600f8e Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/219291 Reviewed-by: Alec Berg <alecaberg@chromium.org>
-rw-r--r--board/plankton/usb_pd_config.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/board/plankton/usb_pd_config.h b/board/plankton/usb_pd_config.h
index 71389c13c2..67e0f26542 100644
--- a/board/plankton/usb_pd_config.h
+++ b/board/plankton/usb_pd_config.h
@@ -110,6 +110,7 @@ static inline void pd_select_polarity(int port, int polarity)
| (polarity ?
STM32_COMP_CMP1INSEL_INM4 :
STM32_COMP_CMP1INSEL_INM6);
+ gpio_set_level(GPIO_USBC_POLARITY, polarity);
}
/* Initialize pins used for TX and put them in Hi-Z */