diff options
author | Tom Hughes <tomhughes@chromium.org> | 2021-10-25 17:43:48 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-27 21:28:15 +0000 |
commit | 09382e18c22f9788bba39300d4d1b1dcfc173332 (patch) | |
tree | 50916945223f6ba4648d77934d1cd70c0479d6be /board | |
parent | ec524d7ca0af4bfd7f851cf244bd992c50013499 (diff) | |
download | chrome-ec-09382e18c22f9788bba39300d4d1b1dcfc173332.tar.gz |
board/felwinter: Fix signal type
When building with clang, it warns:
board/felwinter/usbc_config.c:206:16: error: implicit conversion from
enumeration type 'enum gpio_signal' to different enumeration type 'enum
ioex_signal' [-Werror,-Wenum-conversion]
rst_signal = GPIO_USB_C1_RT_RST_R_ODL;
~ ^~~~~~~~~~~~~~~~~~~~~~~~
When we are mixing gpio_signal and ioex_signal, we should be calling
gpio_or_ioex_set_level, which will call gpio_set_level or ioex_set_level,
depending on the signal type.
BRANCH=none
BUG=b:172020503
TEST=none
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Id835a1a31d686bee128e0908d3916f36447f78ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3243006
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/felwinter/usbc_config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/board/felwinter/usbc_config.c b/board/felwinter/usbc_config.c index 0d553ca0c8..bb2e6c2218 100644 --- a/board/felwinter/usbc_config.c +++ b/board/felwinter/usbc_config.c @@ -207,7 +207,7 @@ void config_usb_db_type(void) __override int bb_retimer_power_enable(const struct usb_mux *me, bool enable) { - enum ioex_signal rst_signal; + int rst_signal; if (me->usb_port == USBC_PORT_C1) rst_signal = GPIO_USB_C1_RT_RST_R_ODL; @@ -228,14 +228,14 @@ __override int bb_retimer_power_enable(const struct usb_mux *me, bool enable) * retimer_init() function ensures power is up before calling * this function. */ - ioex_set_level(rst_signal, 1); + gpio_or_ioex_set_level(rst_signal, 1); /* * Allow 1ms time for the retimer to power up lc_domain * which powers I2C controller within retimer */ msleep(1); } else { - ioex_set_level(rst_signal, 0); + gpio_or_ioex_set_level(rst_signal, 0); msleep(1); } return EC_SUCCESS; |