iio: adxl372: Refactor the driver
This patch restructures the existing adxl372 driver by adding a module for
SPI and a header file, while the baseline module deals with the chip-logic.
This is a necessary step, as this driver should support in the future
a similar device which differs only in the type of interface used (I2C
instead of SPI).
Signed-off-by: Stefan Popa <stefan.popa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
diff --git a/drivers/iio/accel/Kconfig b/drivers/iio/accel/Kconfig
index eae23d6..bed5da8 100644
--- a/drivers/iio/accel/Kconfig
+++ b/drivers/iio/accel/Kconfig
@@ -61,15 +61,20 @@
for the core module.
config ADXL372
- tristate "Analog Devices ADXL372 3-Axis Accelerometer Driver"
- depends on SPI
+ tristate
select IIO_BUFFER
select IIO_TRIGGERED_BUFFER
+
+config ADXL372_SPI
+ tristate "Analog Devices ADXL372 3-Axis Accelerometer SPI Driver"
+ depends on SPI
+ select ADXL372
+ select REGMAP_SPI
help
Say yes here to add support for the Analog Devices ADXL372 triaxial
acceleration sensor.
To compile this driver as a module, choose M here: the
- module will be called adxl372.
+ module will be called adxl372_spi.
config BMA180
tristate "Bosch BMA180/BMA250 3-Axis Accelerometer Driver"