ChangeSet 1.1608.84.14, 2004/03/09 17:25:56-08:00, david-b@pacbell.net [PATCH] USB: clarify CONFIG_USB_GADGET Marc-Christian Petersen wrote: > > I think the attached patch is needed to stop showing us USB Gadget support if > Support for USB is disabled. No it isn't. But maybe the attached patch would clarify what's really going on: CONFIG_USB is the host side, and CONFIG_USB_GADGET is the peripheral side. drivers/usb/Kconfig | 38 +++++++++++++++++++++----------------- drivers/usb/gadget/Kconfig | 11 ++++++++++- 2 files changed, 31 insertions(+), 18 deletions(-) diff -Nru a/drivers/usb/Kconfig b/drivers/usb/Kconfig --- a/drivers/usb/Kconfig Tue Mar 16 15:03:02 2004 +++ b/drivers/usb/Kconfig Tue Mar 16 15:03:02 2004 @@ -6,32 +6,36 @@ # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface. config USB - tristate "Support for USB" + tristate "Support for Host-side USB" depends on PCI || SA1111 || ARCH_OMAP1510 || ARCH_OMAP1610 ---help--- Universal Serial Bus (USB) is a specification for a serial bus subsystem which offers higher speeds and more features than the traditional PC serial port. The bus supplies power to peripherals and allows for hot swapping. Up to 127 USB peripherals can be - connected to a single USB port in a tree structure. The USB port is - the root of the tree, the peripherals are the leaves and the inner - nodes are special USB devices called hubs. Many newer PC's have USB - ports and newer peripherals such as scanners, keyboards, mice, - modems, and printers support the USB protocol and can be connected - to the PC via those ports. + connected to a single USB host in a tree structure. + + The USB host is the root of the tree, the peripherals are the + leaves and the inner nodes are special USB devices called hubs. + Most PCs now have USB host ports, used to connect peripherals + such as scanners, keyboards, mice, modems, cameras, disks, + flash memory, network links, and printers to the PC. - Say Y here if your computer has a USB port and you want to use USB - devices. You then need to say Y to at least one of "UHCI HCD support" - or "OHCI HCD support" below (the type of interface that the USB hardware - in your computer provides to the operating system) and then choose - from amongst the drivers for USB peripherals. You may want to check - out the information provided in and - especially the links given in . + Say Y here if your computer has a host-side USB port and you want + to use USB devices. You then need to say Y to at least one of the + Host Controller Driver (HCD) options below. Choose a USB 1.1 + controller, such as "UHCI HCD support" or "OHCI HCD support", + and "EHCI HCD (USB 2.0) support" except for older systems that + do not have USB 2.0 support. It doesn't normally hurt to select + them all if you are not certain. - If you have a new USB 2.0 High Speed system, you should also choose - "EHCI HCD (USB 2.0) support" as well as at least one of UHCI or OHCI. + If your system has a device-side USB port, used in the peripheral + side of the USB protocol, see the "USB Gadget" framework instead. - It doesn't normally hurt to select them all if you are not certain. + After choosing your HCD, then select drivers for the USB peripherals + you'll be using. You may want to check out the information provided + in and especially the links given in + . To compile this driver as a module, choose M here: the module will be called usbcore. diff -Nru a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig --- a/drivers/usb/gadget/Kconfig Tue Mar 16 15:03:02 2004 +++ b/drivers/usb/gadget/Kconfig Tue Mar 16 15:03:02 2004 @@ -3,6 +3,15 @@ # (a) a peripheral controller, and # (b) the gadget driver using it. # +# NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !! +# +# - Host systems (like PCs) need CONFIG_USB (with "A" jacks). +# - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks). +# - Some systems have both kinds of of controller. +# +# With help from a special transceiver and a "Mini-AB" jack, systems with +# both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG). +# menu "USB Gadget Support" config USB_GADGET @@ -11,7 +20,7 @@ USB is a master/slave protocol, organized with one master host (such as a PC) controlling up to 127 peripheral devices. The USB hardware is asymmetric, which makes it easier to set up: - you can't connect two "to-the-host" connectors to each other. + you can't connect a "to-the-host" connector to a peripheral. Linux can run in the host, or in the peripheral. In both cases you need a low level bus controller driver, and some software