Re: [RFC/PATCH 1/2] usb: gadget: introduce gadget status tracking

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

 



* Felipe Balbi | 2011-12-19 13:04:05 [+0200]:

>--- a/include/linux/usb/gadget.h
>+++ b/include/linux/usb/gadget.h
>@@ -478,6 +478,53 @@ struct usb_gadget_ops {
> 	int	(*stop)(struct usb_gadget_driver *);
> };
> 
>+enum usb_device_status {
>+	USB_STATUS_IDLE,
>+	USB_STATUS_CONNECTED,
>+	USB_STATUS_RESETTING,
>+
>+	USB_STATUS_DEFAULT,
>+	USB_STATUS_ADDRESSED,
>+	USB_STATUS_UNCONFIGURED,
>+	USB_STATUS_CONFIGURED,
>+
>+	USB_STATUS_SUSPENDING,
>+	USB_STATUS_SUSPENDED,
>+	USB_STATUS_RESUMING,
>+	USB_STATUS_RESUMED,
>+};

Those look simple enough. Could add little doc when each state should be
set. So one knows the difference betweend USB_STATUS_CONNECTED,
USB_STATUS_DEFAULT and USB_STATUS_CONFIGURED.
The flow is 

  idle -> connected -> reset -> addressed -> configured

I guess.

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