Linux-USB Archive on
 help / color / Atom feed
From: Heikki Krogerus <>
To: Greg Kroah-Hartman <>
Cc: Ajay Gupta <>,,
Subject: [PATCH 2/2] usb: typec: ucsi: displayport: Fix for the mode entering routine
Date: Fri,  4 Oct 2019 13:02:19 +0300
Message-ID: <> (raw)
In-Reply-To: <>

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")
Signed-off-by: Heikki Krogerus <>
 drivers/usb/typec/ucsi/displayport.c | 2 ++
 1 file changed, 2 insertions(+)

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) {
+		if (dp->con->port_altmode[cur] == alt)
+			return 0;
 		return -EBUSY;

      parent reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-04 10:02 [PATCH 0/2] UCSI driver fixes Heikki Krogerus
2019-10-04 10:02 ` [PATCH 1/2] usb: typec: ucsi: ccg: Remove run_isr flag Heikki Krogerus
2019-10-04 10:02 ` Heikki Krogerus [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-USB Archive on

Archives are clonable:
	git clone --mirror linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ \
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone