diff options
author | Ruibin Chang <ruibin.chang@ite.com.tw> | 2021-02-24 18:23:47 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-26 07:12:02 +0000 |
commit | ec06848a3a10cd3eaa29db26781d7fa356e8ee24 (patch) | |
tree | abee7b1ef6702d0d7daf5f895479cf055458568c | |
parent | dc8438f3960c29a3a2f32dad05c3dcfea1c4cd9c (diff) | |
download | chrome-ec-ec06848a3a10cd3eaa29db26781d7fa356e8ee24.tar.gz |
cleanup: rename ite tcpm driver
Rename it83xx_tcpm_drv to it8xxx2_tcpm_drv for chip it8xxx2 series.
BUG=none
BRANCH=none
TEST=1.make buildall -j
2.on hayato, connecting to adapter and dongle can go to ready state.
Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw>
Change-Id: I2622e7fe0884d3ae20a63ec48219de00d5537bc6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2717430
Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ruibin Chang <Ruibin.Chang@ite.com.tw>
-rw-r--r-- | baseboard/asurada/baseboard.c | 4 | ||||
-rw-r--r-- | board/it8xxx2_pdevb/board.c | 4 | ||||
-rw-r--r-- | driver/tcpm/it83xx_pd.h | 6 | ||||
-rw-r--r-- | driver/tcpm/it8xxx2.c | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/baseboard/asurada/baseboard.c b/baseboard/asurada/baseboard.c index 7bb3fbe1ae..04108bb485 100644 --- a/baseboard/asurada/baseboard.c +++ b/baseboard/asurada/baseboard.c @@ -401,14 +401,14 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { { .bus_type = EC_BUS_TYPE_EMBEDDED, /* TCPC is embedded within EC so no i2c config needed */ - .drv = &it83xx_tcpm_drv, + .drv = &it8xxx2_tcpm_drv, /* Alert is active-low, push-pull */ .flags = 0, }, { .bus_type = EC_BUS_TYPE_EMBEDDED, /* TCPC is embedded within EC so no i2c config needed */ - .drv = &it83xx_tcpm_drv, + .drv = &it8xxx2_tcpm_drv, /* Alert is active-low, push-pull */ .flags = 0, }, diff --git a/board/it8xxx2_pdevb/board.c b/board/it8xxx2_pdevb/board.c index 22f204258b..7c239866f0 100644 --- a/board/it8xxx2_pdevb/board.c +++ b/board/it8xxx2_pdevb/board.c @@ -36,14 +36,14 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { [USB_PD_PORT_ITE_0] = { .bus_type = EC_BUS_TYPE_EMBEDDED, /* TCPC is embedded within EC so needn't i2c config */ - .drv = &it83xx_tcpm_drv, + .drv = &it8xxx2_tcpm_drv, /* Alert is active-low, push-pull */ .flags = 0, }, [USB_PD_PORT_ITE_1] = { .bus_type = EC_BUS_TYPE_EMBEDDED, /* TCPC is embedded within EC so needn't i2c config */ - .drv = &it83xx_tcpm_drv, + .drv = &it8xxx2_tcpm_drv, /* Alert is active-low, push-pull */ .flags = 0, }, diff --git a/driver/tcpm/it83xx_pd.h b/driver/tcpm/it83xx_pd.h index bd3cc8e3a0..561d3a9418 100644 --- a/driver/tcpm/it83xx_pd.h +++ b/driver/tcpm/it83xx_pd.h @@ -423,12 +423,14 @@ struct cc_para_t { }; extern const struct usbpd_ctrl_t usbpd_ctrl_regs[]; +#if defined(CONFIG_USB_PD_TCPM_DRIVER_IT83XX) extern const struct tcpm_drv it83xx_tcpm_drv; -void it83xx_Rd_5_1K_only_for_hibernate(int port); -#ifdef CONFIG_USB_PD_TCPM_DRIVER_IT8XXX2 +#elif defined(CONFIG_USB_PD_TCPM_DRIVER_IT8XXX2) +extern const struct tcpm_drv it8xxx2_tcpm_drv; void it8xxx2_clear_tx_error_status(enum usbpd_port port); void it8xxx2_get_tx_error_status(enum usbpd_port port); #endif +void it83xx_Rd_5_1K_only_for_hibernate(int port); void switch_plug_out_type(enum usbpd_port port); /* * Board-level callback function to get cc tuning parameters diff --git a/driver/tcpm/it8xxx2.c b/driver/tcpm/it8xxx2.c index 6b7466ae07..f04c1d948c 100644 --- a/driver/tcpm/it8xxx2.c +++ b/driver/tcpm/it8xxx2.c @@ -926,7 +926,7 @@ static void it8xxx2_tcpm_hook_disconnect(void) DECLARE_HOOK(HOOK_USB_PD_DISCONNECT, it8xxx2_tcpm_hook_disconnect, HOOK_PRIO_DEFAULT); -const struct tcpm_drv it83xx_tcpm_drv = { +const struct tcpm_drv it8xxx2_tcpm_drv = { .init = &it8xxx2_tcpm_init, .release = &it8xxx2_tcpm_release, .get_cc = &it8xxx2_tcpm_get_cc, |