Re: [PATCH 1/1] usb: chipidea: otg: don't wait vbus drops below BSV when starts host

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 16, 2015 at 01:53:20PM +0800, Li Jun wrote:
> Some HW design may use ID pin state to control vbus for otg port,
> so before host role start, the vbus is already turned on, in this
> case, we do not need wait vbus dropping below BSV.
> 

Yes, only gadget need to consider vbus.

> Signed-off-by: Li Jun <jun.li@xxxxxxxxxxxxx>
> ---
>  drivers/usb/chipidea/otg.c |    9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c
> index ad6c87a..3169c51 100644
> --- a/drivers/usb/chipidea/otg.c
> +++ b/drivers/usb/chipidea/otg.c
> @@ -77,9 +77,12 @@ static void ci_handle_id_switch(struct ci_hdrc *ci)
>  			ci_role(ci)->name, ci->roles[role]->name);
>  
>  		ci_role_stop(ci);
> -		/* wait vbus lower than OTGSC_BSV */
> -		hw_wait_reg(ci, OP_OTGSC, OTGSC_BSV, 0,
> -				CI_VBUS_STABLE_TIMEOUT_MS);
> +
> +		if (role == CI_ROLE_GADGET)
> +			/* wait vbus lower than OTGSC_BSV */
> +			hw_wait_reg(ci, OP_OTGSC, OTGSC_BSV, 0,
> +					CI_VBUS_STABLE_TIMEOUT_MS);
> +
>  		ci_role_start(ci, role);
>  	}
>  }
> -- 
> 1.7.9.5
> 

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux