sensors: dts: cleanup usage of HAS_DTS_I2C_DEVICE

Move to new Kconfig pattern in which we use an if !HAS_DTS_I2C_DEVICE
block for the Kconfig symbols that can now come from DT generation.
This pattern is useful to allow us to define default values for the
generated symbols for build-all testing.

Fixes: #5877

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2018-01-29 16:57:22 -06:00 committed by Anas Nashif
commit b51cfeae60
4 changed files with 28 additions and 12 deletions

View file

@ -12,18 +12,20 @@ menuconfig LIS3MDL
help
Enable driver for LIS3MDL I2C-based magnetometer.
if !HAS_DTS_I2C_DEVICE
config LIS3MDL_NAME
string
prompt "Driver name"
default "LIS3MDL"
depends on LIS3MDL && !HAS_DTS_I2C_DEVICE
depends on LIS3MDL
help
Device name with which the LIS3MDL sensor is identified.
config LIS3MDL_I2C_ADDR
hex
prompt "I2C address"
depends on LIS3MDL && !HAS_DTS_I2C_DEVICE
depends on LIS3MDL
default 0x1C
help
I2C address of the LIS3MDL sensor.
@ -33,12 +35,14 @@ config LIS3MDL_I2C_ADDR
config LIS3MDL_I2C_MASTER_DEV_NAME
string
prompt "I2C master where LIS3MDL is connected"
depends on LIS3MDL && !HAS_DTS_I2C_DEVICE
depends on LIS3MDL
default "I2C_0"
help
Specify the device name of the I2C master device to which LIS3MDL is
connected.
endif
choice
prompt "Trigger mode"
depends on LIS3MDL