linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reorganize USB submenu's
@ 2003-07-31 17:11 Stephen Hemminger
  2003-07-31 17:45 ` Roman Zippel
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Stephen Hemminger @ 2003-07-31 17:11 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-usb-devel, linux-kernel

The USB configuration menu's in 2.6 are a mismash of sub-menu's and comments.
This patch tries to rationalize it so it comes out looking more like the current
filesystems menus.

I think it is easier to navigate, there should be no functional change from this.
Though some elements may appear/disappear differently based on earlier choices.

diff -Nru a/drivers/usb/Kconfig b/drivers/usb/Kconfig
--- a/drivers/usb/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/Kconfig	Thu Jul 31 10:07:11 2003
@@ -44,18 +44,15 @@
 
 source "drivers/usb/class/Kconfig"
 
-source "drivers/usb/storage/Kconfig"
-
 source "drivers/usb/input/Kconfig"
 
+source "drivers/usb/storage/Kconfig"
+
 source "drivers/usb/image/Kconfig"
 
 source "drivers/usb/media/Kconfig"
 
 source "drivers/usb/net/Kconfig"
-
-comment "USB port drivers"
-	depends on USB
 
 config USB_USS720
 	tristate "USS720 parport driver"
diff -Nru a/drivers/usb/class/Kconfig b/drivers/usb/class/Kconfig
--- a/drivers/usb/class/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/class/Kconfig	Thu Jul 31 10:07:11 2003
@@ -1,9 +1,6 @@
 #
 # USB Class driver configuration
 #
-comment "USB Device Class drivers"
-	depends on USB
-
 config USB_AUDIO
 	tristate "USB Audio support"
 	depends on USB && SOUND
diff -Nru a/drivers/usb/core/Kconfig b/drivers/usb/core/Kconfig
--- a/drivers/usb/core/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/core/Kconfig	Thu Jul 31 10:07:11 2003
@@ -9,9 +9,6 @@
 	  of debug messages to the system log. Select this if you are having a
 	  problem with USB support and want to see more of what is going on.
 
-comment "Miscellaneous USB options"
-	depends on USB
-
 config USB_DEVICEFS
 	bool "USB device filesystem"
 	depends on USB
diff -Nru a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
--- a/drivers/usb/gadget/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/gadget/Kconfig	Thu Jul 31 10:07:11 2003
@@ -6,9 +6,12 @@
 # for 2.5 kbuild, drivers/usb/gadget/Kconfig
 # source this at the end of drivers/usb/Kconfig
 #
-menuconfig USB_GADGET
+menu "USB Gadgets"
+	depends on USB!=n
+
+config USB_GADGET
 	tristate "Support for USB Gadgets"
-	depends on EXPERIMENTAL
+	depends on USB && EXPERIMENTAL
 	help
 	   USB is a master/slave protocol, organized with one master
 	   host (such as a PC) controlling up to 127 peripheral devices.
@@ -149,4 +152,4 @@
 
 endchoice
 
-# endmenuconfig
+endmenu
diff -Nru a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
--- a/drivers/usb/host/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/host/Kconfig	Thu Jul 31 10:07:11 2003
@@ -1,8 +1,6 @@
 #
 # USB Host Controller Drivers
 #
-comment "USB Host Controller Drivers"
-	depends on USB
 
 config USB_EHCI_HCD
 	tristate "EHCI HCD (USB 2.0) support"
diff -Nru a/drivers/usb/image/Kconfig b/drivers/usb/image/Kconfig
--- a/drivers/usb/image/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/image/Kconfig	Thu Jul 31 10:07:11 2003
@@ -1,7 +1,7 @@
 #
 # USB Imageing devices configuration
 #
-comment "USB Imaging devices"
+menu "USB Imaging devices"
 	depends on USB
 
 config USB_MDC800
@@ -53,3 +53,4 @@
 	  The scanner will be accessible as a SCSI device.
 	  This can be compiled as a module, called hpusbscsi.
 
+endmenu
diff -Nru a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig
--- a/drivers/usb/input/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/input/Kconfig	Thu Jul 31 10:07:11 2003
@@ -1,8 +1,10 @@
 #
 # USB Input driver configuration
 #
-comment "USB Human Interface Devices (HID)"
-	depends on USB
+menu "USB Input devices"
+
+comment "Input core support is needed for USB HID input layer or HIDBP support"
+	depends on USB && INPUT=n
 
 config USB_HID
 	tristate "USB Human Interface Device (full HID) support"
@@ -90,12 +92,10 @@
 
 	  If unsure, say Y.
 
-menu "USB HID Boot Protocol drivers"
-	depends on USB!=n && USB_HID!=y
 
 config USB_KBD
 	tristate "USB HIDBP Keyboard (simple Boot) support"
-	depends on USB && INPUT
+	depends on USB && INPUT && USB_HIDINPUT=n
 	---help---
 	  Say Y here only if you are absolutely sure that you don't want
 	  to use the generic HID driver for your USB keyboard and prefer
@@ -113,7 +113,7 @@
 
 config USB_MOUSE
 	tristate "USB HIDBP Mouse (simple Boot) support"
-	depends on USB && INPUT
+	depends on USB && INPUT && USB_HIDINPUT=n
 	---help---
 	  Say Y here only if you are absolutely sure that you don't want
 	  to use the generic HID driver for your USB keyboard and prefer
@@ -129,8 +129,6 @@
 
 	  If even remotely unsure, say N.
 
-endmenu
-
 config USB_AIPTEK
 	tristate "Aiptek 6000U/8000U tablet support"
 	depends on USB && INPUT
@@ -205,3 +203,4 @@
 	  The module will be called xpad.  If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+endmenu
diff -Nru a/drivers/usb/media/Kconfig b/drivers/usb/media/Kconfig
--- a/drivers/usb/media/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/media/Kconfig	Thu Jul 31 10:07:11 2003
@@ -1,8 +1,7 @@
 #
 # USB Multimedia device configuration
 #
-comment "USB Multimedia devices"
-	depends on USB
+menu "USB Multimedia devices"
 
 config USB_DABUSB
 	tristate "DABUSB driver"
@@ -194,3 +193,4 @@
 	  The module will be called stv680. If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+endmenu
diff -Nru a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
--- a/drivers/usb/misc/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/misc/Kconfig	Thu Jul 31 10:07:11 2003
@@ -1,8 +1,8 @@
 #
 # USB Miscellaneous driver configuration
 #
-comment "USB Miscellaneous drivers"
-	depends on USB
+menu "USB Miscellaneous drivers"
+	depends on USB!=n
 
 config USB_EMI26
 	tristate "EMI 2|6 USB Audio interface support"
@@ -117,4 +117,4 @@
 
 	  See <http://www.linux-usb.org/usbtest> for more information,
 	  including sample test device firmware and "how to use it".
-
+endmenu
diff -Nru a/drivers/usb/net/Kconfig b/drivers/usb/net/Kconfig
--- a/drivers/usb/net/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/net/Kconfig	Thu Jul 31 10:07:11 2003
@@ -1,8 +1,7 @@
 #
 # USB Network devices configuration
 #
-comment "USB Network adaptors"
-	depends on USB
+menu "USB Network devices"
 
 comment "Networking support is needed for USB Networking device support"
 	depends on USB && !NET
@@ -266,3 +265,4 @@
 	  IEEE 802 "local assignment" bit is set in the address, a "usbX"
 	  name is used instead.
 
+endmenu
diff -Nru a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
--- a/drivers/usb/serial/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/serial/Kconfig	Thu Jul 31 10:07:11 2003
@@ -2,7 +2,7 @@
 # USB Serial device configuration
 #
 
-menu "USB Serial Converter support"
+menu "USB Serial drivers"
 	depends on USB!=n
 
 config USB_SERIAL
diff -Nru a/drivers/usb/storage/Kconfig b/drivers/usb/storage/Kconfig
--- a/drivers/usb/storage/Kconfig	Thu Jul 31 10:07:11 2003
+++ b/drivers/usb/storage/Kconfig	Thu Jul 31 10:07:11 2003
@@ -1,6 +1,8 @@
 #
 # USB Storage driver configuration
 #
+menu "USB Mass Storage"
+
 comment "SCSI support is needed for USB Storage"
 	depends on USB && SCSI=n
 
@@ -91,4 +93,4 @@
 	help
 	  Say Y here to include additional code to support the Lexar Jumpshot
 	  USB CompactFlash reader.
-
+endmenu



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] reorganize USB submenu's
  2003-07-31 17:11 [PATCH] reorganize USB submenu's Stephen Hemminger
@ 2003-07-31 17:45 ` Roman Zippel
  2003-07-31 17:51 ` Greg KH
       [not found] ` <23979.216.12.38.216.1059672599.squirrel@www.ghz.cc>
  2 siblings, 0 replies; 10+ messages in thread
