spi: Fix Kconfig warning

This commit moves the ARCH_HAVE_SPI options outside the check
for SPI. Those options don't depend on SPI, and Kconfig files
in arch/ enable them even if SPI isn't enabled.

Sourcing the driver's Kconfig in drivers/Kconfig only if
support for the driver is enabled prevents us from defining
these ARCH_HAVE options in the driver's Kconfig. We should
probably remove the other checks in drivers/Kconfig and check
if the drivers are enabled only in their Kconfig.
This commit is contained in:
Paul A. Patience 2016-11-02 12:58:29 -04:00
parent b738a646ad
commit d89765e1d0
2 changed files with 12 additions and 14 deletions

View File

@ -345,9 +345,7 @@ menuconfig SPI
should be enabled by all platforms that support SPI interfaces.
See include/nuttx/spi/spi.h for further SPI driver information.
if SPI
source drivers/spi/Kconfig
endif
menuconfig I2S
bool "I2S Driver Support"

View File

@ -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
if SPI
config SPI_SLAVE
@ -55,10 +67,6 @@ config SPI_HWFEATURES
basically the OR of any specific hardware feature and eanbles
the SPI hwfeatures() interface method.
config ARCH_HAVE_SPI_CRCGENERATION
bool
default n
config SPI_CRCGENERATION
bool
default n
@ -69,10 +77,6 @@ config SPI_CRCGENERATION
generation of SPI CRCs. Enables the HWFEAT_CRCGENERATION option
as well as the hwfeartures() interface method.
config ARCH_HAVE_SPI_CS_CONTROL
bool
default n
config SPI_CS_CONTROL
bool "SPI CS Behavior Control"
default n
@ -82,10 +86,6 @@ config SPI_CS_CONTROL
Enables possibilities to define the behavior of CS.
Also enables the hwfeatures() interface method.
config ARCH_HAVE_SPI_BITORDER
bool
default n
config SPI_BITORDER
bool "SPI Bit Order Control"
default n