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

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

 



On Mon, Dec 19, 2011 at 01:04:44PM +0100, Sebastian Andrzej Siewior wrote:
> * 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

idle -> connected -> resetting -> default -> addressed -> configured

-- 
balbi

Attachment: signature.asc
Description: Digital signature


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

  Powered by Linux