From: Roman Zippel @ 2003-07-31 17:45 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Greg KH, linux-usb-devel, linux-kernel



On Thu, 31 Jul 2003, Stephen Hemminger wrote:

> diff -Nru a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> --- a/drivers/usb/gadget/Kconfig	Thu Jul 31 10:07:11 2003
> +++ b/drivers/usb/gadget/Kconfig	Thu Jul 31 10:07:11 2003
> @@ -6,9 +6,12 @@
>  # for 2.5 kbuild, drivers/usb/gadget/Kconfig
>  # source this at the end of drivers/usb/Kconfig
>  #
> -menuconfig USB_GADGET
> +menu "USB Gadgets"
> +	depends on USB!=n
> +
> +config USB_GADGET
>  	tristate "Support for USB Gadgets"
> -	depends on EXPERIMENTAL
> +	depends on USB && EXPERIMENTAL
>  	help
>  	   USB is a master/slave protocol, organized with one master
>  	   host (such as a PC) controlling up to 127 peripheral devices.

Why do you remove the menuconfig?
USB_GADGET is independent of USB.

> diff -Nru a/drivers/usb/input/Kconfig b/drivers/usb/input/Kconfig
> --- a/drivers/usb/input/Kconfig	Thu Jul 31 10:07:11 2003
> +++ b/drivers/usb/input/Kconfig	Thu Jul 31 10:07:11 2003
> @@ -1,8 +1,10 @@
>  #
>  # USB Input driver configuration
>  #
> -comment "USB Human Interface Devices (HID)"
> -	depends on USB
> +menu "USB Input devices"
> +
> +comment "Input core support is needed for USB HID input layer or HIDBP support"
> +	depends on USB && INPUT=n
>  
>  config USB_HID
>  	tristate "USB Human Interface Device (full HID) support"

The menu needs to depend on USB otherwise you'll have empty menus if USB 
is disabled (the same is true for storage/media/net).

