From 2b72283bda69b3dedc3d6a1418cf59e37ac9ad57 Mon Sep 17 00:00:00 2001 From: Maureen Helm Date: Sun, 16 Sep 2018 19:23:36 -0500 Subject: [PATCH] drivers: sensor: Remove Kconfigs conditioned upon !HAS_DTS_I2C Make device tree required for these sensor drivers. Signed-off-by: Maureen Helm --- drivers/sensor/adt7420/Kconfig | 30 +----------------------------- drivers/sensor/adxl372/Kconfig | 29 +---------------------------- drivers/sensor/apds9960/Kconfig | 19 +------------------ drivers/sensor/ccs811/Kconfig | 28 +--------------------------- drivers/sensor/fxas21002/Kconfig | 22 +--------------------- drivers/sensor/fxos8700/Kconfig | 22 +--------------------- drivers/sensor/hdc1008/Kconfig | 28 +--------------------------- drivers/sensor/hts221/Kconfig | 19 +------------------ drivers/sensor/lis3mdl/Kconfig | 27 +-------------------------- drivers/sensor/lps22hb/Kconfig | 28 +--------------------------- drivers/sensor/lps25hb/Kconfig | 27 +-------------------------- drivers/sensor/lsm6ds0/Kconfig | 25 +------------------------ drivers/sensor/lsm6dsl/Kconfig | 26 ++------------------------ drivers/sensor/max30101/Kconfig | 14 +------------- drivers/sensor/mma8451q/Kconfig | 21 +-------------------- drivers/sensor/vl53l0x/Kconfig | 25 +------------------------ 16 files changed, 17 insertions(+), 373 deletions(-) diff --git a/drivers/sensor/adt7420/Kconfig b/drivers/sensor/adt7420/Kconfig index 3fc9323e647..d79bd0f70c4 100644 --- a/drivers/sensor/adt7420/Kconfig +++ b/drivers/sensor/adt7420/Kconfig @@ -7,41 +7,13 @@ menuconfig ADT7420 bool "ADT7420 Temperature Sensor" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable the driver for Analog Devices ADT7420 High-Accuracy 16-bit Digital I2C Temperature Sensors. if ADT7420 -if !HAS_DTS_I2C - -config ADT7420_NAME - string "Driver name" - default "ADT7420" - help - Device name with which the ADT7420 sensor is identified. - -config ADT7420_I2C_ADDR - hex "I2C address for ADT7420" - default 0x48 - help - I2C address of the ADT7420 sensor. - - 0x48: A0 connected GND and A1 connected to GND. - 0x49: A0 connected VDD and A1 connected to GND. - 0x4A: A0 connected GND and A1 connected to VDD. - 0x4B: A0 connected VDD and A1 connected to VDD. - -config ADT7420_I2C_MASTER_DEV_NAME - string "I2C master where ADT7420 is connected" - default "I2C_0" - help - Specify the device name of the I2C master device to which the - ADT7420 chip is connected. - -endif # !HAS_DTS_I2C - config ADT7420_TEMP_HYST int "Temperature hysteresis in °C" range 0 15 diff --git a/drivers/sensor/adxl372/Kconfig b/drivers/sensor/adxl372/Kconfig index f1329625d86..70a4e26dfa6 100644 --- a/drivers/sensor/adxl372/Kconfig +++ b/drivers/sensor/adxl372/Kconfig @@ -7,7 +7,7 @@ menuconfig ADXL372 bool "ADXL372 Three Axis High-g I2C/SPI accelerometer" - depends on I2C || SPI + depends on (I2C && HAS_DTS_I2C) || SPI help Enable driver for ADXL372 Three-Axis Digital Accelerometers. @@ -28,33 +28,6 @@ config ADXL372_SPI endchoice -if !HAS_DTS_I2C - -config ADXL372_DEV_NAME - string "ADXL372 device name" - depends on ADXL372_I2C - default "ADXL372" - -config ADXL372_I2C_ADDR - hex "I2C address for ADXL372" - depends on ADXL372_I2C - default 0x1D - help - I2C address of the ADXL372 sensor. - - 0x1D: if MISO is pulled low - 0x53: if MISO is pulled high - -config ADXL372_I2C_MASTER_DEV_NAME - string "I2C master where ADXL372 is connected" - depends on ADXL372_I2C - default "I2C_0" - help - Specify the device name of the I2C master device to which the - ADXL372 chip is connected. - -endif # !HAS_DTS_I2C - if !HAS_DTS_SPI config ADXL372_DEV_NAME diff --git a/drivers/sensor/apds9960/Kconfig b/drivers/sensor/apds9960/Kconfig index 59aee6969c5..a40f1c16bdb 100644 --- a/drivers/sensor/apds9960/Kconfig +++ b/drivers/sensor/apds9960/Kconfig @@ -7,29 +7,12 @@ menuconfig APDS9960 bool "APDS9960 Sensor" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable driver for APDS9960 sensors. if APDS9960 -if !HAS_DTS_I2C - -config APDS9960_I2C_DEV_NAME - string "I2C Master" - default "I2C_0" - help - The device name of the I2C master device to which the APDS9960 - chip is connected. - -config APDS9960_DRV_NAME - string "Driver name" - default "APDS9960" - help - Device name with which the APDS9960 is identified. - -endif # !HAS_DTS_I2C - if !HAS_DTS_GPIO config APDS9960_GPIO_DEV_NAME diff --git a/drivers/sensor/ccs811/Kconfig b/drivers/sensor/ccs811/Kconfig index 78156fbda1e..bf028c7b975 100644 --- a/drivers/sensor/ccs811/Kconfig +++ b/drivers/sensor/ccs811/Kconfig @@ -8,38 +8,12 @@ menuconfig CCS811 bool "CCS811 Digital Gas Sensor" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable driver for CCS811 Gas sensors. if CCS811 -if !HAS_DTS_I2C - -config CCS811_NAME - string "Driver name" - default "CCS811" - help - Device name with which the CCS811 sensor is identified. - -config CCS811_I2C_ADDR - hex "I2C address for CCS811 Sensor" - range 0x5a 0x5b - default "0x5b" - help - I2C address of the CCS811 sensor. - 0x5a: I2C_ADDR connected to GND. - 0x5b: I2C_ADDR connected to VDD. - -config CCS811_I2C_MASTER_DEV_NAME - string "I2C master where CCS811 is connected" - default "I2C_1" - help - Specify the device name of the I2C master device to which the - CCS811 chip is connected. - -endif - config CCS811_GPIO_DEV_NAME string "GPIO device" default "GPIOC" diff --git a/drivers/sensor/fxas21002/Kconfig b/drivers/sensor/fxas21002/Kconfig index 63957757ccf..442a1ddc878 100644 --- a/drivers/sensor/fxas21002/Kconfig +++ b/drivers/sensor/fxas21002/Kconfig @@ -7,32 +7,12 @@ menuconfig FXAS21002 bool "FXAS21002 gyroscope driver" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable driver for the FXAS21002 gyroscope if FXAS21002 -if !HAS_DTS_I2C - -config FXAS21002_NAME - string "Device name" - default "FXAS21002" - -config FXAS21002_I2C_NAME - string "I2C device name" - default I2C_0_NAME - -config FXAS21002_I2C_ADDRESS - hex "I2C address" - range 0x20 0x21 - default 0x20 - help - The I2C slave address can be configured by the SA0 input pin. This - option should usually be set by the board defconfig. - -endif # !HAS_DTS_I2C - config FXAS21002_WHOAMI hex "WHOAMI value" range 0x00 0xff diff --git a/drivers/sensor/fxos8700/Kconfig b/drivers/sensor/fxos8700/Kconfig index 4fbb409564c..c959aefc021 100644 --- a/drivers/sensor/fxos8700/Kconfig +++ b/drivers/sensor/fxos8700/Kconfig @@ -7,32 +7,12 @@ menuconfig FXOS8700 bool "FXOS8700 accelerometer/magnetometer driver" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable driver for the FXOS8700 accelerometer/magnetometer if FXOS8700 -if !HAS_DTS_I2C - -config FXOS8700_NAME - string "Device name" - default "FXOS8700" - -config FXOS8700_I2C_NAME - string "I2C device name" - default I2C_0_NAME - -config FXOS8700_I2C_ADDRESS - hex "I2C address" - range 0x1c 0x1f - default 0x1d - help - The I2C slave address can be configured by the SA0 and SA1 input - pins. This option should usually be set by the board defconfig. - -endif # !HAS_DTS_I2C - config FXOS8700_WHOAMI hex "WHOAMI value" range 0x00 0xff diff --git a/drivers/sensor/hdc1008/Kconfig b/drivers/sensor/hdc1008/Kconfig index ba0b719f212..562cf63ded5 100644 --- a/drivers/sensor/hdc1008/Kconfig +++ b/drivers/sensor/hdc1008/Kconfig @@ -8,38 +8,12 @@ menuconfig HDC1008 bool "HDC1008 Temperature and Humidity Sensor" - depends on I2C && GPIO + depends on I2C && HAS_DTS_I2C && GPIO help Enable driver for HDC1008 temperature and humidity sensors. if HDC1008 -if !HAS_DTS_I2C - -config HDC1008_NAME - string "Driver name" - default "HDC1008" - help - Device name with which the HDC1008 sensor is identified. - -config HDC1008_I2C_ADDR - hex "I2C Address for HDC1008" - default "0x40" - help - 0x40: A0 connected GND and A1 connected to GND. - 0x41: A0 connected VDD and A1 connected to GND. - 0x42: A0 connected GND and A1 connected to VDD. - 0x43: A0 connected VDD and A1 connected to VDD. - -config HDC1008_I2C_MASTER_DEV_NAME - string "I2C master where HDC1008 is connected" - default "I2C_0" - help - Specify the device name of the I2C master device to which the - HDC1008 chip is connected. - -endif # !HAS_DTS_I2C - if !HAS_DTS_GPIO config HDC1008_GPIO_DEV_NAME diff --git a/drivers/sensor/hts221/Kconfig b/drivers/sensor/hts221/Kconfig index 1b40be449ea..7df2d09e639 100644 --- a/drivers/sensor/hts221/Kconfig +++ b/drivers/sensor/hts221/Kconfig @@ -6,29 +6,12 @@ menuconfig HTS221 bool "HTS221 temperature and humidity sensor" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable driver for HTS221 I2C-based temperature and humidity sensor. if HTS221 -if !HAS_DTS_I2C - -config HTS221_NAME - string "Driver name" - default "HTS221" - help - Device name with which the HTS221 sensor is identified. - -config HTS221_I2C_MASTER_DEV_NAME - string "I2C master where HTS221 is connected" - default "I2C_0" - help - Specify the device name of the I2C master device to which HTS221 is - connected. - -endif - choice HTS221_TRIGGER_MODE prompt "Trigger mode" default HTS221_TRIGGER_GLOBAL_THREAD diff --git a/drivers/sensor/lis3mdl/Kconfig b/drivers/sensor/lis3mdl/Kconfig index 608a581c1fe..1fe45b61ac1 100644 --- a/drivers/sensor/lis3mdl/Kconfig +++ b/drivers/sensor/lis3mdl/Kconfig @@ -6,37 +6,12 @@ menuconfig LIS3MDL bool "LIS3MDL magnetometer" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable driver for LIS3MDL I2C-based magnetometer. if LIS3MDL -if !HAS_DTS_I2C - -config LIS3MDL_NAME - string "Driver name" - default "LIS3MDL" - help - Device name with which the LIS3MDL sensor is identified. - -config LIS3MDL_I2C_ADDR - hex "I2C address" - default 0x1C - help - I2C address of the LIS3MDL sensor. - Use 0x1C if the SA1 pin is pulled to GND or 0x1E if the SA1 pin - is pulled to VDD. - -config LIS3MDL_I2C_MASTER_DEV_NAME - string "I2C master where LIS3MDL is connected" - default "I2C_0" - help - Specify the device name of the I2C master device to which LIS3MDL is - connected. - -endif - choice LIS3MDL_TRIGGER_MODE prompt "Trigger mode" default LIS3MDL_TRIGGER_GLOBAL_THREAD diff --git a/drivers/sensor/lps22hb/Kconfig b/drivers/sensor/lps22hb/Kconfig index 859663d817e..05933c7d16b 100644 --- a/drivers/sensor/lps22hb/Kconfig +++ b/drivers/sensor/lps22hb/Kconfig @@ -6,39 +6,13 @@ menuconfig LPS22HB bool "LPS22HB pressure and temperature" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable driver for LPS22HB I2C-based pressure and temperature sensor. if LPS22HB -if !HAS_DTS_I2C - -config LPS22HB_DEV_NAME - string "Device name" - default "LPS22HB" - help - Device name used for LPS22HB sensor identification. - -config LPS22HB_I2C_ADDR - hex "I2C address" - default 0x5D - range 0x5C 0x5D - help - I2C address of the LPS22HB sensor. - Use 0x5C if the SA0 pin is pulled to GND or 0x5D if the SA0 - pin is pulled to VDD. - -config LPS22HB_I2C_MASTER_DEV_NAME - string "I2C master where LPS22HB is connected" - default I2C_0_NAME - help - Specify the device name of the I2C master device to which - LPS22HB is connected. - -endif - menu "Attributes" config LPS22HB_SAMPLING_RATE diff --git a/drivers/sensor/lps25hb/Kconfig b/drivers/sensor/lps25hb/Kconfig index cb905293978..38347e34d96 100644 --- a/drivers/sensor/lps25hb/Kconfig +++ b/drivers/sensor/lps25hb/Kconfig @@ -6,38 +6,13 @@ menuconfig LPS25HB bool "LPS25HB pressure and temperature" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable driver for LPS25HB I2C-based pressure and temperature sensor. if LPS25HB -if !HAS_DTS_I2C - -config LPS25HB_DEV_NAME - string "Device name" - default "lps25hb" - help - Device name with which the LPS25HB sensor is identified. - -config LPS25HB_I2C_ADDR - hex "I2C address" - default "0x5C" - help - I2C address of the LPS25HB sensor. - Use 0x5C if the SA0 pin is pulled to GND or 0x5D if the SA0 - pin is pulled to VDD. - -config LPS25HB_I2C_MASTER_DEV_NAME - string "I2C master where LPS25HB is connected" - default "I2C_0" - help - Specify the device name of the I2C master device to which - LPS25HB is connected. - -endif - menu "Attributes" config LPS25HB_SAMPLING_RATE diff --git a/drivers/sensor/lsm6ds0/Kconfig b/drivers/sensor/lsm6ds0/Kconfig index 40acbeb0410..833a33b803a 100644 --- a/drivers/sensor/lsm6ds0/Kconfig +++ b/drivers/sensor/lsm6ds0/Kconfig @@ -9,36 +9,13 @@ menuconfig LSM6DS0 bool "LSM6DS0 I2C accelerometer and gyroscope Chip" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable driver for LSM6DS0 I2C-based accelerometer and gyroscope sensor. if LSM6DS0 -if !HAS_DTS_I2C - -config LSM6DS0_DEV_NAME - string "LSM6DS0 device name" - default "lsm6ds0" - -config LSM6DS0_I2C_ADDR - hex "LSM6DS0 I2C address" - default 0x6B - help - I2C address of the LSM6DS0 sensor. - Use 0x6A if the SA0 pin is pulled to GND or 0x6B if the SA0 pin - is pulled to VCC. - -config LSM6DS0_I2C_MASTER_DEV_NAME - string "I2C master where LSM6DS0 chip is connected" - default "I2C_0" - help - Specify the device name of the I2C master device to which LSM6DS0 is - connected. - -endif - config LSM6DS0_ACCEL_ENABLE_X_AXIS bool "Enable accelerometer X axis" default y diff --git a/drivers/sensor/lsm6dsl/Kconfig b/drivers/sensor/lsm6dsl/Kconfig index d874adc4ec0..44af555bc34 100644 --- a/drivers/sensor/lsm6dsl/Kconfig +++ b/drivers/sensor/lsm6dsl/Kconfig @@ -9,7 +9,7 @@ menuconfig LSM6DSL bool "LSM6DSL I2C/SPI accelerometer and gyroscope Chip" - depends on I2C || SPI + depends on (I2C && HAS_DTS_I2C) || SPI help Enable driver for LSM6DSL accelerometer and gyroscope sensor. @@ -33,31 +33,9 @@ endchoice config LSM6DSL_DEV_NAME string "LSM6DSL device name" - depends on (LSM6DSL_I2C && !HAS_DTS_I2C) || LSM6DSL_SPI + depends on LSM6DSL_SPI default "LSM6DSL" -if !HAS_DTS_I2C - -config LSM6DSL_I2C_ADDR - hex "LSM6DSL I2C address" - depends on LSM6DSL_I2C - default 0x6A - range 0x6A 0x6B - help - I2C address of the LSM6DSL sensor. - Use 0x6A if the SA0 pin is pulled to GND or 0x6B if the SA0 pin - is pulled to VCC. - -config LSM6DSL_I2C_MASTER_DEV_NAME - string "I2C master name where LSM6DSL chip is connected" - depends on LSM6DSL_I2C - default "I2C_2" - help - Specify the device name of the I2C master device to which LSM6DSL is - connected. - -endif #HAS_DTS_I2C - if !HAS_DTS_SPI config LSM6DSL_SPI_SELECT_SLAVE diff --git a/drivers/sensor/max30101/Kconfig b/drivers/sensor/max30101/Kconfig index 3122ef0a4ee..233f8e2a92f 100644 --- a/drivers/sensor/max30101/Kconfig +++ b/drivers/sensor/max30101/Kconfig @@ -7,22 +7,10 @@ menuconfig MAX30101 bool "MAX30101 Pulse Oximeter and Heart Rate Sensor" - depends on I2C + depends on I2C && HAS_DTS_I2C if MAX30101 -if !HAS_DTS_I2C - -config MAX30101_NAME - string "Driver name" - default "MAX30101" - -config MAX30101_I2C_NAME - string "I2C device name" - default "I2C_0" - -endif # !HAS_DTS_I2C - config MAX30101_SMP_AVE int "Sample averaging" range 0 7 diff --git a/drivers/sensor/mma8451q/Kconfig b/drivers/sensor/mma8451q/Kconfig index eb439dfbcc2..6ad65361f2a 100644 --- a/drivers/sensor/mma8451q/Kconfig +++ b/drivers/sensor/mma8451q/Kconfig @@ -7,31 +7,12 @@ menuconfig MMA8451Q bool "MMA8451Q Accelerometer driver" - depends on I2C + depends on I2C && HAS_DTS_I2C help Enable driver for MMA8451Q Accelerometer. if MMA8451Q -if !HAS_DTS_I2C - -config MMA8451Q_NAME - string "Device name" - default "MMA8451Q" - -config MMA8451Q_I2C_NAME - string "I2C device name" - default I2C_0_NAME - -config MMA8451Q_I2C_ADDRESS - hex "I2C address for MMA8451Q Sensor" - default 0x1D - help - I2C address of the MMA8451Q sensor. - 0x1D: I2C_ADDR - -endif # !HAS_DTS_I2C - config MMA8451Q_WHOAMI hex "WHOAMI value" default 0x1A diff --git a/drivers/sensor/vl53l0x/Kconfig b/drivers/sensor/vl53l0x/Kconfig index b9157fbf1ff..374df54ae09 100644 --- a/drivers/sensor/vl53l0x/Kconfig +++ b/drivers/sensor/vl53l0x/Kconfig @@ -8,36 +8,13 @@ menuconfig VL53L0X bool "VL53L0X time of flight sensor" - depends on I2C + depends on I2C && HAS_DTS_I2C select HAS_STLIB help Enable driver for VL53L0X I2C-based time of flight sensor. if VL53L0X -if !HAS_DTS_I2C - -config VL53L0X_NAME - string "Driver name" - default "VL53L0X" - help - Device name with which the VL53L0X sensor is identified. - -config VL53L0X_I2C_ADDR - hex "Vl53l0x I2C address" - default 0x29 - help - address of the i2c used for the vl53l0x sensor - -config VL53L0X_I2C_MASTER_DEV_NAME - string "I2C master where VL53L0X is connected" - default "I2C_0" - help - Specify the device name of the I2C master device to which VL53L0X is - connected. - -endif - config VL53L0X_XSHUT_CONTROL_ENABLE bool "Enable XSHUT pin control" help