From: Alan Stern Date: Mon, 2 May 2005 15:25:17 +0000 (-0400) Subject: [PATCH] USB dummy_hcd: Partial OTG emulation X-Git-Tag: v2.6.13-rc1~51^2~8^2~38 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5742b0c95026c817d9c266174ca39a909e8d38ca;p=pandora-kernel.git [PATCH] USB dummy_hcd: Partial OTG emulation Partial OTG support for dummy_hcd, mostly as a framework for further work. It emulates the new OTG flags in the host and peripheral frameworks, if that option is configured. But it's incomplete: - Resetting the peripheral needs to clear the OTG state bits; a second enumeration won't work correctly. - This stops modeling HNP right when roles should switch the first time. It should probably disconnect, then set the usb_bus.is_b_host and usb_gadget.is_a_peripheral flags; then it'd enumerate almost normally, except for the role reversal. Roles could then switch a second time, back to "normal" (with those flags cleared). - SRP should be modeled as "resume from port-unpowered", which is a state that usbcore doesn't yet use. HNP can be triggered by enabling the OTG whitelist and configuring a gadget driver that's not in that list; or by configuring Gadget Zero to identify itself as the HNP test device. Sent-by: David Brownell Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed