patch-2.4.25 linux-2.4.25/drivers/usb/gadget/Config.in

Next file: linux-2.4.25/drivers/usb/gadget/Makefile
Previous file: linux-2.4.25/drivers/usb/ax8817x.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.24/drivers/usb/gadget/Config.in linux-2.4.25/drivers/usb/gadget/Config.in
@@ -5,28 +5,31 @@
 # Long term, this likely doesn't all belong in one directory
 # Plan to split it up eventually.
 #
-# CAREFUL!  Some versions of "xconfig" don't execute this correctly.
-#
 mainmenu_option next_comment
 comment 'Support for USB gadgets'
 
-bool 'Support for USB Gadgets' CONFIG_USB_GADGET
-if [ "$CONFIG_USB_GADGET" = "y" ]; then
+tristate 'Support for USB Gadgets' CONFIG_USB_GADGET
+if [ "$CONFIG_USB_GADGET" = "y" -o "$CONFIG_USB_GADGET" = "m" ]; then
   
   #
   # really want _exactly one_ device controller driver at a time,
   # since they control compile options for gadget drivers.
   #
-  comment 'USB Peripheral Controller Drivers'
-  
-  # assume all the dependencies may be undefined ("== true", yeech)
+  choice 'USB Peripheral Controller Driver' "\
+	NetChip-2280			CONFIG_USB_GADGET_NET2280 \
+	Toshiba-TC86C001(Goku-S)	CONFIG_USB_GADGET_GOKU \
+	" NetChip-2280
+
   define_tristate CONFIG_USB_GADGET_CONTROLLER n
-  if [ "$CONFIG_PCI" = "y" ] ; then
-    tristate '  NetChip 2280 support' CONFIG_USB_NET2280
+
+  if [ "$CONFIG_PCI" = "y" -a "$CONFIG_USB_GADGET_NET2280" = "y" ] ; then
+    define_tristate CONFIG_USB_NET2280 $CONFIG_USB_GADGET
     define_tristate CONFIG_USB_GADGET_CONTROLLER $CONFIG_USB_NET2280
   fi
-
-  # pxa2xx_udc, goku_udc, and others also work on 2.4 ...
+  if [ "$CONFIG_PCI" = "y" -a "$CONFIG_USB_GADGET_GOKU" = "y" ] ; then
+    define_tristate CONFIG_USB_GOKU $CONFIG_USB_GADGET
+    define_tristate CONFIG_USB_GADGET_CONTROLLER $CONFIG_USB_GOKU
+  fi
 
   if [ "$CONFIG_USB_GADGET_CONTROLLER" = "y" -o "$CONFIG_USB_GADGET_CONTROLLER" = "m" ] ; then
 
@@ -46,32 +49,30 @@
   comment 'USB Gadget Drivers'
 
   dep_tristate '  Gadget Zero (DEVELOPMENT)' CONFIG_USB_ZERO $CONFIG_USB_GADGET_CONTROLLER
-  if [ "$CONFIG_USB_ZERO" = "y" -o "$CONFIG_USB_ZERO" = "m" ]; then
-      if [ "$CONFIG_USB_NET2280" = "y" -o "$CONFIG_USB_NET2280" = "m" ]; then
-  	define_bool CONFIG_USB_ZERO_NET2280 y
-      else if [ "$CONFIG_USB_PXA2XX" = "y" -o "$CONFIG_USB_PXA2XX" = "m" ]; then
-  	define_bool CONFIG_USB_ZERO_PXA2XX y
-      else if [ "$CONFIG_USB_GOKU" = "y" -o "$CONFIG_USB_GOKU" = "m" ]; then
-  	define_bool CONFIG_USB_ZERO_GOKU y
-      fi fi fi
-      # ...
-  fi
-  
   dep_tristate '  Ethernet Gadget (EXPERIMENTAL)' CONFIG_USB_ETH $CONFIG_USB_GADGET_CONTROLLER $CONFIG_NET
-  if [ "$CONFIG_USB_ETH" = "y" -o "$CONFIG_USB_ETH" = "m" ]; then
-      if [ "$CONFIG_USB_NET2280" = "y" -o "$CONFIG_USB_NET2280" = "m" ]; then
-  	define_bool CONFIG_USB_ETH_NET2280 y
-      else if [ "$CONFIG_USB_PXA2XX" = "y" -o "$CONFIG_USB_PXA2XX" = "m" ]; then
-  	define_bool CONFIG_USB_ETH_PXA2XX y
-      else if [ "$CONFIG_USB_GOKU" = "y" -o "$CONFIG_USB_GOKU" = "m" ]; then
-  	define_bool CONFIG_USB_ETH_GOKU y
-      fi fi fi
-      # ...
-  fi
+  dep_tristate '  File-backed Storage Gadget (DEVELOPMENT)' CONFIG_USB_FILE_STORAGE $CONFIG_USB_GADGET_CONTROLLER
+  dep_mbool '    File-backed Storage Gadget test mode' CONFIG_USB_FILE_STORAGE_TEST $CONFIG_USB_FILE_STORAGE
   
-  
-  # ... or other gadget drivers:  printer class, hid, etc ...
 
+    # enforce the "only one statically linked gadget driver" rule
+
+    if [ "$CONFIG_USB_ZERO" = "y" ]; then
+      # zero = y
+      define_tristate CONFIG_USB_ETH n
+      define_tristate CONFIG_USB_FILE_STORAGE n
+    fi
+
+    if [ "$CONFIG_USB_ETH" = "y" ]; then
+      define_tristate CONFIG_USB_ZERO n
+      # eth = y
+      define_tristate CONFIG_USB_FILE_STORAGE n
+    fi
+
+    if [ "$CONFIG_USB_FILE_STORAGE" = "y" ]; then
+      define_tristate CONFIG_USB_ZERO n
+      define_tristate CONFIG_USB_ETH n
+      # file_storage = y
+    fi
   fi
 fi
 endmenu

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)