Re: [RFC] usb: gadget: start to drop endpoint naming conventions

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

 



Hi,

On Thu, Aug 01, 2013 at 11:44:59AM -0400, Alan Stern wrote:
> On Thu, 1 Aug 2013, Felipe Balbi wrote:
> 
> > Hi folks,
> > 
> > as we all know naming conventions are fragile and easy to break. We've
> > had weird endpoint naming conventions for far too long in the gadget
> > framework.
> > 
> > I'm trying to come up with means to get rid of that and, one of the
> > ideas, was to add transfer support flags to our struct usb_ep which gets
> > initialized by the UDC driver. Then ep_matches() can use those flags to
> > check if it should return that endpoint or not.
> 
> The endpoint naming convention currently determines type and direction.  
> It works okay for simple cases but not for more complicated ones.  For 
> example, it can't handle endpoints that support bulk or interrupt but 
> not isochronous.  If you really want to make this general, the way to 
> do it is to have separate bitflags for: control, bulk-in, bulk-out, ...

not bulk-in/bulk-out. I was thinking of having transfer and direction
completely separated. Or would there be cases where endpoint support
bulk in/out but isoc in-only ?

I don't think so...

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