bye, Roman


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] reorganize USB submenu's
  2003-07-31 17:11 [PATCH] reorganize USB submenu's Stephen Hemminger
  2003-07-31 17:45 ` Roman Zippel
@ 2003-07-31 17:51 ` Greg KH
       [not found] ` <23979.216.12.38.216.1059672599.squirrel@www.ghz.cc>
  2 siblings, 0 replies; 10+ messages in thread
From: Greg KH @ 2003-07-31 17:51 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: linux-usb-devel, linux-kernel

On Thu, Jul 31, 2003 at 10:11:44AM -0700, Stephen Hemminger wrote:
> The USB configuration menu's in 2.6 are a mismash of sub-menu's and comments.
> This patch tries to rationalize it so it comes out looking more like the current
> filesystems menus.
> 
> I think it is easier to navigate, there should be no functional change from this.
> Though some elements may appear/disappear differently based on earlier choices.
> 
> diff -Nru a/drivers/usb/Kconfig b/drivers/usb/Kconfig
> --- a/drivers/usb/Kconfig	Thu Jul 31 10:07:11 2003
> +++ b/drivers/usb/Kconfig	Thu Jul 31 10:07:11 2003
> @@ -44,18 +44,15 @@
>  
>  source "drivers/usb/class/Kconfig"
>  
> -source "drivers/usb/storage/Kconfig"
> -
>  source "drivers/usb/input/Kconfig"
>  
> +source "drivers/usb/storage/Kconfig"
> +
>  source "drivers/usb/image/Kconfig"
>  
>  source "drivers/usb/media/Kconfig"
>  
>  source "drivers/usb/net/Kconfig"
> -
> -comment "USB port drivers"
> -	depends on USB
>  
>  config USB_USS720
>  	tristate "USS720 parport driver"
> diff -Nru a/drivers/usb/class/Kconfig b/drivers/usb/class/Kconfig
> --- a/drivers/usb/class/Kconfig	Thu Jul 31 10:07:11 2003
> +++ b/drivers/usb/class/Kconfig	Thu Jul 31 10:07:11 2003
> @@ -1,9 +1,6 @@
>  #
>  # USB Class driver configuration
>  #
> -comment "USB Device Class drivers"
> -	depends on USB
> -

Why remove these seperators?  They seem to be useful, as they were added
to help remove the clutter we have.

> -menuconfig USB_GADGET
> +menu "USB Gadgets"
> +	depends on USB!=n
> +
> +config USB_GADGET
>  	tristate "Support for USB Gadgets"
> -	depends on EXPERIMENTAL
> +	depends on USB && EXPERIMENTAL

Nope, USB_GADGET does not depend on USB at all.

> -menu "USB HID Boot Protocol drivers"
> -	depends on USB!=n && USB_HID!=y
>  
>  config USB_KBD
>  	tristate "USB HIDBP Keyboard (simple Boot) support"
> -	depends on USB && INPUT
> +	depends on USB && INPUT && USB_HIDINPUT=n

Nope, I can build USB_KBD and USB_HIDINPUT as modules at the same time.
This breaks that ability.


>  config USB_MOUSE
>  	tristate "USB HIDBP Mouse (simple Boot) support"
> -	depends on USB && INPUT
> +	depends on USB && INPUT && USB_HIDINPUT=n

Same thing here.

> -comment "USB Multimedia devices"
> -	depends on USB
> +menu "USB Multimedia devices"

I don't really see a nest of menu options as a better option from the
separators we have today.  But that's just my opinion :)

> -comment "USB Miscellaneous drivers"
> -	depends on USB
> +menu "USB Miscellaneous drivers"
> +	depends on USB!=n

Why "USB!=n"  What's wrong with just "depends on USB"?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] reorganize USB submenu's
       [not found] ` <23979.216.12.38.216.1059672599.squirrel@www.ghz.cc>
