Skip to content

Commit

Permalink
drivers: nrf: Enable nRF drivers by default in Kconfig
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
anangl authored and carlescufi committed Dec 21, 2018
1 parent 7c13ba9 commit 4b43065
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 2 additions & 0 deletions drivers/adc/Kconfig.nrfx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions drivers/gpio/Kconfig.nrfx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

menuconfig GPIO_NRFX
bool "nRF GPIO driver"
default y
depends on SOC_FAMILY_NRF
select HAS_DTS_GPIO
help
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/Kconfig.nrfx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

menuconfig I2C_NRFX
bool "nRF TWI nrfx drivers"
default y
depends on SOC_FAMILY_NRF
select HAS_DTS_I2C
help
Expand Down
1 change: 1 addition & 0 deletions drivers/serial/Kconfig.nrfx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions drivers/spi/Kconfig.nrfx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/device/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions soc/arm/nordic_nrf/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4b43065

Please sign in to comment.