Re: [PATCH 2/2] usb: chipidea: otg: not wait vbus drop if use role_switch

From: Peter Chen (CIX)

Date: Wed Mar 25 2026 - 03:15:42 EST


On 26-03-19 17:57:16, Xu Yang wrote:
> 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@xxxxxxxxxxxxxxx
> Reviewed-by: Jun Li <jun.li@xxxxxxx>
> Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx>

Acked-by: Peter Chen <peter.chen@xxxxxxxxxx>

Peter
> ---
> 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
>

--

Best regards,
Peter