lkml.org 
[lkml]   [2015]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] usb: interface: allow drivers declare number of endpoints they need
On Tue, Dec 01, 2015 at 08:53:57AM +0100, Oliver Neukum wrote:
> On Mon, 2015-11-30 at 17:09 -0800, Greg Kroah-Hartman wrote:
> > > that would loop through endpoints so that drivers do not have to
> > > open-code the loop and we indeed need to fix the drivers that
> > blindly
> > > grab endpoints at fixed offsets and expect them to be there and have
> > > correct types.
> >
> > Yes, that would work for one single type of endpoint, but lots of
> > drivers need/have 2 of the same type/direction, so what would this
> > function do then? Error out? Hm, that might work, and it would
> > reduce
> > a bunch of common code, care to make up a patch for that?
>
> Hi,
>
> in that case let us go the whole way. Give drivers a way to describe
> what they need that covers all possibilities up to exactly telling the
> core what it expects and in which order and numbers.
> Actually that would be better in the interface matching code path.

Trying to describe a static, or variable, number of endpoints, for each
interface and endpoint type, and then add that information to the
usb_device_id structure and common macros, and then touch all users of
those macros, might be a bit too much work to do here... :)

thanks,

greg k-h


\
 
 \ /
  Last update: 2015-12-01 18:21    [W:0.050 / U:1.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site