Robert Schwebel wrote:

Unfortunately, the Hynix docs [1] are not very, hmmm, let's say detailed

Right ... but the config descriptor on p. 91 strongly suggests that the only configuration number supported is "2". It also suggests:

  - idProduct and idVendor are settable
  - bDevice{Class,SubClass,Protocol} are settable
  - config descriptor always:
       * config #2
       * interface 0 alt 0
       * ep1out
       * ep2in
       * no other descriptors
  - bInterface{Class,SubClass,Protocol} are settable
  - no other descriptor choices:  no strings etc

So I'd suggest that one of last steps of your UDC driver's code
to bind to a gadget driver be to fetch its device and config
descriptors, grab those class and ID fields, and stuff them into
the chip registers.  Refuse to bind if the device descriptor
lists multiple configs, or the config descriptor doesn't have
those exact descriptors.

Also, that right after USB reset completes, you fake a SET_CONFIG
request so the driver sees at least one of its config change events.

Seems like those will be the only "chapter 9" requests coming from
a driver for that chip, though vendor and class setup() requests
could come (for ep0, both IN and OUT).


The problem is that, for example with g_zero and g_ether it might be
configuration 1, with g_serial it is 2. Ok, the decision could be made
in the gadget driver, but that's surely against the idea of having
almost all controller dependend stuff in the controller driver.

It's for that very reason that the spec is loose in certain areas: coping with quirky hardware. Consider:

  - pxa2xx requires config to be 0, 1, 2 or 3
  - sh7705, sh7727 requires config to be 0 or 1
  - h7202 UDC docs suggest config must be 0 or 2

This is a decent example of why gadget drivers could use the new
gadget_is_xxx() calls.  (Which aren't yet in the 2.4 code, hmm.)

They'd need to use single-config or single-interface modes on
hardware that doesn't support it ... and on h7202 there'd be more
restrictions on what sorts of config descriptors they'd use.

- Dave


[1] See bottom of http://www.hynix.com/eng/products/system_ic/sp/mp02.jsp Section "Fast AMBA Peripherals".





------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to