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>
This commit is contained in:
Dino Li
2016-09-05 11:58:25 +08:00
committed by chrome-bot
parent f4dba3b7d3
commit 7f87c6aeae

View File

@@ -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)