From ac2aec96e066862192781de5054c7e227afa4567 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Thu, 6 Feb 2020 12:21:22 +0800 Subject: [PATCH] Refine Kconfig under drivers folder 1.Move subsystem config into sub folder 2.Remove the duplicated if/endif Change-Id: I0b96ac0570ee1ba62bbb95586381f5410b90bcf0 Signed-off-by: Xiang Xiao --- drivers/1wire/Kconfig | 4 --- drivers/Kconfig | 54 +++++++------------------------------ drivers/can/Kconfig | 3 --- drivers/contactless/Kconfig | 3 --- drivers/eeprom/Kconfig | 3 --- drivers/i2c/Kconfig | 6 ++--- drivers/mmcsd/Kconfig | 16 +++++++++++ drivers/rptun/Kconfig | 4 --- drivers/spi/Kconfig | 24 ++++++++--------- drivers/timers/Kconfig | 8 ++++++ drivers/usbmonitor/Kconfig | 1 - drivers/video/Kconfig | 16 +++++++++++ drivers/wireless/Kconfig | 4 --- 13 files changed, 64 insertions(+), 82 deletions(-) diff --git a/drivers/1wire/Kconfig b/drivers/1wire/Kconfig index c79af85d2e..789ad09652 100644 --- a/drivers/1wire/Kconfig +++ b/drivers/1wire/Kconfig @@ -3,13 +3,9 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if 1WIRE - config 1WIRE_DS28E17 bool "DS28E17 1-wire to I2C converter" default n depends on I2C ---help--- Enable support for the Maxim DS28E17 1-wire to I2C converter - -endif # 1WIRE diff --git a/drivers/Kconfig b/drivers/Kconfig index ab581fdf96..66e6e2e4ff 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -15,9 +15,6 @@ config DEV_ZERO bool "Enable /dev/zero" default n -source drivers/crypto/Kconfig -source drivers/loop/Kconfig - config DRVR_MKRD bool "RAM disk wrapper (mkrd)" default n @@ -77,6 +74,9 @@ endif # DRVR_WRITEBUFFER || DRVR_READAHEAD endmenu # Buffering +source drivers/crypto/Kconfig +source drivers/loop/Kconfig + menuconfig CAN bool "CAN Driver Support" default n @@ -88,18 +88,6 @@ if CAN source drivers/can/Kconfig endif -config ARCH_HAVE_PWM_PULSECOUNT - bool - default n - -config ARCH_HAVE_PWM_MULTICHAN - bool - default n - -config ARCH_HAVE_I2CRESET - bool - default n - menuconfig I2C bool "I2C Driver Support" default n @@ -155,20 +143,6 @@ if DRIVERS_AUDIO source drivers/audio/Kconfig endif # DRIVERS_AUDIO -config FB_CMAP - bool - default n - ---help--- - Set by driver-specific configuration to indicate support for color - mapping. Not directly user selectable. - -config FB_TRANSPARENCY - bool - default n - ---help--- - Set by driver-specific configuration to indicate support for color - transparency. Not directly user selectable. - menuconfig DRIVERS_VIDEO bool "Video Device Support" default n @@ -210,22 +184,6 @@ source drivers/leds/Kconfig # MMC/SD-related platform capabilities -config ARCH_HAVE_SDIO - bool - default n - -config ARCH_HAVE_SDIOWAIT_WRCOMPLETE - bool - default n - -config ARCH_HAVE_SDIO_PREFLIGHT - bool - default n - -config ARCH_HAVE_SDIO_DELAYED_INVLDT - bool - default n - menuconfig MMCSD bool "MMC/SD Driver Support" default n @@ -395,7 +353,9 @@ menuconfig DRIVERS_WIRELESS ---help--- Drivers for various wireless devices. +if DRIVERS_WIRELESS source drivers/wireless/Kconfig +endif # DRIVERS_WIRELESS menuconfig DRIVERS_CONTACTLESS bool "Contactless Device Support" @@ -403,7 +363,9 @@ menuconfig DRIVERS_CONTACTLESS ---help--- Drivers for various contactless devices. +if DRIVERS_CONTACTLESS source drivers/contactless/Kconfig +endif # DRIVERS_CONTACTLESS menuconfig 1WIRE bool "1wire Device Support" @@ -411,7 +373,9 @@ menuconfig 1WIRE ---help--- Drivers for various 1wire devices. +if 1WIRE source drivers/1wire/Kconfig +endif # 1WIRE source drivers/syslog/Kconfig diff --git a/drivers/can/Kconfig b/drivers/can/Kconfig index d539b29bb7..ec3ba046c1 100644 --- a/drivers/can/Kconfig +++ b/drivers/can/Kconfig @@ -3,8 +3,6 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if CAN - config CAN_EXTID bool "CAN extended IDs" default n @@ -179,4 +177,3 @@ config MCP2515_SPI_SCK_FREQUENCY range 100000 10000000 endif # CAN_MCP2515 -endif # CAN diff --git a/drivers/contactless/Kconfig b/drivers/contactless/Kconfig index 68af4b9d79..89ccbec0a4 100644 --- a/drivers/contactless/Kconfig +++ b/drivers/contactless/Kconfig @@ -3,8 +3,6 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if DRIVERS_CONTACTLESS - config CL_MFRC522 bool "NXP MFRC522 ISO14443/Mifare Transceiver" default n @@ -56,4 +54,3 @@ config CL_PN532_DEBUG_RX depends on DEBUG_CONTACTLESS endif # CL_PN532 -endif # DRIVERS_CONTACTLESS diff --git a/drivers/eeprom/Kconfig b/drivers/eeprom/Kconfig index d7110d44b4..c7f1b90bc7 100644 --- a/drivers/eeprom/Kconfig +++ b/drivers/eeprom/Kconfig @@ -3,7 +3,6 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if EEPROM config SPI_EE_25XX bool "Microchip 25xxNNN / Atmel AT25NNN / ST M95NNN SPI EEPROM devices" default n @@ -51,5 +50,3 @@ config AT24CS_UUID This option registers a char device driver with the ".uuid" suffix. endif # I2C_EE_24XX - -endif # EEPROM diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index cdfd124ce6..1fcb75c976 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -3,7 +3,9 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if I2C +config ARCH_HAVE_I2CRESET + bool + default n config I2C_SLAVE bool "I2C Slave" @@ -48,5 +50,3 @@ config I2CMULTIPLEXER_PCA9540BDP # put more i2c mux devices here endmenu # I2C Multiplexer Support - -endif # I2C diff --git a/drivers/mmcsd/Kconfig b/drivers/mmcsd/Kconfig index 307b7a0208..bf9d937491 100644 --- a/drivers/mmcsd/Kconfig +++ b/drivers/mmcsd/Kconfig @@ -3,6 +3,22 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +config ARCH_HAVE_SDIO + bool + default n + +config ARCH_HAVE_SDIOWAIT_WRCOMPLETE + bool + default n + +config ARCH_HAVE_SDIO_PREFLIGHT + bool + default n + +config ARCH_HAVE_SDIO_DELAYED_INVLDT + bool + default n + config MMCSD_NSLOTS int "Number of MMC/SD slots" default 1 diff --git a/drivers/rptun/Kconfig b/drivers/rptun/Kconfig index a640e73755..31bd62bc51 100644 --- a/drivers/rptun/Kconfig +++ b/drivers/rptun/Kconfig @@ -3,8 +3,6 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if RPTUN - config RPTUN_PRIORITY int "rpturn thread priority" default 224 @@ -12,5 +10,3 @@ config RPTUN_PRIORITY config RPTUN_STACKSIZE int "rptun stack size" default 2048 - -endif diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 50210bf440..8724e95ad2 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -3,18 +3,6 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -config ARCH_HAVE_SPI_CRCGENERATION - bool - default n - -config ARCH_HAVE_SPI_CS_CONTROL - bool - default n - -config ARCH_HAVE_SPI_BITORDER - bool - default n - menuconfig SPI bool "SPI Driver Support" default n @@ -25,6 +13,18 @@ menuconfig SPI if SPI +config ARCH_HAVE_SPI_CRCGENERATION +bool +default n + +config ARCH_HAVE_SPI_CS_CONTROL +bool +default n + +config ARCH_HAVE_SPI_BITORDER +bool +default n + config SPI_SLAVE bool "SPI slave" default n diff --git a/drivers/timers/Kconfig b/drivers/timers/Kconfig index 82ad544097..c1ef786db6 100644 --- a/drivers/timers/Kconfig +++ b/drivers/timers/Kconfig @@ -14,6 +14,14 @@ config PWM if PWM +config ARCH_HAVE_PWM_PULSECOUNT + bool + default n + +config ARCH_HAVE_PWM_MULTICHAN + bool + default n + config PWM_PULSECOUNT bool "PWM Pulse Count Support" default n diff --git a/drivers/usbmonitor/Kconfig b/drivers/usbmonitor/Kconfig index 69862378e8..25ace5e7d8 100644 --- a/drivers/usbmonitor/Kconfig +++ b/drivers/usbmonitor/Kconfig @@ -3,7 +3,6 @@ # see the file kconfig-language.txt in the NuttX tools repository. # - config USBMONITOR_STACKSIZE int "USB Monitor daemon stack size" default 2048 diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index ce868ca696..fe240b4374 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -7,6 +7,22 @@ config VIDEO_FB bool "Framebuffer character driver" default n +config FB_CMAP + bool + depends on VIDEO_FB + default n + ---help--- + Set by driver-specific configuration to indicate support for color + mapping. Not directly user selectable. + +config FB_TRANSPARENCY + bool + depends on VIDEO_FB + default n + ---help--- + Set by driver-specific configuration to indicate support for color + transparency. Not directly user selectable. + config FB_SYNC bool "Hardware signals vertical sync" depends on VIDEO_FB diff --git a/drivers/wireless/Kconfig b/drivers/wireless/Kconfig index 299b6648e9..36c170462e 100644 --- a/drivers/wireless/Kconfig +++ b/drivers/wireless/Kconfig @@ -3,8 +3,6 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if DRIVERS_WIRELESS - config WL_CC1101 bool "CC1101 RF transceiver support" default n @@ -134,5 +132,3 @@ config WL_NRF24L01_RXFIFO_LEN endif # WL_NRF24L01_RXSUPPORT endif # WL_NRF24L01 - -endif # DRIVERS_WIRELESS