Re: [PATCH] : Allow embedded developers USB options normally reserved for OTG
Felipe Balbi <[email protected]> Wed, 2 Jan 2008 13:57:50 -0500
| Newsgroups | gmane.linux.usb.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jan 02, 2008 at 10:47:15AM -0800, David Brownell wrote: > On Wednesday 02 January 2008, Robin Getz wrote: > > From: Robin Getz <[email protected]> > > > > Allow embedded developers to turn support for USB Hubs off even if they have a > > full root hub. This saves the overhead (RAM and Flash size). > > ISTR that it won't save very much code though ... the Linux USB > stack structures all its enumeration logic around hubs. > > > > Allow embedded developers the capabilities of the "otg_whitelist.h" - a > > product whitelist, so USB peripherals not listed there will be rejected > > during enumeration. This is the desired operation for many embedded products. > > > > Signed-off-by: Robin Getz <[email protected]> > > This is probably the right thing to do. Correct me if I'm wrong, > but USB-IF recently put out some specs about "embedded hosts" which > basically boil down to saying you can adopt the same functionality > restrictions that used to be OTG-only. Which is why now there are > embedded developers who'd like this option. :) otg whitelist is not a blocker. A device that is not listed on TPL might or might not work. The logic around that should be something like: parse_whitelist() if (!listed) { match_class_with_tpled_devices(); if (match_any) check_power_need(); if (power_need <= 100mA) allow_enumeration(); else deny_enumaration_and_message(); If you check n810, you'll see that even though a usb memory stick is not listed on its TPL, we allow it to enumerate as long as it draws less then 100mA and this is true on something around 95% of usb memory sticks. I'm kinda busy with other tasks right now, but when I finish formating proper patches for current mainline head, I'll release some code adding support for dynamic otg tpl. The problem I see here is that my only "user" is musb driver, currently only available on linux-omap git tree. Maybe it's time to send it to mainline, what do you think Dave? In any case, I'll format such patches when I'm done with twl4030 and isp1301 development, something around 3 ~ 4 weeks from now. Even though, embedded hosts should have the same behavior. Best Regards, Felipe Balbi ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel