lkml.org 
[lkml]   [2011]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv3 3/4] usb: gadget: rename usb_gadget_driver::speed to max_speed
Hi,

On Fri, Aug 19, 2011 at 10:34:29PM -0400, Alan Stern wrote:
> On Sat, 20 Aug 2011, Felipe Balbi wrote:
>
> > On Sat, Aug 20, 2011 at 12:33:01AM +0200, Michal Nazarewicz wrote:
> > > From: Michal Nazarewicz <mina86@mina86.com>
> > >
> > > This commit renames the “speed” field of the usb_gadget_driver
> > > structure to “max_speed”. This is so that to make it more
> > > apparent that the field represents the maximum speed gadget
> > > driver can support.
> > >
> > > This also make the field look more like fields with the same
> > > name in usb_gadget and usb_composite_driver structures. All
> > > of those represent the *maximal* speed given entity supports.
> > >
> > > After this commit, there are the following fields in various
> > > structures:
> > > * usb_gadget::speed - the current connection speed,
> > > * usb_gadget::max_speed - maximal speed UDC supports,
> >
> > this will be handled inside the UDC itself, so why do you need to expose
> > it ?
>
> I wondered about this too. It turns out that sometimes the gadget
> driver really does need to know about the maximum speed supported by
> the UDC hardware and driver.
>
> For example, suppose the gadget driver and the UDC both support high
> speed, but the gadget is currently plugged into a USB-1.1 controller
> and therefore running only at full speed. Then the gadget driver has
> to respond to the Get-Device-Qualifier and Get-Other-Speed-Config
> requests by sending the appropriate descriptors. But if the UDC
> doesn't support high speed operation then the gadget driver has to
> respond to those requests with a STALL.

aa, good point :-)

--
balbi
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2011-08-22 12:45    [from the cache]
©2003-2011 Jasper Spaans