diff options
Diffstat (limited to 'driver/usb_mux')
-rw-r--r-- | driver/usb_mux/amd_fp5.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/amd_fp6.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/anx3443.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/anx7440.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/anx7451.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/it5205.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/pi3usb3x532.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/ps8740.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/ps8743.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/ps8822.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/tusb1064.c | 2 | ||||
-rw-r--r-- | driver/usb_mux/usb_mux.c | 3 |
12 files changed, 12 insertions, 13 deletions
diff --git a/driver/usb_mux/amd_fp5.c b/driver/usb_mux/amd_fp5.c index ca042b0fa0..b5aa6d2669 100644 --- a/driver/usb_mux/amd_fp5.c +++ b/driver/usb_mux/amd_fp5.c @@ -50,7 +50,7 @@ static int amd_fp5_set_mux(const struct usb_mux *me, mux_state_t mux_state, *ack_required = false; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; saved_mux_state[me->usb_port] = mux_state; diff --git a/driver/usb_mux/amd_fp6.c b/driver/usb_mux/amd_fp6.c index a776a696f7..ff3b6eacb8 100644 --- a/driver/usb_mux/amd_fp6.c +++ b/driver/usb_mux/amd_fp6.c @@ -142,7 +142,7 @@ static int amd_fp6_set_mux(const struct usb_mux *me, mux_state_t mux_state, *ack_required = false; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; if (mux_state == USB_PD_MUX_NONE) diff --git a/driver/usb_mux/anx3443.c b/driver/usb_mux/anx3443.c index f3b0b08afd..e8c2621a54 100644 --- a/driver/usb_mux/anx3443.c +++ b/driver/usb_mux/anx3443.c @@ -97,7 +97,7 @@ static int anx3443_set_mux(const struct usb_mux *me, mux_state_t mux_state, *ack_required = false; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; saved_mux_state[me->usb_port].mux_state = mux_state; diff --git a/driver/usb_mux/anx7440.c b/driver/usb_mux/anx7440.c index 456eaaa407..5a80487e05 100644 --- a/driver/usb_mux/anx7440.c +++ b/driver/usb_mux/anx7440.c @@ -69,7 +69,7 @@ static int anx7440_set_mux(const struct usb_mux *me, mux_state_t mux_state, *ack_required = false; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; res = anx7440_read(me, ANX7440_REG_CHIP_CTRL, ®); diff --git a/driver/usb_mux/anx7451.c b/driver/usb_mux/anx7451.c index b974128740..127f0b8e67 100644 --- a/driver/usb_mux/anx7451.c +++ b/driver/usb_mux/anx7451.c @@ -97,7 +97,7 @@ static int anx7451_set_mux(const struct usb_mux *me, mux_state_t mux_state, *ack_required = false; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; /* diff --git a/driver/usb_mux/it5205.c b/driver/usb_mux/it5205.c index de3d950c86..a773a51d0e 100644 --- a/driver/usb_mux/it5205.c +++ b/driver/usb_mux/it5205.c @@ -100,7 +100,7 @@ static int it5205_set_mux(const struct usb_mux *me, mux_state_t mux_state, *ack_required = false; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; switch (mux_state & MUX_STATE_DP_USB_MASK) { diff --git a/driver/usb_mux/pi3usb3x532.c b/driver/usb_mux/pi3usb3x532.c index 54eff928b7..42d13ca835 100644 --- a/driver/usb_mux/pi3usb3x532.c +++ b/driver/usb_mux/pi3usb3x532.c @@ -89,7 +89,7 @@ static int pi3usb3x532_set_mux(const struct usb_mux *me, mux_state_t mux_state, *ack_required = false; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; if (mux_state & USB_PD_MUX_USB_ENABLED) diff --git a/driver/usb_mux/ps8740.c b/driver/usb_mux/ps8740.c index 557c4f1976..2b412ac35a 100644 --- a/driver/usb_mux/ps8740.c +++ b/driver/usb_mux/ps8740.c @@ -77,7 +77,7 @@ static int ps8740_set_mux(const struct usb_mux *me, mux_state_t mux_state, *ack_required = false; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; if (mux_state & USB_PD_MUX_USB_ENABLED) diff --git a/driver/usb_mux/ps8743.c b/driver/usb_mux/ps8743.c index 86f0a7f9b2..6c123bb50c 100644 --- a/driver/usb_mux/ps8743.c +++ b/driver/usb_mux/ps8743.c @@ -126,7 +126,7 @@ static int ps8743_set_mux(const struct usb_mux *me, mux_state_t mux_state, *ack_required = false; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; if (mux_state & USB_PD_MUX_USB_ENABLED) diff --git a/driver/usb_mux/ps8822.c b/driver/usb_mux/ps8822.c index d3ea76965d..97d1158f99 100644 --- a/driver/usb_mux/ps8822.c +++ b/driver/usb_mux/ps8822.c @@ -84,7 +84,7 @@ static int ps8822_set_mux(const struct usb_mux *me, mux_state_t mux_state, *ack_required = false; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; rv = ps8822_read(me, PS8822_REG_PAGE0, PS8822_REG_MODE, ®); diff --git a/driver/usb_mux/tusb1064.c b/driver/usb_mux/tusb1064.c index 9dc25d0d01..266e36a2eb 100644 --- a/driver/usb_mux/tusb1064.c +++ b/driver/usb_mux/tusb1064.c @@ -97,7 +97,7 @@ int tusb1064_set_mux(const struct usb_mux *me, mux_state_t mux_state, int mask; /* This driver treats safe mode as none */ - if (mux_state == USB_PD_MUX_SAFE_MODE) + if (mux_state & USB_PD_MUX_SAFE_MODE) mux_state = USB_PD_MUX_NONE; rv = tusb1064_read(me, TUSB1064_REG_GENERAL, ®); diff --git a/driver/usb_mux/usb_mux.c b/driver/usb_mux/usb_mux.c index 334b7f2f2d..ceabe7f8c8 100644 --- a/driver/usb_mux/usb_mux.c +++ b/driver/usb_mux/usb_mux.c @@ -514,8 +514,7 @@ static void perform_mux_set(int port, int index, mux_state_t mux_mode, return; /* Configure superspeed lanes */ - mux_state = ((mux_mode != USB_PD_MUX_NONE) && - (mux_mode != USB_PD_MUX_SAFE_MODE) && polarity) ? + mux_state = ((mux_mode != USB_PD_MUX_NONE) && polarity) ? mux_mode | USB_PD_MUX_POLARITY_INVERTED : mux_mode; |