@ 2003-07-31 19:50   ` Stephen Hemminger
  2003-07-31 20:16     ` Greg KH
  2003-07-31 21:07     ` [linux-usb-devel] " David Brownell
  0 siblings, 2 replies; 10+ messages in thread
From: Stephen Hemminger @ 2003-07-31 19:50 UTC (permalink / raw)
  To: Charles Lepple, Greg KH; +Cc: linux-usb-devel, linux-kernel

Okay, here is a second try.
	- Devices in submenus
	- Gadget sub-menu fixed now independent of USB
	  and has correct exposing.
	- Gadget was using choice incorrectly, there were cases were if
	  gadget was not a module it would only let you choose one menu item.
	- USB serial debugging can be enabled if module

This is against 2.6.0-test2

diff -urN -X dontdiff linux-2.5/drivers/usb/gadget/Kconfig usb/drivers/usb/gadget/Kconfig
--- linux-2.5/drivers/usb/gadget/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/gadget/Kconfig	2003-07-31 12:45:04.000000000 -0700
@@ -35,9 +35,6 @@
 #
 # USB Peripheral Controller Support
 #
-choice
-	prompt "USB Peripheral Controller Support"
-	depends on USB_GADGET
 
 config USB_NET2280
 	tristate "NetChip 2280 USB Peripheral Controller"
@@ -54,21 +51,23 @@
 	   dynamically linked module called "net2280" and force all
 	   gadget drivers to also be dynamically linked.
 
-endchoice
 
 #
 # USB Gadget Drivers
 #
-choice
-	prompt "USB Gadget Drivers"
+menu "USB Gadget Drivers"
 	depends on USB_GADGET
-	default USB_ETH
 
-# FIXME want a cleaner dependency/config approach for drivers.
+config USB_GADGET_CONTROL
+	bool
+	default y if USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA250 || USB_SA1100)
+
+comment "USB Gadgets need peripheral controller"
+	depends on !USB_GADGET_CONTROL
 
 config USB_ZERO
 	tristate "Gadget Zero (DEVELOPMENT)"
-	depends on USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA250 || USB_SA1100)
+	depends on USB_GADGET_CONTROL
 	help
 	  Gadget Zero is a two-configuration device.  It either sinks and
 	  sources bulk data; or it loops back a configurable number of
@@ -110,7 +109,7 @@
 
 config USB_ETH
 	tristate "Ethernet Gadget"
-	depends on USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA250 || USB_SA1100)
+	depends on USB_GADGET_CONTROL
 	help
 	  This driver implements the "Communication Device Class" (CDC)
 	  Ethernet Control Model.  That protocol is often avoided with pure
@@ -147,6 +146,6 @@
 	depends on USB_ETH && USB_SA1100
 	default y
 
-endchoice
+endmenu
 
 # endmenuconfig
diff -urN -X dontdiff linux-2.5/drivers/usb/image/Kconfig usb/drivers/usb/image/Kconfig
--- linux-2.5/drivers/usb/image/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/image/Kconfig	2003-07-31 12:10:51.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Imageing devices configuration
 #
-comment "USB Imaging devices"
+menu "USB Imaging devices"
 	depends on USB
 
 config USB_MDC800
@@ -53,3 +53,4 @@
 	  The scanner will be accessible as a SCSI device.
 	  This can be compiled as a module, called hpusbscsi.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/input/Kconfig usb/drivers/usb/input/Kconfig
--- linux-2.5/drivers/usb/input/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/input/Kconfig	2003-07-31 12:36:02.000000000 -0700
@@ -1,7 +1,8 @@
 #
 # USB Input driver configuration
 #
-comment "USB Human Interface Devices (HID)"
+
+menu "USB Input devices"
 	depends on USB
 
 config USB_HID
@@ -90,12 +91,9 @@
 
 	  If unsure, say Y.
 
-menu "USB HID Boot Protocol drivers"
-	depends on USB!=n && USB_HID!=y
-
 config USB_KBD
 	tristate "USB HIDBP Keyboard (simple Boot) support"
-	depends on USB && INPUT
+	depends on USB && INPUT && USB_HID!=y
 	---help---
 	  Say Y here only if you are absolutely sure that you don't want
 	  to use the generic HID driver for your USB keyboard and prefer
@@ -113,7 +111,7 @@
 
 config USB_MOUSE
 	tristate "USB HIDBP Mouse (simple Boot) support"
-	depends on USB && INPUT
+	depends on USB && INPUT && USB_HID!=y
 	---help---
 	  Say Y here only if you are absolutely sure that you don't want
 	  to use the generic HID driver for your USB keyboard and prefer
@@ -129,8 +127,6 @@
 
 	  If even remotely unsure, say N.
 
-endmenu
-
 config USB_AIPTEK
 	tristate "Aiptek 6000U/8000U tablet support"
 	depends on USB && INPUT
@@ -205,3 +201,4 @@
 	  The module will be called xpad.  If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/media/Kconfig usb/drivers/usb/media/Kconfig
--- linux-2.5/drivers/usb/media/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/media/Kconfig	2003-07-31 11:48:11.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Multimedia device configuration
 #
-comment "USB Multimedia devices"
+menu "USB Multimedia devices"
 	depends on USB
 
 config USB_DABUSB
@@ -194,3 +194,4 @@
 	  The module will be called stv680. If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/misc/Kconfig usb/drivers/usb/misc/Kconfig
--- linux-2.5/drivers/usb/misc/Kconfig	2003-06-05 10:04:41.000000000 -0700
+++ usb/drivers/usb/misc/Kconfig	2003-07-31 11:48:39.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Miscellaneous driver configuration
 #
-comment "USB Miscellaneous drivers"
+menu "USB Miscellaneous drivers"
 	depends on USB
 
 config USB_EMI26
@@ -117,4 +117,4 @@
 
 	  See <http://www.linux-usb.org/usbtest> for more information,
 	  including sample test device firmware and "how to use it".
-
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/net/Kconfig usb/drivers/usb/net/Kconfig
--- linux-2.5/drivers/usb/net/Kconfig	2003-06-20 09:49:37.000000000 -0700
+++ usb/drivers/usb/net/Kconfig	2003-07-31 12:45:59.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Network devices configuration
 #
-comment "USB Network adaptors"
+menu "USB Network adaptors"
 	depends on USB
 
 comment "Networking support is needed for USB Networking device support"
@@ -266,3 +266,4 @@
 	  IEEE 802 "local assignment" bit is set in the address, a "usbX"
 	  name is used instead.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/serial/Kconfig usb/drivers/usb/serial/Kconfig
--- linux-2.5/drivers/usb/serial/Kconfig	2003-06-05 10:04:41.000000000 -0700
+++ usb/drivers/usb/serial/Kconfig	2003-07-31 12:38:57.000000000 -0700
@@ -2,10 +2,7 @@
 # USB Serial device configuration
 #
 
-menu "USB Serial Converter support"
-	depends on USB!=n
-
-config USB_SERIAL
+menuconfig  USB_SERIAL
 	tristate "USB Serial Converter support"
 	depends on USB
 	---help---
@@ -24,7 +21,7 @@
 
 config USB_SERIAL_DEBUG
 	bool "USB Serial Converter verbose debug"
-	depends on USB_SERIAL=y
+	depends on USB_SERIAL
 	help
 	  Say Y here if you want verbose debug messages from the USB Serial
 	  Drivers sent to the kernel debug log.
@@ -438,8 +435,7 @@
 
 config USB_EZUSB
 	bool
-	depends on USB_SERIAL_KEYSPAN_PDA || USB_SERIAL_XIRCOM || USB_SERIAL_KEYSPAN || USB_SERIAL_WHITEHEAT
+	depends on USB_SERIAL && (USB_SERIAL_KEYSPAN_PDA || USB_SERIAL_XIRCOM || USB_SERIAL_KEYSPAN || USB_SERIAL_WHITEHEAT)
 	default y
 
-endmenu
-
+# endmenuconfig
diff -urN -X dontdiff linux-2.5/drivers/usb/storage/Kconfig usb/drivers/usb/storage/Kconfig
--- linux-2.5/drivers/usb/storage/Kconfig	2003-06-05 10:04:41.000000000 -0700
+++ usb/drivers/usb/storage/Kconfig	2003-07-31 12:42:01.000000000 -0700
@@ -1,10 +1,11 @@
 #
 # USB Storage driver configuration
 #
+
 comment "SCSI support is needed for USB Storage"
 	depends on USB && SCSI=n
 
-config USB_STORAGE
+menuconfig USB_STORAGE
 	tristate "USB Mass Storage support"
 	depends on USB && SCSI
 	---help---
@@ -92,3 +93,4 @@
 	  Say Y here to include additional code to support the Lexar Jumpshot
 	  USB CompactFlash reader.
 
+# endmenuconfig

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] reorganize USB submenu's
  2003-07-31 19:50   ` Stephen Hemminger
