Restructure Device Driver menu entries
Subsystems (18)
RFC PATCH 1/1 Restructure Device Driver menu entries
This is a *proposed* restructuring of the DD menu so that one can
see and select/de-select entire submenus without having to enter each
submenu. It's also immediately obvious visually which submenus are
currently active.
Based on Randy Dunlap's earlier suggestion, it uses the kbuild
"menuconfig" feature. I changed only those sub-entries that matched an obvious pattern (that is, selectable in their entirety). If there was *anything* slightly different about that sub-entry, I left it alone. (That doesn't mean that those sub-entries can't be similarly tweaked with a minimum of effort, I was just keeping it simple for now.)
Finally, if this structure is used, there's still a good deal of
cleanup that can be done on each Kconfig file. For example, if most of the mtd Kconfig file is now surrounded by
if MTD
...
endif
then each internal entry no longer has to include any variation of
depends on MTD
but, for the time being, I left the individual config entries alone and just changed the top-level structure of each Kconfig file that was appropriate, just to get some feedback.
Thoughts on this approach?
---
drivers/ata/Kconfig | 8 ++------ drivers/connector/Kconfig | 8 ++++---- drivers/dma/Kconfig | 10 +++++----- drivers/edac/Kconfig | 8 ++++---- drivers/hwmon/Kconfig | 8 ++++---- drivers/i2c/Kconfig | 9 ++++----- drivers/ide/Kconfig | 6 +----- drivers/ieee1394/Kconfig | 7 ++++--- drivers/infiniband/Kconfig | 8 ++++---- drivers/isdn/Kconfig | 9 ++++----- drivers/leds/Kconfig | 9 +++------ drivers/md/Kconfig | 8 ++++---- drivers/message/fusion/Kconfig | 9 +++++---- drivers/message/i2o/Kconfig | 12 +++++------- drivers/mmc/Kconfig | 8 ++++---- drivers/mtd/Kconfig | 8 ++++---- drivers/parport/Kconfig | 8 ++++---- drivers/pnp/Kconfig | 8 ++++---- drivers/spi/Kconfig | 8 ++++---- drivers/telephony/Kconfig | 9 ++++----- drivers/w1/Kconfig | 8 ++++---- sound/Kconfig | 10 +++++----- 22 files changed, 86 insertions(+), 100 deletions(-)
drivers/ata/Kconfig +2 -6
@@ -2,10 +2,8 @@ # # SATA/PATA driver configuration # -menu "Serial ATA (prod) and Parallel ATA (experimental) drivers" - -config ATA - tristate "ATA device support" +menuconfig ATA + tristate "Serial ATA (prod) and Parallel ATA (experimental) drivers" depends on BLOCK depends on !(M32R || M68K) || BROKEN depends on !SUN4 || BROKEN
@@ -519,5 +517,3 @@ config PATA_IXP4XX_CF If unsure, say N. endif -endmenu -
drivers/connector/Kconfig +4 -4
@@ -1,6 +1,4 @@ -menu "Connector - unified userspace <-> kernelspace linker" - -config CONNECTOR +menuconfig CONNECTOR tristate "Connector - unified userspace <-> kernelspace linker" depends on NET ---help---
@@ -10,6 +8,8 @@ config CONNECTOR Connector support can also be built as a module. If so, the module will be called cn.ko. +if CONNECTOR + config PROC_EVENTS boolean "Report process events to userspace" depends on CONNECTOR=y
@@ -18,4 +18,4 @@ config PROC_EVENTS Provide a connector that reports process events to userspace. Send events such as fork, exec, id change (uid, gid, suid, etc), and exit. -endmenu +endif
drivers/dma/Kconfig +5 -5
@@ -2,14 +2,14 @@ # # DMA engine configuration # -menu "DMA Engine support" - -config DMA_ENGINE - bool "Support for DMA engines" +menuconfig DMA_ENGINE + bool "DMA engine support" ---help--- DMA engines offload copy operations from the CPU to dedicated hardware, allowing the copies to happen asynchronously. +if DMA_ENGINE + comment "DMA Clients" config NET_DMA
@@ -31,4 +31,4 @@ config INTEL_IOATDMA ---help--- Enable support for the Intel(R) I/OAT DMA engine. -endmenu +endif
drivers/edac/Kconfig +4 -4
@@ -6,10 +6,9 @@ # # $Id: Kconfig,v 1.4.2.7 2005/07/08 22:05:38 dsp_llnl Exp $ # -menu 'EDAC - error detection and reporting (RAS) (EXPERIMENTAL)' -config EDAC - tristate "EDAC core system error reporting (EXPERIMENTAL)" +menuconfig EDAC + tristate 'EDAC - error detection and reporting (RAS) (EXPERIMENTAL)' depends on X86 && EXPERIMENTAL help EDAC is designed to report errors in the core system.
@@ -29,6 +28,7 @@ config EDAC There is also a mailing list for the EDAC project, which can be found via the sourceforge page. +if EDAC comment "Reporting subsystems" depends on EDAC
@@ -110,4 +110,4 @@ config EDAC_POLL endchoice -endmenu +endif
drivers/hwmon/Kconfig +4 -4
@@ -2,9 +2,7 @@ # # Hardware monitoring chip drivers configuration # -menu "Hardware Monitoring support" - -config HWMON +menuconfig HWMON tristate "Hardware Monitoring support" default y help
@@ -23,6 +21,8 @@ config HWMON This support can also be built as a module. If so, the module will be called hwmon. +if HWMON + config HWMON_VID tristate default n
@@ -540,4 +540,4 @@ config HWMON_DEBUG_CHIP a problem with I2C support and want to see more of what is going on. -endmenu +endif
drivers/i2c/Kconfig +4 -5
@@ -2,9 +2,7 @@ # # I2C subsystem configuration # -menu "I2C support" - -config I2C +menuconfig I2C tristate "I2C support" ---help--- I2C (pronounce: I-square-C) is a slow serial bus protocol used in
@@ -22,6 +20,8 @@ config I2C This I2C support can also be built as a module. If so, the module will be called i2c-core. +if I2C + config I2C_CHARDEV tristate "I2C device interface" depends on I2C
@@ -73,5 +73,4 @@ config I2C_DEBUG_CHIP a problem with I2C support and want to see more of what is going on. -endmenu - +endif
drivers/ide/Kconfig +1 -5
@@ -6,9 +6,7 @@ # if BLOCK -menu "ATA/ATAPI/MFM/RLL support" - -config IDE +menuconfig IDE tristate "ATA/ATAPI/MFM/RLL support" ---help--- If you say Y here, your kernel will be able to manage low cost mass
@@ -1080,6 +1078,4 @@ config BLK_DEV_HD endif -endmenu - endif
drivers/ieee1394/Kconfig +4 -3
@@ -1,8 +1,7 @@ # -*- shell-script -*- -menu "IEEE 1394 (FireWire) support" -config IEEE1394 +menuconfig IEEE1394 tristate "IEEE 1394 (FireWire) support" depends on PCI || BROKEN select NET
@@ -19,6 +18,8 @@ config IEEE1394 To compile this driver as a module, say M here: the module will be called ieee1394. +if IEEE1394 + comment "Subsystem Options" depends on IEEE1394
@@ -185,4 +186,4 @@ config IEEE1394_RAWIO To compile this driver as a module, say M here: the module will be called raw1394. -endmenu +endif
drivers/infiniband/Kconfig +4 -4
@@ -1,13 +1,13 @@ -menu "InfiniBand support" - config INFINIBAND - depends on PCI || BROKEN tristate "InfiniBand support" + depends on PCI || BROKEN ---help--- Core support for InfiniBand (IB). Make sure to also select any protocols you wish to use as well as drivers for your InfiniBand hardware. +if INFINIBAND + config INFINIBAND_USER_MAD tristate "InfiniBand userspace MAD support" depends on INFINIBAND
@@ -45,4 +45,4 @@ source "drivers/infiniband/ulp/srp/Kconf source "drivers/infiniband/ulp/iser/Kconfig" -endmenu +endif
drivers/isdn/Kconfig +4 -5
@@ -2,9 +2,7 @@ # # ISDN device configuration # -menu "ISDN subsystem" - -config ISDN +menuconfig ISDN tristate "ISDN support" depends on NET ---help---
@@ -20,6 +18,8 @@ config ISDN Select this option if you want your kernel to support ISDN. +if ISDN + menu "Old ISDN4Linux" depends on NET && ISDN
@@ -63,5 +63,4 @@ source "drivers/isdn/capi/Kconfig" source "drivers/isdn/hardware/Kconfig" -endmenu - +endif
drivers/leds/Kconfig +3 -6
@@ -1,7 +1,4 @@ - -menu "LED devices" - -config NEW_LEDS +menuconfig NEW_LEDS bool "LED Support" help Say Y to enable Linux LED support. This allows control of supported
@@ -9,6 +6,7 @@ config NEW_LEDS This is not related to standard keyboard LEDs which are controlled via the input system. +if NEW_LEDS config LEDS_CLASS tristate "LED Class Support"
@@ -109,5 +107,4 @@ config LEDS_TRIGGER_HEARTBEAT load average. If unsure, say Y. -endmenu - +endif
drivers/md/Kconfig +4 -4
@@ -4,14 +4,14 @@ # if BLOCK -menu "Multi-device support (RAID and LVM)" - -config MD +menuconfig MD bool "Multiple devices driver support (RAID and LVM)" help Support multiple physical spindles through a single logical device. Required for RAID and logical volume management. +if MD + config BLK_DEV_MD tristate "RAID support" depends on MD
@@ -261,6 +261,6 @@ config DM_MULTIPATH_EMC ---help--- Multipath support for EMC CX/AX series hardware. -endmenu +endif endif
drivers/message/fusion/Kconfig +5 -4
@@ -1,10 +1,11 @@ -menu "Fusion MPT device support" -config FUSION - bool +menuconfig FUSION + bool "Fusion MPT device support" default n +if FUSION + config FUSION_SPI tristate "Fusion MPT ScsiHost drivers for SPI" depends on PCI && SCSI
@@ -100,4 +101,4 @@ config FUSION_LAN If unsure whether you really want or need this, say N. -endmenu +endif
drivers/message/i2o/Kconfig +5 -7
@@ -1,8 +1,5 @@ - -menu "I2O device support" - -config I2O - tristate "I2O support" +menuconfig I2O + tristate "I2O device support" depends on PCI ---help--- The Intelligent Input/Output (I2O) architecture allows hardware
@@ -24,6 +21,8 @@ config I2O If unsure, say N. +if I2O + config I2O_LCT_NOTIFY_ON_CHANGES bool "Enable LCT notification" depends on I2O
@@ -122,5 +121,4 @@ config I2O_PROC To compile this support as a module, choose M here: the module will be called i2o_proc. -endmenu - +endif
drivers/mmc/Kconfig +4 -4
@@ -2,15 +2,15 @@ # # MMC subsystem configuration # -menu "MMC/SD Card support" -config MMC - tristate "MMC support" +menuconfig MMC + tristate "MMC/SD Card support" help MMC is the "multi-media card" bus protocol. If you want MMC support, you should say Y here and also to the specific driver for your MMC interface. +if MMC config MMC_DEBUG bool "MMC debugging"
@@ -125,4 +125,4 @@ config MMC_TIFM_SD To compile this driver as a module, choose M here: the module will be called tifm_sd. -endmenu +endif
drivers/mtd/Kconfig +4 -4
@@ -1,8 +1,6 @@ # $Id: Kconfig,v 1.11 2005/11/07 11:14:19 gleixner Exp $ -menu "Memory Technology Devices (MTD)" - -config MTD +menuconfig MTD tristate "Memory Technology Device (MTD) support" help Memory Technology Devices are flash, RAM and similar chips, often
@@ -13,6 +11,8 @@ config MTD them. It will also allow you to select individual drivers for particular hardware and users of MTD devices. If unsure, say N. +if MTD + config MTD_DEBUG bool "Debugging" depends on MTD
@@ -281,5 +281,5 @@ source "drivers/mtd/nand/Kconfig" source "drivers/mtd/onenand/Kconfig" -endmenu +endif
drivers/parport/Kconfig +4 -4
@@ -5,9 +5,7 @@ # # Parport configuration. # -menu "Parallel port support" - -config PARPORT +menuconfig PARPORT tristate "Parallel port support" ---help--- If you want to use devices connected to your machine's parallel port
@@ -32,6 +30,8 @@ config PARPORT If unsure, say Y. +if PARPORT + config PARPORT_PC tristate "PC-style hardware" depends on PARPORT && (!SPARC64 || PCI) && !SPARC32 && !M32R && !FRV
@@ -158,5 +158,5 @@ config PARPORT_1284 transfer modes. Also say Y if you want device ID information to appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N. -endmenu +endif
drivers/pnp/Kconfig +4 -4
@@ -2,9 +2,7 @@ # # Plug and Play configuration # -menu "Plug and Play support" - -config PNP +menuconfig PNP bool "Plug and Play support" depends on ISA || ACPI ---help---
@@ -21,6 +19,8 @@ config PNP If unsure, say Y. +if PNP + config PNP_DEBUG bool "PnP Debug Messages" depends on PNP
@@ -37,5 +37,5 @@ source "drivers/pnp/pnpbios/Kconfig" source "drivers/pnp/pnpacpi/Kconfig" -endmenu +endif
drivers/spi/Kconfig +4 -4
@@ -5,9 +5,7 @@ # NOTE: the reason this doesn't show SP # nobody's needed a slave side API yet. The master-role API is not # fully appropriate there, so it'd need some thought to do well. # -menu "SPI support" - -config SPI +menuconfig SPI bool "SPI support" help The "Serial Peripheral Interface" is a low level synchronous
@@ -27,6 +25,8 @@ config SPI (half duplex), SSP, SSI, and PSP. This driver framework should work with most such devices and controllers. +if SPI + config SPI_DEBUG boolean "Debug support for SPI drivers" depends on SPI && DEBUG_KERNEL
@@ -129,5 +129,5 @@ # # (slave support would go here) -endmenu # "SPI support" +endif
drivers/telephony/Kconfig +4 -5
@@ -2,9 +2,7 @@ # # Telephony device configuration # -menu "Telephony Support" - -config PHONE +menuconfig PHONE tristate "Linux telephony support" ---help--- Say Y here if you have a telephony card, which for example allows
@@ -16,6 +14,8 @@ config PHONE To compile this driver as a module, choose M here: the module will be called phonedev. +if PHONE + config PHONE_IXJ tristate "QuickNet Internet LineJack/PhoneJack support" depends on PHONE
@@ -43,5 +43,4 @@ config PHONE_IXJ_PCMCIA cards manufactured by Quicknet Technologies, Inc. This changes the card initialization code to work with the card manager daemon. -endmenu - +endif
drivers/w1/Kconfig +4 -4
@@ -1,6 +1,4 @@ -menu "Dallas's 1-wire bus" - -config W1 +menuconfig W1 tristate "Dallas's 1-wire support" ---help--- Dallas' 1-wire bus is useful to connect slow 1-pin devices
@@ -11,6 +9,8 @@ config W1 This W1 support can also be built as a module. If so, the module will be called wire.ko. +if W1 + config W1_CON depends on CONNECTOR && W1 bool "Userspace communication over connector"
@@ -26,4 +26,4 @@ config W1_CON source drivers/w1/masters/Kconfig source drivers/w1/slaves/Kconfig -endmenu +endif
sound/Kconfig +5 -5
@@ -1,10 +1,8 @@ # sound/Config.in # -menu "Sound" - -config SOUND - tristate "Sound card support" +menuconfig SOUND + tristate "Sound" help If you have a sound card in your computer, i.e. if it can say more than an occasional beep, say Y. Be sure to have all the information
@@ -32,6 +30,8 @@ config SOUND Kernel patches and supporting utilities to do that are in the pcsp package, available at <ftp://ftp.infradead.org/pub/pcsp/>. +if SOUND + source "sound/oss/dmasound/Kconfig" if !M68K
@@ -93,4 +93,4 @@ endmenu endif -endmenu +endif
Quoted 24 lines · On Wed, 6 Dec 2006 09:33:46 -0500 (EST) Robert P. J. Day wrote:
This is a *proposed* restructuring of the DD menu so that one can
see and select/de-select entire submenus without having to enter each
submenu. It's also immediately obvious visually which submenus are
currently active.Based on Randy Dunlap's earlier suggestion, it uses the kbuild
"menuconfig" feature. I changed only those sub-entries that matched an obvious pattern (that is, selectable in their entirety). If there was *anything* slightly different about that sub-entry, I left it alone. (That doesn't mean that those sub-entries can't be similarly tweaked with a minimum of effort, I was just keeping it simple for now.)Finally, if this structure is used, there's still a good deal of
cleanup that can be done on eachKconfigfile. For example, if most of the mtdKconfigfile is now surrounded byif MTD
...
endifthen each internal entry no longer has to include any variation of
Quoted 7 lines
depends on MTD
but, for the time being, I left the individual config entries alone and just changed the top-level structure of each
Kconfigfile that was appropriate, just to get some feedback.Thoughts on this approach?
Looks like InfiniBand support wasn't converted to use the menuconfig keyword? Now its menu shows up at an odd location in xconfig. (Please test changes with menuconfig, xconfig, & gconfig.)
Otherwise looks good to me.
Quoted 22 lines
drivers/infiniband/Kconfig +3
-3@@ -1,13 +1,13 @@ -menu "InfiniBand support" - config INFINIBAND - depends on PCI || BROKEN tristate "InfiniBand support" + depends on PCI || BROKEN ---help--- Core support for InfiniBand (IB). Make sure to also select any protocols you wish to use as well as drivers for your InfiniBand hardware. +if INFINIBAND + config INFINIBAND_USER_MAD tristate "InfiniBand userspace MAD support" depends on INFINIBAND
drivers/infiniband/Kconfig source "drivers/infiniband/ulp/srp/Kconf · line 48
Quoted 5 lines
drivers/infiniband/Kconfig +1
-1@@ -45,4 +45,4 @@ source "drivers/infiniband/ulp/srp/Kconf source "drivers/infiniband/ulp/iser/Kconfig" -endmenu +endif
---
~Randy
Quoted 14 lines · On Wed, 6 Dec 2006 09:33:46 -0500 (EST) Robert P. J. Day wrote:
This is a *proposed* restructuring of the DD menu so that one can
see and select/de-select entire submenus without having to enter each
submenu. It's also immediately obvious visually which submenus are
currently active.Based on Randy Dunlap's earlier suggestion, it uses the kbuild
"menuconfig" feature. I changed only those sub-entries that matched an obvious pattern (that is, selectable in their entirety). If there was *anything* slightly different about that sub-entry, I left it alone. (That doesn't mean that those sub-entries can't be similarly tweaked with a minimum of effort, I was just keeping it simple for now.)
Quoted 3 lines
Finally, if this structure is used, there's still a good deal of
cleanup that can be done on eachKconfigfile. For example, if most of the mtdKconfigfile is now surrounded by
The FUSION part has a dependency that I'll leave for you:
Warning! Found recursive dependency: FUSION FUSION_SPI FUSION
reported by any "make *config".
---
~Randy
Quoted 20 lines · Randy Dunlap
Quoted 14 lines · On Wed, 6 Dec 2006 09:33:46 -0500 (EST) Robert P. J. Day wrote:
This is a *proposed* restructuring of the DD menu so that one can
see and select/de-select entire submenus without having to enter each
submenu. It's also immediately obvious visually which submenus are
currently active.Based on Randy Dunlap's earlier suggestion, it uses the kbuild
"menuconfig" feature. I changed only those sub-entries that matched an obvious pattern (that is, selectable in their entirety). If there was *anything* slightly different about that sub-entry, I left it alone. (That doesn't mean that those sub-entries can't be similarly tweaked with a minimum of effort, I was just keeping it simple for now.)Quoted 3 lines
Finally, if this structure is used, there's still a good deal of
cleanup that can be done on eachKconfigfile. For example, if most of the mtdKconfigfile is now surrounded by
Quoted 5 lines
The FUSION part has a dependency that I'll leave for you:
Warning! Found recursive dependency: FUSION
FUSION_SPIFUSIONreported by any "make *config".
ah, quite right, i missed that. that's because the fusion Kconfig file starts with:
menu "Fusion MPT device support"
config FUSION
bool
default n
config FUSION_SPI
tristate "Fusion MPT ScsiHost drivers for SPI" depends on PCI && SCSI <-- not dependent on FUSION select FUSION select SCSI_SPI_ATTRS ...
for now, then, i'm just going to remove the FUSION menu change from
the upcoming patch and decide what to do about it later. as i mentioned, i wanted this first patch to restructure entries that required nothing more than the obvious rewrite. upcoming patch ... uh, upcoming shortly.
rday
Quoted 6 lines · Robert P. J. Day
This is a *proposed* restructuring of the DD menu so that one can
see and select/de-select entire submenus without having to enter each
submenu. It's also immediately obvious visually which submenus are
currently active.
Wonderful idea. I support it.
-`J'