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>
This commit is contained in:
Vic Yang
2014-09-22 18:56:19 +08:00
committed by chrome-internal-fetch
parent bf368218e5
commit a22e5d33b0

View File

@@ -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 */