From fe907a3128920f1a6de0ed57410df00653c1b629 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 26 Jul 2015 02:46:26 +0900 Subject: [PATCH] drivers: hierarchize drivers Kconfig menu The menuconfig for drivers are getting more and more cluttered and unreadable because too many entries are displayed in a single flat menu. Use hierarchic menu for each category. Signed-off-by: Masahiro Yamada Reviewed-by: Simon Glass [trini: Update to apply again in a few places, drop USB hunk] Signed-off-by: Tom Rini --- drivers/core/Kconfig | 4 ++++ drivers/crypto/Kconfig | 4 ++++ drivers/demo/Kconfig | 4 ++++ drivers/gpio/Kconfig | 8 ++++++++ drivers/i2c/Kconfig | 23 +++++++++++++++-------- drivers/led/Kconfig | 4 ++++ drivers/misc/Kconfig | 8 ++++++++ drivers/rtc/Kconfig | 8 ++++++++ drivers/serial/Kconfig | 8 ++++++++ drivers/sound/Kconfig | 4 ++++ drivers/video/Kconfig | 8 ++++++++ 11 files changed, 75 insertions(+), 8 deletions(-) diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig index c82b5645cd..788f8b739b 100644 --- a/drivers/core/Kconfig +++ b/drivers/core/Kconfig @@ -1,3 +1,5 @@ +menu "Generic Driver Options" + config DM bool "Enable Driver Model" help @@ -102,3 +104,5 @@ config DEBUG_DEVRES debug resource management for a managed device. If you are unsure about this, Say N here. + +endmenu diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index bd26a2bcfa..1ea116be75 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -1 +1,5 @@ +menu "Hardware crypto devices" + source drivers/crypto/fsl/Kconfig + +endmenu diff --git a/drivers/demo/Kconfig b/drivers/demo/Kconfig index 7a8ce18555..98bb6333c1 100644 --- a/drivers/demo/Kconfig +++ b/drivers/demo/Kconfig @@ -1,3 +1,5 @@ +menu "Demo for driver model" + config DM_DEMO bool "Enable demo uclass support" depends on DM @@ -24,3 +26,5 @@ config DM_DEMO_SHAPE a shape when the 'demo hello' command is executed which targets this device. It can be used to help understand how driver model works. + +endmenu diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 0c43777cef..5934597c4e 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -1,3 +1,9 @@ +# +# GPIO infrastructure and drivers +# + +menu "GPIO Support" + config DM_GPIO bool "Enable Driver Model for GPIO drivers" depends on DM @@ -42,3 +48,5 @@ config VYBRID_GPIO default n help Say yes here to support Vybrid vf610 GPIOs. + +endmenu diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 4c8ea477a8..fced6ebf94 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -1,15 +1,14 @@ -menuconfig SYS_I2C - bool "I2C device support" +# +# I2C subsystem configuration +# -if SYS_I2C +menu "I2C device support" config HARD_I2C bool -config SYS_I2C_MXC - bool "Freescale i.MX I2C controller" - select HARD_I2C - select I2C_QUIRK_REG if FSL_LSCH3 || SOC_LS102XA +config SYS_I2C + bool config DM_I2C bool "Enable Driver Model for I2C drivers" @@ -65,6 +64,14 @@ config DM_I2C_GPIO bindings are supported. Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt +config SYS_I2C_MXC + bool "Freescale i.MX I2C controller" + select HARD_I2C + select I2C_QUIRK_REG if FSL_LSCH3 || SOC_LS102XA + +config I2C_QUIRK_REG + bool + config SYS_I2C_SANDBOX bool "Sandbox I2C driver" depends on SANDBOX && DM_I2C @@ -113,4 +120,4 @@ config SYS_I2C_UNIPHIER_F source "drivers/i2c/muxes/Kconfig" -endif +endmenu diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig index de5feea8dd..b21bc94748 100644 --- a/drivers/led/Kconfig +++ b/drivers/led/Kconfig @@ -1,3 +1,5 @@ +menu "LED Support" + config LED bool "Enable LED support" depends on DM @@ -24,3 +26,5 @@ config LED_GPIO GPIOs may be on the SoC or some other device which provides GPIOs. The GPIO driver must used driver model. LEDs are configured using the device tree. + +endmenu diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index ebcd58c46d..00fbc2e2ff 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -1,3 +1,9 @@ +# +# Multifunction miscellaneous devices +# + +menu "Multifunction device drivers" + config CMD_CROS_EC bool "Enable crosec command" depends on CROS_EC @@ -90,3 +96,5 @@ config RESET Each driver can provide a reset method which will be called to effect a reset. The uclass will try all available drivers when reset_walk() is called. + +endmenu diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index bd63621e37..b5d9048ad6 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -1,3 +1,9 @@ +# +# RTC drivers configuration +# + +menu "Real Time Clock" + config DM_RTC bool "Enable Driver Model for RTC drivers" depends on DM @@ -6,3 +12,5 @@ config DM_RTC then provides the rtc_get()/rtc_set() interface, delegating to drivers to perform the actual functions. See rtc.h for a description of the API. + +endmenu diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index a880eacfaf..4f6a3b87a1 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -1,3 +1,9 @@ +# +# Serial device configuration +# + +menu "Serial drivers" + config REQUIRE_SERIAL_CONSOLE bool "Require a serial port for console" # Running without a serial console is not supported by the @@ -139,3 +145,5 @@ config X86_SERIAL enabled in the device tree with the correct input clock frequency provided (default 1843200). Enable this to obtain serial console output. + +endmenu diff --git a/drivers/sound/Kconfig b/drivers/sound/Kconfig index 3b96e84480..5de86c05c6 100644 --- a/drivers/sound/Kconfig +++ b/drivers/sound/Kconfig @@ -1,3 +1,5 @@ +menu "Sound support" + config SOUND bool "Enable sound support" help @@ -53,3 +55,5 @@ config SOUND_WM8994 Enable the wm8994 audio codec. This is connected via I2S for audio data and I2C for codec control. At present it only works with the Samsung I2S driver. + +endmenu diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 3244cd7edd..5cb36851e7 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -1,3 +1,9 @@ +# +# Video configuration +# + +menu "Graphics support" + config VIDEO_VESA bool "Enable VESA video driver support" default n @@ -242,3 +248,5 @@ config VIDEO_TEGRA124 have an eDP display connected. source "drivers/video/bridge/Kconfig" + +endmenu -- 2.39.2