From a22e5d33b0d9820ebb611275e5d84cfd2bbfc24e Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Mon, 22 Sep 2014 18:56:19 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/219291 Reviewed-by: Alec Berg --- board/plankton/usb_pd_config.h | 1 + 1 file changed, 1 insertion(+) 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 */ -- cgit v1.2.1