From 7f87c6aeae1b091f8bc670df64c5a173d429aa34 Mon Sep 17 00:00:00 2001 From: Dino Li Date: Mon, 5 Sep 2016 11:58:25 +0800 Subject: [PATCH] TCPM: it83xx: fix build error Signed-off-by: Dino Li BRANCH=none BUG=none TEST=The "IT83XX_PD_EVB" is non-zero and "make BOARD=it83xx_evb -j" Change-Id: Ie555370754f325fdf61d65c01533f4ca3897b25f Reviewed-on: https://chromium-review.googlesource.com/381135 Commit-Ready: Vincent Palatin Tested-by: Vincent Palatin Reviewed-by: Vincent Palatin --- driver/tcpm/it83xx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/driver/tcpm/it83xx.c b/driver/tcpm/it83xx.c index c3ac8fb49d..66e4dd1502 100644 --- a/driver/tcpm/it83xx.c +++ b/driver/tcpm/it83xx.c @@ -333,7 +333,7 @@ static int it83xx_tcpm_get_cc(int port, int *cc1, int *cc2) return EC_SUCCESS; } -static int it83xx_tcpm_select_rp_value(int port, int rp) +static int it83xx_tcpm_select_rp_value(int port, int rp_sel) { uint8_t rp; /* @@ -343,7 +343,7 @@ static int it83xx_tcpm_select_rp_value(int port, int rp) * 10: 180uA outpt (1.5A) * 11: 80uA outpt (USB default) */ - switch (rp) { + switch (rp_sel) { case TYPEC_RP_1A5: rp = 2 << 2; break; @@ -355,7 +355,9 @@ static int it83xx_tcpm_select_rp_value(int port, int rp) rp = 3 << 2; break; } - IT83XX_USBPD_CCGCR(port) = (IT83XX_USBPD_CCGCR(port) & ~(3 << 2)) | Rp; + IT83XX_USBPD_CCGCR(port) = (IT83XX_USBPD_CCGCR(port) & ~(3 << 2)) | rp; + + return EC_SUCCESS; } static int it83xx_tcpm_set_cc(int port, int pull)