summaryrefslogtreecommitdiff
path: root/driver/retimer/pi3dpx1207.c
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2020-01-23 07:19:06 -0800
committerCommit Bot <commit-bot@chromium.org>2020-01-28 02:35:08 +0000
commit50d60e3fe12a852ae412d9502ca22a5b72cb441b (patch)
tree3d5f925aba3d00f523812acb5238548a6e3dc4a1 /driver/retimer/pi3dpx1207.c
parent43dfea03a49d46677590ac42f2fce4419835e1e7 (diff)
downloadchrome-ec-50d60e3fe12a852ae412d9502ca22a5b72cb441b.tar.gz
usb_mux: cleanup: Replace mux state enums with ec_command bit flag
BUG=b:145796172 BRANCH=none TEST=make buildall -j Change-Id: Ie4ffaf208745764262931501f0dff77b525a4e59 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2017569 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver/retimer/pi3dpx1207.c')
-rw-r--r--driver/retimer/pi3dpx1207.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/driver/retimer/pi3dpx1207.c b/driver/retimer/pi3dpx1207.c
index de00b5a082..74eb80aac1 100644
--- a/driver/retimer/pi3dpx1207.c
+++ b/driver/retimer/pi3dpx1207.c
@@ -100,28 +100,28 @@ static int pi3dpx1207_set_mux(int port, mux_state_t mux_state)
const int gpio_dp_enable = pi3dpx1207_controls[port].dp_enable_gpio;
/* USB */
- if (mux_state & MUX_USB_ENABLED) {
+ if (mux_state & USB_PD_MUX_USB_ENABLED) {
gpio_or_ioex_set_level(gpio_enable, 1);
/* USB with DP */
- if (mux_state & MUX_DP_ENABLED) {
+ if (mux_state & USB_PD_MUX_DP_ENABLED) {
gpio_or_ioex_set_level(gpio_dp_enable, 1);
- mode_val |= (mux_state & MUX_POLARITY_INVERTED)
+ mode_val |= (mux_state & USB_PD_MUX_POLARITY_INVERTED)
? PI3DPX1207_MODE_CONF_USB_DP_FLIP
: PI3DPX1207_MODE_CONF_USB_DP;
}
/* USB without DP */
else {
gpio_or_ioex_set_level(gpio_dp_enable, 0);
- mode_val |= (mux_state & MUX_POLARITY_INVERTED)
+ mode_val |= (mux_state & USB_PD_MUX_POLARITY_INVERTED)
? PI3DPX1207_MODE_CONF_USB_FLIP
: PI3DPX1207_MODE_CONF_USB;
}
}
/* DP without USB */
- else if (mux_state & MUX_DP_ENABLED) {
+ else if (mux_state & USB_PD_MUX_DP_ENABLED) {
gpio_or_ioex_set_level(gpio_enable, 1);
gpio_or_ioex_set_level(gpio_dp_enable, 1);
- mode_val |= (mux_state & MUX_POLARITY_INVERTED)
+ mode_val |= (mux_state & USB_PD_MUX_POLARITY_INVERTED)
? PI3DPX1207_MODE_CONF_DP_FLIP
: PI3DPX1207_MODE_CONF_DP;
}