Re: RFC: add ep_autoconfig hook for gadget drivers

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

 




--- On Fri, 6/11/10, Matt Reimer <mattjreimer@xxxxxxxxx> wrote:


> Would something like the attached patch be acceptable?

The approach has been previously discussed,
and is OK, but this patch needs splitting.
See below.

 The basic idea
> is to call an optional ep_autoconfig hook in
> usb_ep_autoconfig(),

Well, add it to the USB peripheral controller
driver, and just call it from ep_autoconfig().

That should be patch #2 of 3 or so.

 and to add configuration
> and interface arguments to usb_ep_autoconfig().


This interface change ought to be patch #1
instead of being mixed up with lower level
changes ... including updates to all of the
function drivers.

That's been the basic idea for a LONG time;
only the PXA hardware seems to care about
config and interface numbers.  That's because
it tries to be "too smart" (and needlessly
complicates the software side of things.  By
far the majority of USB peripheral controllers
address endpoints using only the endpoint number
as seen "on the wire".

I'd like to see that point captured in a
comment; withoutknowing about that PXA oddity,
those parameters look pointless.

Presumably you have a followup patch for PXA?

(I'll think of that as patch #3 of 3.)

Other hardware that can configure endpoints
includes net2280, musb, omap_udc, and more.
it might make sense to pull the chip-specific
heuristics out of autoconfig.c and move it
into the relevant chip drivers, as patch #4...
mostly for net2280, which you might not be able
to test, but which can be tested once such a
patch is available.



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