diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2016-09-05 11:58:25 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-09-05 07:07:13 -0700 |
commit | 7f87c6aeae1b091f8bc670df64c5a173d429aa34 (patch) | |
tree | 14ba2e219017ccd0a5b473644acd8e1bce1cc0f1 /driver | |
parent | f4dba3b7d35c4db495f9a8eed442d005a2bc8ae7 (diff) | |
download | chrome-ec-7f87c6aeae1b091f8bc670df64c5a173d429aa34.tar.gz |
TCPM: it83xx: fix build error
Signed-off-by: Dino Li <dino.li@ite.com.tw>
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 <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/tcpm/it83xx.c | 8 |
1 files 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) |