@ 2003-07-31 20:16     ` Greg KH
  2003-07-31 21:14       ` Stephen Hemminger
  2003-07-31 22:57       ` Stephen Hemminger
  2003-07-31 21:07     ` [linux-usb-devel] " David Brownell
  1 sibling, 2 replies; 10+ messages in thread
From: Greg KH @ 2003-07-31 20:16 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Charles Lepple, linux-usb-devel, linux-kernel

On Thu, Jul 31, 2003 at 12:50:32PM -0700, Stephen Hemminger wrote:
> 	- USB serial debugging can be enabled if module

It can be enabled _only_ if CONFIG_USB_SERIAL=y.  If CONFIG_USB_SERIAL=m
then the option should not show up, as it becomes a module paramater
option.  The original code was correct.

> -menu "USB HID Boot Protocol drivers"
> -	depends on USB!=n && USB_HID!=y
> -

No, we _really_ want these tucked away where it is hard to find them.
Almost noone should enable these, but if you really want them, you still
can.  Putting them into their own sub-menu was deemed the best for this.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [linux-usb-devel] Re: [PATCH] reorganize USB submenu's
  2003-07-31 19:50   ` Stephen Hemminger
  2003-07-31 20:16     ` Greg KH
@ 2003-07-31 21:07     ` David Brownell
  2003-07-31 21:18       ` Stephen Hemminger
  1 sibling, 1 reply; 10+ messages in thread
From: David Brownell @ 2003-07-31 21:07 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Charles Lepple, Greg KH, linux-usb-devel, linux-kernel

Stephen Hemminger wrote:
> --- linux-2.5/drivers/usb/gadget/Kconfig	2003-06-05 10:04:40.000000000 -0700
> +++ usb/drivers/usb/gadget/Kconfig	2003-07-31 12:45:04.000000000 -0700
> @@ -35,9 +35,6 @@
>  #
>  # USB Peripheral Controller Support
>  #
> -choice
> -	prompt "USB Peripheral Controller Support"
> -	depends on USB_GADGET
>  
>  config USB_NET2280
>  	tristate "NetChip 2280 USB Peripheral Controller"
> @@ -54,21 +51,23 @@
>  	   dynamically linked module called "net2280" and force all
>  	   gadget drivers to also be dynamically linked.
>  
> -endchoice

Why do you want to remove that choice menu?  By doing that,
you've enabled illegal configurations.

In this case:  no more than one controller driver may be
linked, since USB devices have exactly one upstream link.
By detecting this at configuration time, the current menus
prevent a link-time error.

This choice could be improved (at this point I'd likely
desupport "dummy plus real controller as modules", and
the more troublesome cases it carries along with it), but
that's not how I'd do it.



> @@ -110,7 +109,7 @@
>  
>  config USB_ETH
>  	tristate "Ethernet Gadget"
> -	depends on USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA250 || USB_SA1100)
> +	depends on USB_GADGET_CONTROL

This approach allows illegal configurations too.  The config-time
dependencies prevent compile-time errors, by only enabling the
configurations that are known to compile and work.

When an "au1x00_udc" controller is added, each gadget driver will
need to be modified to know about its endpoints and config quirks,
then tested.  (And some gadget drivers won't be able to do that:
maybe they need lots of endpoints, or rely on config change events
that particular hardware disallows.)  By allowing arbitrary driver
stacking, you'd be causing at least compile errors.

