RE: [RFC PATCH] Revert "usb: chipidea: udc: .pullup is valid only when vbus is there"

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

 



 
> 
> Hello Peter,
> 
> I have seen this call is still returning EOPNOTSUPP which is also
> returned by usb_gadget_connect and usb_gadget_disconnect if the pullup
> function is not available. Should it not handle that case somehow special?
> 
> 
> Is it still a valid condition to bailout if vbus is not active?
> 

Hi Michael,

I did this for possible pullup dp without connection (eg load gadget driver before
vbus connect), it breaks USB spec, see 7.1.7.3 Connect and Disconnect Signaling at USB 2.0 spec.

I don't know what exactly problem you met, but current pullup dp during loading
gadget driver behavior is not suitable for webcam and android use case even vbus
is there.

Peter

>  drivers/usb/chipidea/udc.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
> index b8125aa..6ac8849 100644
> --- a/drivers/usb/chipidea/udc.c
> +++ b/drivers/usb/chipidea/udc.c
> @@ -1531,9 +1531,6 @@ static int ci_udc_pullup(struct usb_gadget *_gadget,
> int is_on)  {
>  	struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget);
> 
> -	if (!ci->vbus_active)
> -		return -EOPNOTSUPP;
> -
>  	if (is_on)
>  		hw_write(ci, OP_USBCMD, USBCMD_RS, USBCMD_RS);
>  	else
> --
> 2.0.1

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