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 v2 3/3] usb: chipidea: otg: not wait vbus drop if use role_switch
Date: Thu, 2 Apr 2026 15:14:57 +0800 [thread overview]
Message-ID: <20260402071457.2516021-3-xu.yang_2@nxp.com> (raw)
In-Reply-To: <20260402071457.2516021-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
Acked-by: Peter Chen <peter.chen@kernel.org>
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
Changes in v2:
- add Ack by tag
---
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 def933b73a90..fecc7d7e2f0d 100644
--- a/drivers/usb/chipidea/otg.c
+++ b/drivers/usb/chipidea/otg.c
@@ -190,8 +190,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
next prev parent reply other threads:[~2026-04-02 7:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 7:14 [PATCH v2 1/3] usb: chipidea: core: refactor ci_usb_role_switch_set() Xu Yang
2026-04-02 7:14 ` [PATCH v2 2/3] usb: chipidea: core: allow ci_irq_handler() handle both ID and VBUS change Xu Yang
2026-04-08 5:39 ` Peter Chen (CIX)
2026-04-09 6:11 ` Xu Yang
2026-04-02 7:14 ` Xu Yang [this message]
2026-04-08 5:24 ` [PATCH v2 1/3] usb: chipidea: core: refactor ci_usb_role_switch_set() Peter Chen (CIX)
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=20260402071457.2516021-3-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