Likewise, when an "audio" gadget driver is added, it'll need testing
on each controller.  And since SA1100 can never support iso transfers,
that configuration shouldn't even be allowed.


Both your proposed changes share a common feature:  reducing the degree
to which illegal configurations are prevented.  Is that intentional?

- Dave




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] reorganize USB submenu's
  2003-07-31 20:16     ` Greg KH
@ 2003-07-31 21:14       ` Stephen Hemminger
  2003-07-31 22:57       ` Stephen Hemminger
  1 sibling, 0 replies; 10+ messages in thread
From: Stephen Hemminger @ 2003-07-31 21:14 UTC (permalink / raw)
  To: Greg KH; +Cc: Charles Lepple, linux-usb-devel, linux-kernel

On Thu, 31 Jul 2003 13:16:59 -0700
Greg KH <greg@kroah.com> wrote:

> then the option should not show up, as it becomes a module paramater

How is this (3rd try)...

diff -urN -X dontdiff linux-2.5/drivers/usb/gadget/Kconfig usb/drivers/usb/gadget/Kconfig
--- linux-2.5/drivers/usb/gadget/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/gadget/Kconfig	2003-07-31 12:45:04.000000000 -0700
@@ -35,9 +35,6 @@
 #
 # USB Peripheral Controller Support
 #
-choice
-	prompt "USB Peripheral Controller Support"
-	depends on USB_GADGET
 
 config USB_NET2280
 	tristate "NetChip 2280 USB Peripheral Controller"
@@ -54,21 +51,23 @@
 	   dynamically linked module called "net2280" and force all
 	   gadget drivers to also be dynamically linked.
 
-endchoice
 
 #
 # USB Gadget Drivers
 #
-choice
-	prompt "USB Gadget Drivers"
+menu "USB Gadget Drivers"
 	depends on USB_GADGET
-	default USB_ETH
 
-# FIXME want a cleaner dependency/config approach for drivers.
+config USB_GADGET_CONTROL
+	bool
+	default y if USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA250 || USB_SA1100)
+
+comment "USB Gadgets need peripheral controller"
+	depends on !USB_GADGET_CONTROL
 
 config USB_ZERO
 	tristate "Gadget Zero (DEVELOPMENT)"
-	depends on USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA250 || USB_SA1100)
+	depends on USB_GADGET_CONTROL
 	help
 	  Gadget Zero is a two-configuration device.  It either sinks and
 	  sources bulk data; or it loops back a configurable number of
@@ -110,7 +109,7 @@
 
 config USB_ETH
 	tristate "Ethernet Gadget"
-	depends on USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA250 || USB_SA1100)
+	depends on USB_GADGET_CONTROL
 	help
 	  This driver implements the "Communication Device Class" (CDC)
 	  Ethernet Control Model.  That protocol is often avoided with pure
@@ -147,6 +146,6 @@
 	depends on USB_ETH && USB_SA1100
 	default y
 
-endchoice
+endmenu
 
 # endmenuconfig
diff -urN -X dontdiff linux-2.5/drivers/usb/image/Kconfig usb/drivers/usb/image/Kconfig
--- linux-2.5/drivers/usb/image/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/image/Kconfig	2003-07-31 12:10:51.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Imageing devices configuration
 #
-comment "USB Imaging devices"
+menu "USB Imaging devices"
 	depends on USB
 
 config USB_MDC800
@@ -53,3 +53,4 @@
 	  The scanner will be accessible as a SCSI device.
 	  This can be compiled as a module, called hpusbscsi.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/input/Kconfig usb/drivers/usb/input/Kconfig
--- linux-2.5/drivers/usb/input/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/input/Kconfig	2003-07-31 14:12:24.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Input driver configuration
 #
-comment "USB Human Interface Devices (HID)"
+menu "USB Input devices"
 	depends on USB
 
 config USB_HID
@@ -205,3 +205,4 @@
 	  The module will be called xpad.  If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/media/Kconfig usb/drivers/usb/media/Kconfig
--- linux-2.5/drivers/usb/media/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/media/Kconfig	2003-07-31 11:48:11.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Multimedia device configuration
 #
-comment "USB Multimedia devices"
+menu "USB Multimedia devices"
 	depends on USB
 
 config USB_DABUSB
@@ -194,3 +194,4 @@
 	  The module will be called stv680. If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/misc/Kconfig usb/drivers/usb/misc/Kconfig
--- linux-2.5/drivers/usb/misc/Kconfig	2003-06-05 10:04:41.000000000 -0700
+++ usb/drivers/usb/misc/Kconfig	2003-07-31 11:48:39.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Miscellaneous driver configuration
 #
-comment "USB Miscellaneous drivers"
+menu "USB Miscellaneous drivers"
 	depends on USB
 
 config USB_EMI26
@@ -117,4 +117,4 @@
 
 	  See <http://www.linux-usb.org/usbtest> for more information,
 	  including sample test device firmware and "how to use it".
-
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/net/Kconfig usb/drivers/usb/net/Kconfig
--- linux-2.5/drivers/usb/net/Kconfig	2003-06-20 09:49:37.000000000 -0700
+++ usb/drivers/usb/net/Kconfig	2003-07-31 12:45:59.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Network devices configuration
 #
-comment "USB Network adaptors"
+menu "USB Network adaptors"
 	depends on USB
 
 comment "Networking support is needed for USB Networking device support"
@@ -266,3 +266,4 @@
 	  IEEE 802 "local assignment" bit is set in the address, a "usbX"
 	  name is used instead.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/serial/Kconfig usb/drivers/usb/serial/Kconfig
--- linux-2.5/drivers/usb/serial/Kconfig	2003-06-05 10:04:41.000000000 -0700
+++ usb/drivers/usb/serial/Kconfig	2003-07-31 14:05:26.000000000 -0700
@@ -2,10 +2,7 @@
 # USB Serial device configuration
 #
 
-menu "USB Serial Converter support"
-	depends on USB!=n
-
-config USB_SERIAL
+menuconfig  USB_SERIAL
 	tristate "USB Serial Converter support"
 	depends on USB
 	---help---
@@ -438,8 +435,5 @@
 
 config USB_EZUSB
 	bool
-	depends on USB_SERIAL_KEYSPAN_PDA || USB_SERIAL_XIRCOM || USB_SERIAL_KEYSPAN || USB_SERIAL_WHITEHEAT
+	depends on USB_SERIAL && (USB_SERIAL_KEYSPAN_PDA || USB_SERIAL_XIRCOM || USB_SERIAL_KEYSPAN || USB_SERIAL_WHITEHEAT)
 	default y
-
-endmenu
-
diff -urN -X dontdiff linux-2.5/drivers/usb/storage/Kconfig usb/drivers/usb/storage/Kconfig
--- linux-2.5/drivers/usb/storage/Kconfig	2003-06-05 10:04:41.000000000 -0700
+++ usb/drivers/usb/storage/Kconfig	2003-07-31 14:05:18.000000000 -0700
@@ -1,10 +1,11 @@
 #
 # USB Storage driver configuration
 #
+
 comment "SCSI support is needed for USB Storage"
 	depends on USB && SCSI=n
 
-config USB_STORAGE
+menuconfig USB_STORAGE
 	tristate "USB Mass Storage support"
 	depends on USB && SCSI
 	---help---

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [linux-usb-devel] Re: [PATCH] reorganize USB submenu's
  2003-07-31 21:07     ` [linux-usb-devel] " David Brownell
