Re: [RFC] Composite gadget: handle EP0 requests sent to endpoints down to functions

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

 



On Friday 08 May 2009, Laurent Pinchart wrote:
> Hi everybody,
> 
> the USB composite gadget framework currently handles EP0 control requests sent 
> to endpoints (bRequestType[4..0] == USB_RECIP_ENDPOINT) down to the current 
> configuration EP0 request handler. Composite drivers thus need to parse the 
> request and call the appropriate function handlers, making functions not self-
> contained.
> 
> It should be possible to maintain an association between functions and 
> endpoints for each configuration, much like we already maintain an association 
> between functions and interfaces.

Ideally something less pricey than an array of function pointers,
indexed by endpoint ...  :)

A per-function bitmap would suffice, and it's not like those calls
are on critical paths.  Though I suppose the code to walk those
bitmaps is likely to take as much space as the array-of-pointers.  ;)


> The composite EP0 request handler could then  
> handle endpoint requests down to the appropriate function, falling back to the 
> configuration-level handler if no endpoint matches.
> 
> Is there anything I have overlooked that would prevent this change from 
> working properly ? If nobody objects, I'll submit a patch.

Sounds OK to me.

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