diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2019-10-04 12:02:19 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-04 13:51:26 +0200 |
commit | f2372b87c386871b16d7dbda680d98d4092ab708 (patch) | |
tree | 0c6d98533643cd438b74352b8352e7cb9162615f /drivers/usb | |
parent | usb: typec: ucsi: ccg: Remove run_isr flag (diff) | |
download | linux-f2372b87c386871b16d7dbda680d98d4092ab708.tar.xz linux-f2372b87c386871b16d7dbda680d98d4092ab708.zip |
usb: typec: ucsi: displayport: Fix for the mode entering routine
Making sure that ucsi_displayport_enter() function does not
return an error if the displayport alternate mode has
already been entered. It's normal that the firmware (or
controller) has already entered the alternate mode by the
time the operating system is notified about the device.
Fixes: af8622f6a585 ("usb: typec: ucsi: Support for DisplayPort alt mode")
Cc: stable@vger.kernel.org
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20191004100219.71152-3-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/typec/ucsi/displayport.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/typec/ucsi/displayport.c b/drivers/usb/typec/ucsi/displayport.c index 6c103697c582..d99700cb4dca 100644 --- a/drivers/usb/typec/ucsi/displayport.c +++ b/drivers/usb/typec/ucsi/displayport.c @@ -75,6 +75,8 @@ static int ucsi_displayport_enter(struct typec_altmode *alt) if (cur != 0xff) { mutex_unlock(&dp->con->lock); + if (dp->con->port_altmode[cur] == alt) + return 0; return -EBUSY; } |