@ 2003-07-31 21:18       ` Stephen Hemminger
  2003-07-31 22:00         ` David Brownell
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Hemminger @ 2003-07-31 21:18 UTC (permalink / raw)
  To: David Brownell; +Cc: Charles Lepple, Greg KH, linux-usb-devel, linux-kernel

On Thu, 31 Jul 2003 14:07:35 -0700
David Brownell <david-b@pacbell.net> wrote:

> Stephen Hemminger wrote:
> > --- linux-2.5/drivers/usb/gadget/Kconfig	2003-06-05 10:04:40.000000000 -0700
> > +++ usb/drivers/usb/gadget/Kconfig	2003-07-31 12:45:04.000000000 -0700
> > @@ -35,9 +35,6 @@
> >  #
> >  # USB Peripheral Controller Support
> >  #
> > -choice
> > -	prompt "USB Peripheral Controller Support"
> > -	depends on USB_GADGET
> >  
> >  config USB_NET2280
> >  	tristate "NetChip 2280 USB Peripheral Controller"
> > @@ -54,21 +51,23 @@
> >  	   dynamically linked module called "net2280" and force all
> >  	   gadget drivers to also be dynamically linked.
> >  
> > -endchoice
> 
> Why do you want to remove that choice menu?  By doing that,
> you've enabled illegal configurations.

Because the choice appears to be only useful for radio box type
selections.  Try the following with the linux-2.5 version of xconfig.

	USB_GADGET=y
	USB Peripheral Controller support = y (not module)
	USB Gadgets = y (not module)

The Netchip becomes a radio button.

And Gadget Zero and Gadget Ethernet become select one radio buttons.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [linux-usb-devel] Re: [PATCH] reorganize USB submenu's
  2003-07-31 21:18       ` Stephen Hemminger
@ 2003-07-31 22:00         ` David Brownell
  0 siblings, 0 replies; 10+ messages in thread
From: David Brownell @ 2003-07-31 22:00 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Charles Lepple, Greg KH, linux-usb-devel, linux-kernel

Stephen Hemminger wrote:

>>Why do you want to remove that choice menu?  By doing that,
>>you've enabled illegal configurations.
> 
> 
> Because the choice appears to be only useful for radio box type
> selections.  Try the following with the linux-2.5 version of xconfig.
> 
> 	USB_GADGET=y
> 	USB Peripheral Controller support = y (not module)
> 	USB Gadgets = y (not module)
> 
> The Netchip becomes a radio button.

As should be.  If some hardware supports net2280 and another
controller (maybe PCI, maybe not), only one of them can provide
the device's single upstream port -- so choose only one.


> And Gadget Zero and Gadget Ethernet become select one radio buttons.

As should be.  You can't use them at the same time, only one
of them can "own" the controller driver -- so choose only one.

- Dave




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] reorganize USB submenu's
  2003-07-31 20:16     ` Greg KH
  2003-07-31 21:14       ` Stephen Hemminger
