summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorTing Shen <phoenixshen@google.com>2020-03-04 19:33:55 +0800
committerCommit Bot <commit-bot@chromium.org>2020-03-05 09:41:35 +0000
commitb043a78063597f30a63bc31298957e333057b014 (patch)
tree9c37e53bab7aa28dd0fbef9fbca3c6c4f2e73e52 /driver
parent73477d6694e24b931d55c6f36cbc904f2cb602bc (diff)
downloadchrome-ec-b043a78063597f30a63bc31298957e333057b014.tar.gz
driver/tcpm/it8xxx2: fix incorrect function prototype
Update prototype based on the tcpm_drv definition change in CL:1967932. BUG=none TEST=Verify this compiles with a WIP asurada board BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ib4640ad0d44261c431f6182352012465955e1b31 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2087099 Reviewed-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/tcpm/it8xxx2.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/driver/tcpm/it8xxx2.c b/driver/tcpm/it8xxx2.c
index 94d5d71839..f70a740bd0 100644
--- a/driver/tcpm/it8xxx2.c
+++ b/driver/tcpm/it8xxx2.c
@@ -440,9 +440,13 @@ static int it83xx_tcpm_set_cc(int port, int pull)
return it83xx_set_cc(port, pull);
}
-static int it83xx_tcpm_set_polarity(int port, int polarity)
+static int it83xx_tcpm_set_polarity(int port, enum tcpc_cc_polarity polarity)
{
- it83xx_select_polarity(port, polarity);
+ enum usbpd_cc_pin cc_pin =
+ (polarity == POLARITY_CC1 || polarity == POLARITY_CC1_DTS) ?
+ USBPD_CC_PIN_1 : USBPD_CC_PIN_2;
+
+ it83xx_select_polarity(port, cc_pin);
return EC_SUCCESS;
}