diff --git a/drivers/1wire/Kconfig b/drivers/1wire/Kconfig index 789ad09652e..c79af85d2e4 100644 --- a/drivers/1wire/Kconfig +++ b/drivers/1wire/Kconfig @@ -3,9 +3,13 @@ # 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 66e6e2e4ff2..ffb0114659b 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -84,9 +84,7 @@ menuconfig CAN This selection enables building of the "upper-half" CAN driver. See include/nuttx/can/can.h for further CAN driver information. -if CAN source drivers/can/Kconfig -endif menuconfig I2C bool "I2C Driver Support" @@ -95,10 +93,7 @@ menuconfig I2C This selection enables building of the "upper-half" I2C driver. See include/nuttx/i2c/i2c_master.h for further I2C driver information. -if I2C source drivers/i2c/Kconfig -endif - source drivers/spi/Kconfig menuconfig I2S @@ -109,10 +104,7 @@ menuconfig I2S should be enabled by all platforms that support I2S interfaces. See include/nuttx/audio/i2s.h for further I2S driver information. -if I2S source drivers/i2s/Kconfig -endif # I2S - source drivers/timers/Kconfig menuconfig ANALOG @@ -124,9 +116,7 @@ menuconfig ANALOG well as drivers for Digital to Analog Conversion (DAC). See include/nuttx/analog/*.h for registration information. -if ANALOG source drivers/analog/Kconfig -endif # ANALOG menuconfig DRIVERS_AUDIO bool "Audio Device Support" @@ -139,9 +129,7 @@ menuconfig DRIVERS_AUDIO NOTE: All of these drivers depend on support from the audio subsystem enabled with the AUDIO selection. -if DRIVERS_AUDIO source drivers/audio/Kconfig -endif # DRIVERS_AUDIO menuconfig DRIVERS_VIDEO bool "Video Device Support" @@ -149,9 +137,7 @@ menuconfig DRIVERS_VIDEO ---help--- Enable support for video device drivers. -if DRIVERS_VIDEO source drivers/video/Kconfig -endif # DRIVERS_VIDEO menuconfig BCH bool "Block-to-Character (BCH) Support" @@ -162,9 +148,7 @@ menuconfig BCH performed by loop.c. See include/nuttx/drivers/drivers.h for registration information. -if BCH source drivers/bch/Kconfig -endif # BCH menuconfig INPUT bool "Input Device Support" @@ -174,10 +158,7 @@ menuconfig INPUT This includes such things as touchscreen and keypad drivers. See include/nuttx/input/*.h for registration information. -if INPUT source drivers/input/Kconfig -endif # INPUT - source drivers/ioexpander/Kconfig source drivers/lcd/Kconfig source drivers/leds/Kconfig @@ -192,9 +173,7 @@ menuconfig MMCSD SPI and SDIO/MCI interfaces are supported. See include/nuttx/mmcsd.h and include/nuttx/sdio.h for further information. -if MMCSD source drivers/mmcsd/Kconfig -endif # MMCSD menuconfig MODEM bool "Modem Support" @@ -202,9 +181,7 @@ menuconfig MODEM ---help--- Enable modem support. -if MODEM source drivers/modem/Kconfig -endif # MODEM menuconfig MTD bool "Memory Technology Device (MTD) Support" @@ -219,9 +196,7 @@ menuconfig MTD logic is unrelated; I just used the name MTD because I am not aware of any other common way to refer to this class of devices). -if MTD source drivers/mtd/Kconfig -endif # MTD menuconfig EEPROM bool "EEPROM support" @@ -229,9 +204,7 @@ menuconfig EEPROM ---help--- This directory holds implementations of EEPROM drivers. -if EEPROM source drivers/eeprom/Kconfig -endif menuconfig NETDEVICES bool "Network Device/PHY Support" @@ -249,9 +222,7 @@ menuconfig NETDEVICES require configuration of an external PHY device. That external PHY device is also selected via this menu. -if NETDEVICES source drivers/net/Kconfig -endif # NETDEVICES menuconfig PIPES bool "FIFO and named pipe drivers" @@ -260,10 +231,7 @@ menuconfig PIPES FIFO and named pipe drivers. Standard interfaces are declared in include/unistd.h -if PIPES source drivers/pipes/Kconfig -endif # PIPES - source drivers/power/Kconfig menuconfig RPTUN @@ -273,9 +241,7 @@ menuconfig RPTUN ---help--- RPTUN driver is used for multi-cores' communication. -if RPTUN source drivers/rptun/Kconfig -endif # RPTUN menuconfig SENSORS bool "Sensor Device Support" @@ -283,9 +249,7 @@ menuconfig SENSORS ---help--- Drivers for various sensors -if SENSORS source drivers/sensors/Kconfig -endif # SENSORS menuconfig SERIAL bool "Serial Driver Support" @@ -295,9 +259,7 @@ menuconfig SERIAL some TTY-like functionality and are commonly used (but not required for) the NuttX system console. See also include/nuttx/serial/serial.h -if SERIAL source drivers/serial/Kconfig -endif # SERIAL menuconfig USBDEV bool "USB Device Driver Support" @@ -305,9 +267,7 @@ menuconfig USBDEV ---help--- USB device drivers. See also include/nuttx/usb/usbdev.h -if USBDEV source drivers/usbdev/Kconfig -endif # USBDEV menuconfig USBHOST bool "USB Host Driver Support" @@ -315,9 +275,7 @@ menuconfig USBHOST ---help--- USB host drivers. See also include/nuttx/usb/usbhost.h -if USBHOST source drivers/usbhost/Kconfig -endif # USBHOST menuconfig USBMISC bool "USB Miscellaneous drivers" @@ -325,13 +283,7 @@ menuconfig USBMISC ---help--- USB Miscellaneous drivers. -if USBMISC source drivers/usbmisc/Kconfig -endif # USBMISC - -config HAVE_USBTRACE - bool - default n menuconfig USBMONITOR bool "USB Monitor" @@ -343,9 +295,7 @@ menuconfig USBMONITOR monitor. The USB monitor is a daemon that will periodically collect the buffered USB trace data and dump it to the SYSLOG device. -if USBMONITOR source drivers/usbmonitor/Kconfig -endif # USBMONITOR menuconfig DRIVERS_WIRELESS bool "Wireless Device Support" @@ -353,9 +303,7 @@ 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" @@ -363,9 +311,7 @@ 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" @@ -373,10 +319,7 @@ menuconfig 1WIRE ---help--- Drivers for various 1wire devices. -if 1WIRE source drivers/1wire/Kconfig -endif # 1WIRE - source drivers/syslog/Kconfig menuconfig SPECIFIC_DRIVERS @@ -385,9 +328,7 @@ menuconfig SPECIFIC_DRIVERS ---help--- Board specific drivers located in each board/driver folder. -if SPECIFIC_DRIVERS source drivers/platform/Kconfig -endif # SPECIFIC_DRIVERS menuconfig DRIVERS_RF bool "RF Device Support" @@ -395,6 +336,4 @@ menuconfig DRIVERS_RF ---help--- Drivers for various RF devices -if DRIVERS_RF source drivers/rf/Kconfig -endif # DRIVERS_RF diff --git a/drivers/analog/Kconfig b/drivers/analog/Kconfig index a93f6268ddd..608003df26a 100644 --- a/drivers/analog/Kconfig +++ b/drivers/analog/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if ANALOG + config ADC bool "Analog-to-Digital Conversion" default n @@ -185,3 +187,5 @@ config LMP92001_I2C_FREQUENCY int "LMP92001 I2C frequency" default 400000 depends on LMP92001 + +endif # ANALOG diff --git a/drivers/audio/Kconfig b/drivers/audio/Kconfig index ac45db0b2b2..77297878612 100644 --- a/drivers/audio/Kconfig +++ b/drivers/audio/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if DRIVERS_AUDIO + config AUDIO_TONE bool "Audio Tone Generator using PWM" default n @@ -244,3 +246,5 @@ config AUDIO_I2S bool "Audio I2S" depends on AUDIO depends on I2S + +endif # DRIVERS_AUDIO diff --git a/drivers/bch/Kconfig b/drivers/bch/Kconfig index 2a7f8def9ae..0735d37ac69 100644 --- a/drivers/bch/Kconfig +++ b/drivers/bch/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if BCH + config BCH_ENCRYPTION bool "Enable BCH encryption" default n @@ -12,3 +14,5 @@ config BCH_ENCRYPTION_KEY_SIZE int "AES key size" default 16 depends on BCH_ENCRYPTION + +endif # BCH diff --git a/drivers/can/Kconfig b/drivers/can/Kconfig index ec3ba046c1c..8b1b7f41acb 100644 --- a/drivers/can/Kconfig +++ b/drivers/can/Kconfig @@ -3,6 +3,12 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +config ARCH_HAVE_CAN_ERRORS + bool + default n + +if CAN + config CAN_EXTID bool "CAN extended IDs" default n @@ -10,10 +16,6 @@ config CAN_EXTID Enables support for the 29-bit extended ID. Default Standard 11-bit IDs. -config ARCH_HAVE_CAN_ERRORS - bool - default n - config CAN_ERRORS bool "CAN error reporting" default n @@ -177,3 +179,5 @@ config MCP2515_SPI_SCK_FREQUENCY range 100000 10000000 endif # CAN_MCP2515 + +endif diff --git a/drivers/contactless/Kconfig b/drivers/contactless/Kconfig index 89ccbec0a4e..29281c06f0c 100644 --- a/drivers/contactless/Kconfig +++ b/drivers/contactless/Kconfig @@ -3,6 +3,8 @@ # 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 @@ -54,3 +56,5 @@ 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 c7f1b90bc7f..714b00b7c4f 100644 --- a/drivers/eeprom/Kconfig +++ b/drivers/eeprom/Kconfig @@ -3,6 +3,8 @@ # 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 @@ -50,3 +52,5 @@ config AT24CS_UUID This option registers a char device driver with the ".uuid" suffix. endif # I2C_EE_24XX + +endif diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig index 1fcb75c9769..6cbc3db8b43 100644 --- a/drivers/i2c/Kconfig +++ b/drivers/i2c/Kconfig @@ -7,6 +7,8 @@ config ARCH_HAVE_I2CRESET bool default n +if I2C + config I2C_SLAVE bool "I2C Slave" default n @@ -50,3 +52,5 @@ config I2CMULTIPLEXER_PCA9540BDP # put more i2c mux devices here endmenu # I2C Multiplexer Support + +endif diff --git a/drivers/i2s/Kconfig b/drivers/i2s/Kconfig index dee7b2c20d6..aaf5849c788 100644 --- a/drivers/i2s/Kconfig +++ b/drivers/i2s/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if I2S + config AUDIO_I2SCHAR bool "I2S character driver (for testing only)" default n @@ -33,3 +35,5 @@ config AUDIO_I2SCHAR_TXTIMEOUT The special value of zero disables RX timeouts. Default: 0 endif # AUDIO_I2SCHAR + +endif # I2S diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index 090f4f52b46..8cdf2050233 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if INPUT + config MOUSE bool "Enable mouse support" default n @@ -510,3 +512,5 @@ config NUNCHUCK_NPOLLWAITERS default 2 endif # INPUT_NUNCHUCK + +endif # INPUT diff --git a/drivers/mmcsd/Kconfig b/drivers/mmcsd/Kconfig index bf9d9374912..ad3bf87decd 100644 --- a/drivers/mmcsd/Kconfig +++ b/drivers/mmcsd/Kconfig @@ -19,6 +19,8 @@ config ARCH_HAVE_SDIO_DELAYED_INVLDT bool default n +if MMCSD + config MMCSD_NSLOTS int "Number of MMC/SD slots" default 1 @@ -134,3 +136,5 @@ config SDIO_BLOCKSETUP enables the block setup method in the SDIO vtable. endif + +endif # MMCSD diff --git a/drivers/modem/Kconfig b/drivers/modem/Kconfig index 0f2cc66d24a..56424bed8a9 100644 --- a/drivers/modem/Kconfig +++ b/drivers/modem/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if MODEM + config MODEM_U_BLOX bool "Enable u-blox modem driver" default n @@ -20,3 +22,5 @@ config MODEM_U_BLOX_DEBUG source "drivers/modem/altair/Kconfig" + +endif # MODEM diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index e987fd69521..0e5f4362635 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if MTD + comment "MTD Configuration" config MTD_PARTITION @@ -1087,3 +1089,5 @@ config GD5F_SPIFREQUENCY default 20000000 endif # MTD_GD5F + +endif # MTD diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 9781d373258..176e7ac96cb 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if NETDEVICES + comment "General Ethernet MAC Driver Options" config NET_RPMSG_DRV @@ -483,3 +485,5 @@ config NETDEV_PHY_DEBUG the NSH network initialization logic. endif # ARCH_HAVE_PHY + +endif # NETDEVICES diff --git a/drivers/pipes/Kconfig b/drivers/pipes/Kconfig index ace6ca8458d..048b75d476a 100644 --- a/drivers/pipes/Kconfig +++ b/drivers/pipes/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if PIPES + config DEV_PIPE_MAXSIZE int "Maximum pipe/FIFO size" default 1024 if !DEFAULT_SMALL @@ -25,3 +27,5 @@ config DEV_FIFO_SIZE ---help--- Sets the default size of the FIFO ringbuffer in bytes. A value of zero disables FIFO support. + +endif # PIPES diff --git a/drivers/rf/Kconfig b/drivers/rf/Kconfig index 34fcd8c224b..a22cb805114 100644 --- a/drivers/rf/Kconfig +++ b/drivers/rf/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if DRIVERS_RF + config RF_DAT31R5SP bool "Mini-Circuits DAT-31R5-SP digital attenuator support" default n @@ -10,3 +12,5 @@ config RF_DAT31R5SP ---help--- Enable driver support for the Mini-Circuits DAT-31R5-SP digital attenuator. + +endif # DRIVERS_RF diff --git a/drivers/rptun/Kconfig b/drivers/rptun/Kconfig index 31bd62bc514..9e9a7dd25e7 100644 --- a/drivers/rptun/Kconfig +++ b/drivers/rptun/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if RPTUN + config RPTUN_PRIORITY int "rpturn thread priority" default 224 @@ -10,3 +12,5 @@ config RPTUN_PRIORITY config RPTUN_STACKSIZE int "rptun stack size" default 2048 + +endif # RPTUN diff --git a/drivers/sensors/Kconfig b/drivers/sensors/Kconfig index cee929fec0a..af0e707c627 100644 --- a/drivers/sensors/Kconfig +++ b/drivers/sensors/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if SENSORS + config SENSORS_APDS9960 bool "Avago APDS-9960 Gesture Sensor support" default n @@ -843,3 +845,5 @@ config SENSORS_ADT7320 select SPI ---help--- Enables support for the ADT7320 Driver + +endif # SENSORS diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 7ff507f1f7f..1d5133358ea 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -3,6 +3,12 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +config ARCH_HAVE_SERIAL_TERMIOS + bool + default n + +if SERIAL + config DEV_LOWCONSOLE bool "Low-level console support" default n @@ -159,10 +165,6 @@ config SERIAL_TIOCSERGSTRUCT supports the TIOCSERGSTRUCT ioctl, and (2) this option is selected, then support for the TIOCSERGSTRUCT will be enabled. -config ARCH_HAVE_SERIAL_TERMIOS - bool - default n - config SERIAL_TERMIOS bool "Serial TERMIOS support" depends on ARCH_HAVE_SERIAL_TERMIOS @@ -617,3 +619,5 @@ config PSEUDOTERM_TXBUFSIZE Slave-to-master pipe buffer size. Default: 256 endif # PSEUDOTERM + +endif # SERIAL diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index 8724e95ad28..50210bf4406 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -3,6 +3,18 @@ # 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 @@ -13,18 +25,6 @@ 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 c1ef786db65..33fb5eb2256 100644 --- a/drivers/timers/Kconfig +++ b/drivers/timers/Kconfig @@ -5,6 +5,14 @@ menu "Timer Driver Support" +config ARCH_HAVE_PWM_PULSECOUNT + bool + default n + +config ARCH_HAVE_PWM_MULTICHAN + bool + default n + config PWM bool "PWM Driver Support" default n @@ -14,14 +22,6 @@ 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/usbdev/Kconfig b/drivers/usbdev/Kconfig index 4365c944eb4..2e2299bc9e8 100644 --- a/drivers/usbdev/Kconfig +++ b/drivers/usbdev/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if USBDEV + comment "USB Device Controller Driver Options" config USBDEV_ISOCHRONOUS @@ -995,3 +997,5 @@ config CDCECM_PRODUCTSTR endif # !CDCECM_COMPOSITE endif # CDCECM + +endif # USBDEV diff --git a/drivers/usbhost/Kconfig b/drivers/usbhost/Kconfig index a7a3b6c9bea..814cceb2dd0 100644 --- a/drivers/usbhost/Kconfig +++ b/drivers/usbhost/Kconfig @@ -3,6 +3,12 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +config USBHOST_HAVE_ASYNCH + bool + default n + +if USBHOST + config USBHOST_NPREALLOC int "Number of pre-allocated class instances" default 4 @@ -30,10 +36,6 @@ config USBHOST_ISOC_DISABLE On some architectures, selecting this setting will reduce driver size by disabling isochronous endpoint support -config USBHOST_HAVE_ASYNCH - bool - default n - config USBHOST_ASYNCH bool "Asynchronous transfer support" default n @@ -591,3 +593,5 @@ config USBHOST_TRACE_VERBOSE information would also be included. endif + +endif # USBHOST diff --git a/drivers/usbmisc/Kconfig b/drivers/usbmisc/Kconfig index cf2fca823c2..bec538e57ba 100644 --- a/drivers/usbmisc/Kconfig +++ b/drivers/usbmisc/Kconfig @@ -3,6 +3,8 @@ # see misc/tools/kconfig-language.txt. # +if USBMISC + comment "USB Miscellaneous drivers" config FUSB301 @@ -60,3 +62,5 @@ config FUSB303_NPOLLWAITERS Maximum number of threads that can be waiting on poll() endif + +endif # USBMISC diff --git a/drivers/usbmonitor/Kconfig b/drivers/usbmonitor/Kconfig index 25ace5e7d82..97a24923bdd 100644 --- a/drivers/usbmonitor/Kconfig +++ b/drivers/usbmonitor/Kconfig @@ -3,6 +3,12 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +config HAVE_USBTRACE + bool + default n + +if USBMONITOR + config USBMONITOR_STACKSIZE int "USB Monitor daemon stack size" default 2048 @@ -55,3 +61,5 @@ config USBMONITOR_TRACEINTERRUPTS Show interrupt-related events endif # USBDEV && USBDEV_TRACE + +endif # USBMONITOR diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index fe240b43747..0cacc82ae03 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if DRIVERS_VIDEO + config VIDEO_FB bool "Framebuffer character driver" default n @@ -163,3 +165,5 @@ config OV2640_REGDEBUG Enable details, register level debug output. endif + +endif # DRIVERS_VIDEO diff --git a/drivers/wireless/Kconfig b/drivers/wireless/Kconfig index 36c170462e3..299b6648e9f 100644 --- a/drivers/wireless/Kconfig +++ b/drivers/wireless/Kconfig @@ -3,6 +3,8 @@ # see the file kconfig-language.txt in the NuttX tools repository. # +if DRIVERS_WIRELESS + config WL_CC1101 bool "CC1101 RF transceiver support" default n @@ -132,3 +134,5 @@ config WL_NRF24L01_RXFIFO_LEN endif # WL_NRF24L01_RXSUPPORT endif # WL_NRF24L01 + +endif # DRIVERS_WIRELESS