On Fri, Feb 28, 2014 at 08:55:43AM +0100, Robert Baldyga wrote: > On 12/17/2013 02:23 AM, Felipe Balbi wrote: > > Start matching endpoints against feature flags, > > this will help us dropping the naming conventions > > currently used by the Gadget Framework. > > > > Signed-off-by: Felipe Balbi <balbi@xxxxxx> > > --- > > drivers/usb/gadget/epautoconf.c | 30 ++++++++++++++++++++++++++++-- > > 1 file changed, 28 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c > > index feaaa7b..b362046 100644 > > --- a/drivers/usb/gadget/epautoconf.c > > +++ b/drivers/usb/gadget/epautoconf.c > > @@ -62,6 +62,33 @@ ep_matches ( > > if (USB_ENDPOINT_XFER_CONTROL == type) > > return 0; > > > > + /* first check feature flags */ > > + if (usb_endpoint_dir_in(desc)) > > + if (!ep->has_dir_in) > > + return 0; > > + > > + if (usb_endpoint_dir_out(desc)) > > + if (!ep->has_dir_out) > > + return 0; > > You should add support for this flags in UDC drivers, or make it usable > for drivers which don't support this. Gadget drivers cannot bind to UDC > if its driver have not set this flags. Currently the only UDC driver > which has support for this is dwc3. It's a big issue. I should have tested with a non-converted UDC, sorry. Just sent a patch which wrapps all that around __uses_feature_flags temporary flag. cheers -- balbi
Attachment:
signature.asc
Description: Digital signature