@ 2003-07-31 22:57       ` Stephen Hemminger
  1 sibling, 0 replies; 10+ messages in thread
From: Stephen Hemminger @ 2003-07-31 22:57 UTC (permalink / raw)
  To: Greg KH; +Cc: Charles Lepple, linux-usb-devel, linux-kernel

Same again without the USB_GADGET changes.  That menu is confusing but correct
as it stands.

diff -urN -X dontdiff linux-2.5/drivers/usb/image/Kconfig usb/drivers/usb/image/Kconfig
--- linux-2.5/drivers/usb/image/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/image/Kconfig	2003-07-31 12:10:51.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Imageing devices configuration
 #
-comment "USB Imaging devices"
+menu "USB Imaging devices"
 	depends on USB
 
 config USB_MDC800
@@ -53,3 +53,4 @@
 	  The scanner will be accessible as a SCSI device.
 	  This can be compiled as a module, called hpusbscsi.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/input/Kconfig usb/drivers/usb/input/Kconfig
--- linux-2.5/drivers/usb/input/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/input/Kconfig	2003-07-31 14:12:24.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Input driver configuration
 #
-comment "USB Human Interface Devices (HID)"
+menu "USB Input devices"
 	depends on USB
 
 config USB_HID
@@ -205,3 +205,4 @@
 	  The module will be called xpad.  If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/media/Kconfig usb/drivers/usb/media/Kconfig
--- linux-2.5/drivers/usb/media/Kconfig	2003-06-05 10:04:40.000000000 -0700
+++ usb/drivers/usb/media/Kconfig	2003-07-31 11:48:11.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Multimedia device configuration
 #
-comment "USB Multimedia devices"
+menu "USB Multimedia devices"
 	depends on USB
 
 config USB_DABUSB
@@ -194,3 +194,4 @@
 	  The module will be called stv680. If you want to compile it as a
 	  module, say M here and read <file:Documentation/modules.txt>.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/misc/Kconfig usb/drivers/usb/misc/Kconfig
--- linux-2.5/drivers/usb/misc/Kconfig	2003-06-05 10:04:41.000000000 -0700
+++ usb/drivers/usb/misc/Kconfig	2003-07-31 11:48:39.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Miscellaneous driver configuration
 #
-comment "USB Miscellaneous drivers"
+menu "USB Miscellaneous drivers"
 	depends on USB
 
 config USB_EMI26
@@ -117,4 +117,4 @@
 
 	  See <http://www.linux-usb.org/usbtest> for more information,
 	  including sample test device firmware and "how to use it".
-
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/net/Kconfig usb/drivers/usb/net/Kconfig
--- linux-2.5/drivers/usb/net/Kconfig	2003-06-20 09:49:37.000000000 -0700
+++ usb/drivers/usb/net/Kconfig	2003-07-31 12:45:59.000000000 -0700
@@ -1,7 +1,7 @@
 #
 # USB Network devices configuration
 #
-comment "USB Network adaptors"
+menu "USB Network adaptors"
 	depends on USB
 
 comment "Networking support is needed for USB Networking device support"
@@ -266,3 +266,4 @@
 	  IEEE 802 "local assignment" bit is set in the address, a "usbX"
 	  name is used instead.
 
+endmenu
diff -urN -X dontdiff linux-2.5/drivers/usb/serial/Kconfig usb/drivers/usb/serial/Kconfig
--- linux-2.5/drivers/usb/serial/Kconfig	2003-06-05 10:04:41.000000000 -0700
+++ usb/drivers/usb/serial/Kconfig	2003-07-31 14:05:26.000000000 -0700
@@ -2,10 +2,7 @@
 # USB Serial device configuration
 #
 
-menu "USB Serial Converter support"
-	depends on USB!=n
-
-config USB_SERIAL
+menuconfig  USB_SERIAL
 	tristate "USB Serial Converter support"
 	depends on USB
 	---help---
@@ -438,8 +435,5 @@
 
 config USB_EZUSB
 	bool
-	depends on USB_SERIAL_KEYSPAN_PDA || USB_SERIAL_XIRCOM || USB_SERIAL_KEYSPAN || USB_SERIAL_WHITEHEAT
+	depends on USB_SERIAL && (USB_SERIAL_KEYSPAN_PDA || USB_SERIAL_XIRCOM || USB_SERIAL_KEYSPAN || USB_SERIAL_WHITEHEAT)
 	default y
-
-endmenu
-
diff -urN -X dontdiff linux-2.5/drivers/usb/storage/Kconfig usb/drivers/usb/storage/Kconfig
--- linux-2.5/drivers/usb/storage/Kconfig	2003-06-05 10:04:41.000000000 -0700
+++ usb/drivers/usb/storage/Kconfig	2003-07-31 14:05:18.000000000 -0700
@@ -1,10 +1,11 @@
 #
 # USB Storage driver configuration
 #
+
 comment "SCSI support is needed for USB Storage"
 	depends on USB && SCSI=n
 
-config USB_STORAGE
+menuconfig USB_STORAGE
 	tristate "USB Mass Storage support"
 	depends on USB && SCSI
 	---help---

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-07-31 23:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-31 17:11 [PATCH] reorganize USB submenu's Stephen Hemminger
2003-07-31 17:45 ` Roman Zippel
2003-07-31 17:51 ` Greg KH
     [not found] ` <23979.216.12.38.216.1059672599.squirrel@www.ghz.cc>
2003-07-31 19:50   ` Stephen Hemminger
2003-07-31 20:16     ` Greg KH
2003-07-31 21:14       ` Stephen Hemminger
2003-07-31 22:57       ` Stephen Hemminger
2003-07-31 21:07     ` [linux-usb-devel] " David Brownell
2003-07-31 21:18       ` Stephen Hemminger
2003-07-31 22:00         ` David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).