public inbox for imx@lists.linux.dev
 help / color / mirror / Atom feed
From: Xu Yang <xu.yang_2@nxp.com>
To: peter.chen@kernel.org, gregkh@linuxfoundation.org
Cc: jun.li@nxp.com, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org, imx@lists.linux.dev
Subject: [PATCH 2/2] usb: chipidea: otg: not wait vbus drop if use role_switch
Date: Thu, 19 Mar 2026 17:57:16 +0800	[thread overview]
Message-ID: <20260319095716.634568-2-xu.yang_2@nxp.com> (raw)
In-Reply-To: <20260319095716.634568-1-xu.yang_2@nxp.com>

The usb role switch will update ID and VBUS states at the same time, and
vbus will not drop when execute data role swap in Type-C usecase. So lets
not wait vbus drop in usb role switch case too.

Fixes: e1b5d2bed67c ("usb: chipidea: core: handle usb role switch in a common way")
Cc: stable@vger.kernel.org
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 drivers/usb/chipidea/otg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c
index 647e98f4e351..2371789effa0 100644
--- a/drivers/usb/chipidea/otg.c
+++ b/drivers/usb/chipidea/otg.c
@@ -187,8 +187,8 @@ void ci_handle_id_switch(struct ci_hdrc *ci)
 
 		ci_role_stop(ci);
 
-		if (role == CI_ROLE_GADGET &&
-				IS_ERR(ci->platdata->vbus_extcon.edev))
+		if (role == CI_ROLE_GADGET && !ci->role_switch &&
+		    IS_ERR(ci->platdata->vbus_extcon.edev))
 			/*
 			 * Wait vbus lower than OTGSC_BSV before connecting
 			 * to host. If connecting status is from an external
-- 
2.34.1


  reply	other threads:[~2026-03-19  9:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19  9:57 [PATCH 1/2] usb: chipidea: core: fix device mode not work in non-lpm Xu Yang
2026-03-19  9:57 ` Xu Yang [this message]
2026-03-25  7:12   ` [PATCH 2/2] usb: chipidea: otg: not wait vbus drop if use role_switch Peter Chen (CIX)
2026-03-25  7:08 ` [PATCH 1/2] usb: chipidea: core: fix device mode not work in non-lpm Peter Chen (CIX)
2026-03-27 10:54   ` Xu Yang
2026-03-30  7:14     ` Peter Chen (CIX)
2026-03-30  9:13       ` Xu Yang

Reply instructions:

You may reply publicly 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20260319095716.634568-2-xu.yang_2@nxp.com \
    --to=xu.yang_2@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=imx@lists.linux.dev \
    --cc=jun.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox