[U-Boot] [PATCH] drivers: hierarchize drivers Kconfig menu

Paul Kocialkowski contact at paulk.fr
Mon Jul 27 14:33:47 CEST 2015


Hi,

Le dimanche 26 juillet 2015 à 02:46 +0900, Masahiro Yamada a écrit :
> 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.

That looks like a valuable addition to me!

I had started dealing with the USB side of this in a series currently
under review. I'll drop the USB bits from my series and base the next
version on top of this patch.

Thanks!

> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---
> 
>  drivers/core/Kconfig   | 4 ++++
>  drivers/crypto/Kconfig | 4 ++++
>  drivers/demo/Kconfig   | 4 ++++
>  drivers/gpio/Kconfig   | 8 ++++++++
>  drivers/i2c/Kconfig    | 8 ++++++++
>  drivers/led/Kconfig    | 4 ++++
>  drivers/misc/Kconfig   | 8 ++++++++
>  drivers/rtc/Kconfig    | 8 ++++++++
>  drivers/serial/Kconfig | 8 ++++++++
>  drivers/sound/Kconfig  | 4 ++++
>  drivers/usb/Kconfig    | 8 ++++++++
>  drivers/video/Kconfig  | 8 ++++++++
>  12 files changed, 76 insertions(+)
> 
> diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
> index e40372d..9cc888d 100644
> --- a/drivers/core/Kconfig
> +++ b/drivers/core/Kconfig
> @@ -1,3 +1,5 @@
> +menu "Generic Driver Options"
> +
>  config DM
>  	bool "Enable Driver Model"
>  	help
> @@ -59,3 +61,5 @@ config DM_SEQ_ALIAS
>  	  Most boards will have a '/aliases' node containing the path to
>  	  numbered devices (e.g. serial0 = &serial0). This feature can be
>  	  disabled if it is not required, to save code space in SPL.
> +
> +endmenu
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index bd26a2b..1ea116b 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 7a8ce18..98bb633 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 0c43777..5934597 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 86fb36b..b8b2250 100644
> --- a/drivers/i2c/Kconfig
> +++ b/drivers/i2c/Kconfig
> @@ -1,3 +1,9 @@
> +#
> +# I2C subsystem configuration
> +#
> +
> +menu "I2C support"
> +
>  config DM_I2C
>  	bool "Enable Driver Model for I2C drivers"
>  	depends on DM
> @@ -73,3 +79,5 @@ config SYS_I2C_UNIPHIER_F
>  	help
>  	  Support for UniPhier FIFO-builtin I2C controller driver.
>  	  This I2C controller is used on PH1-Pro4 or newer UniPhier SoCs.
> +
> +endmenu
> diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig
> index de5feea..b21bc94 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 3b7f76a..f29a169 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
> @@ -82,3 +88,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 bd63621..b5d9048 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 4829284..b87eb01 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -1,3 +1,9 @@
> +#
> +# Serial device configuration
> +#
> +
> +menu "Serial drivers"
> +
>  config DM_SERIAL
>  	bool "Enable Driver Model for serial drivers"
>  	depends on DM
> @@ -102,3 +108,5 @@ config UNIPHIER_SERIAL
>  	help
>  	  If you have a UniPhier based board and want to use the on-chip
>  	  serial ports, say Y to this option. If unsure, say N.
> +
> +endmenu
> diff --git a/drivers/sound/Kconfig b/drivers/sound/Kconfig
> index 3b96e84..5de86c0 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/usb/Kconfig b/drivers/usb/Kconfig
> index 3fa5b2e..19b1b3d 100644
> --- a/drivers/usb/Kconfig
> +++ b/drivers/usb/Kconfig
> @@ -1,3 +1,9 @@
> +#
> +# USB device configuration
> +#
> +
> +menu "USB support"
> +
>  config USB_ARCH_HAS_HCD
>  	def_bool y
>  
> @@ -60,3 +66,5 @@ config USB_STORAGE
>  	  board's USB port.
>  
>  endif
> +
> +endmenu
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> index 9ae23e8..892781d 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
> @@ -240,3 +246,5 @@ config VIDEO_TEGRA124
>  	   HDMI. At present only eDP is supported by U-Boot. This option
>  	   enables this support which can be used on devices which
>  	   have an eDP display connected.
> +
> +endmenu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150727/65ff3357/attachment.sig>


More information about the U-Boot mailing list