From 4b43065cfc2f63bbfb577405b9d5bcc41f64d6d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20G=C5=82=C4=85bek?= Date: Tue, 11 Dec 2018 14:22:57 +0100 Subject: [PATCH] drivers: nrf: Enable nRF drivers by default in Kconfig MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make the following nRF peripheral drivers: - ADC - GPIO - I2C - SPI - UART - USB_DEVICE enabled by default so that users do not need to explicitly enable them in their applications after choosing an nRF SoC as the build target. Kconfig options enabling these drivers depend on both a given hardware feature (e.g. I2C) and an nRF family SoC selected, so effectively they will be automatically enabled only when it is adequate (and in most cases these drivers are the only option for a given hardware feature on nRF SoCs). Signed-off-by: Andrzej Głąbek --- drivers/adc/Kconfig.nrfx | 2 ++ drivers/gpio/Kconfig.nrfx | 1 + drivers/i2c/Kconfig.nrfx | 1 + drivers/serial/Kconfig.nrfx | 1 + drivers/spi/Kconfig.nrfx | 1 + drivers/usb/device/Kconfig | 1 + soc/arm/nordic_nrf/Kconfig.defconfig | 7 ------- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/adc/Kconfig.nrfx b/drivers/adc/Kconfig.nrfx index 304b01c212a..1602cdee98c 100644 --- a/drivers/adc/Kconfig.nrfx +++ b/drivers/adc/Kconfig.nrfx @@ -8,6 +8,7 @@ config ADC_NRFX_ADC bool "nRF ADC nrfx driver" + default y depends on HAS_HW_NRF_ADC select NRFX_ADC select ADC_CONFIGURABLE_INPUTS @@ -26,6 +27,7 @@ config ADC_NRFX_ADC_CHANNEL_COUNT config ADC_NRFX_SAADC bool "nRF SAADC nrfx driver" + default y depends on HAS_HW_NRF_SAADC select ADC_CONFIGURABLE_INPUTS help diff --git a/drivers/gpio/Kconfig.nrfx b/drivers/gpio/Kconfig.nrfx index 563b8a43122..83b78050a89 100644 --- a/drivers/gpio/Kconfig.nrfx +++ b/drivers/gpio/Kconfig.nrfx @@ -5,6 +5,7 @@ menuconfig GPIO_NRFX bool "nRF GPIO driver" + default y depends on SOC_FAMILY_NRF select HAS_DTS_GPIO help diff --git a/drivers/i2c/Kconfig.nrfx b/drivers/i2c/Kconfig.nrfx index 70528cfaf6b..5c431a0aaa7 100644 --- a/drivers/i2c/Kconfig.nrfx +++ b/drivers/i2c/Kconfig.nrfx @@ -7,6 +7,7 @@ menuconfig I2C_NRFX bool "nRF TWI nrfx drivers" + default y depends on SOC_FAMILY_NRF select HAS_DTS_I2C help diff --git a/drivers/serial/Kconfig.nrfx b/drivers/serial/Kconfig.nrfx index b3f6cfb3701..f8356a54a80 100644 --- a/drivers/serial/Kconfig.nrfx +++ b/drivers/serial/Kconfig.nrfx @@ -7,6 +7,7 @@ menuconfig UART_NRFX bool "nRF UART nrfx drivers" + default y select SERIAL_HAS_DRIVER select SERIAL_SUPPORT_INTERRUPT depends on SOC_FAMILY_NRF diff --git a/drivers/spi/Kconfig.nrfx b/drivers/spi/Kconfig.nrfx index 6e42df3cc9d..5b9b0e22bfb 100644 --- a/drivers/spi/Kconfig.nrfx +++ b/drivers/spi/Kconfig.nrfx @@ -5,6 +5,7 @@ menuconfig SPI_NRFX bool "nRF SPI nrfx drivers" + default y depends on SOC_FAMILY_NRF help Enable support for nrfx SPI drivers for nRF MCU series. diff --git a/drivers/usb/device/Kconfig b/drivers/usb/device/Kconfig index 5797e209760..6fcd0690b65 100644 --- a/drivers/usb/device/Kconfig +++ b/drivers/usb/device/Kconfig @@ -58,6 +58,7 @@ config USB_DC_SAM config USB_NRF52840 bool "Nordic Semiconductor nRF52840 USB Device Controller Driver" + default y depends on SOC_NRF52840 select USB_DEVICE_DRIVER select HAS_DTS_USB diff --git a/soc/arm/nordic_nrf/Kconfig.defconfig b/soc/arm/nordic_nrf/Kconfig.defconfig index 7148996e6e6..4ca5dacae1f 100644 --- a/soc/arm/nordic_nrf/Kconfig.defconfig +++ b/soc/arm/nordic_nrf/Kconfig.defconfig @@ -12,13 +12,6 @@ source "soc/arm/nordic_nrf/*/Kconfig.defconfig.series" config BUILD_OUTPUT_HEX default y -if GPIO - -config GPIO_NRFX - default y - -endif # GPIO - if FLASH config SOC_FLASH_NRF