Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 94dbb46c authored by Stefan Popa's avatar Stefan Popa Committed by Jonathan Cameron
Browse files

iio: adxl372: Add support for I2C communication



The adxl372 is designed to communicate in either SPI or I2C protocol. It
autodetects the format being used, requiring no configuration control to
select the format.

Signed-off-by: default avatarStefan Popa <stefan.popa@analog.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent d9e8fd04
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -549,6 +549,7 @@ W: http://ez.analog.com/community/linux-device-drivers
S:	Supported
S:	Supported
F:	drivers/iio/accel/adxl372.c
F:	drivers/iio/accel/adxl372.c
F:	drivers/iio/accel/adxl372_spi.c
F:	drivers/iio/accel/adxl372_spi.c
F:	drivers/iio/accel/adxl372_i2c.c
F:	Documentation/devicetree/bindings/iio/accel/adxl372.txt
F:	Documentation/devicetree/bindings/iio/accel/adxl372.txt


AF9013 MEDIA DRIVER
AF9013 MEDIA DRIVER
+11 −0
Original line number Original line Diff line number Diff line
@@ -76,6 +76,17 @@ config ADXL372_SPI
	  To compile this driver as a module, choose M here: the
	  To compile this driver as a module, choose M here: the
	  module will be called adxl372_spi.
	  module will be called adxl372_spi.


config ADXL372_I2C
	tristate "Analog Devices ADXL372 3-Axis Accelerometer I2C Driver"
	depends on I2C
	select ADXL372
	select REGMAP_I2C
	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_i2c.

config BMA180
config BMA180
	tristate "Bosch BMA180/BMA250 3-Axis Accelerometer Driver"
	tristate "Bosch BMA180/BMA250 3-Axis Accelerometer Driver"
	depends on I2C
	depends on I2C
+1 −0
Original line number Original line Diff line number Diff line
@@ -10,6 +10,7 @@ obj-$(CONFIG_ADXL345) += adxl345_core.o
obj-$(CONFIG_ADXL345_I2C) += adxl345_i2c.o
obj-$(CONFIG_ADXL345_I2C) += adxl345_i2c.o
obj-$(CONFIG_ADXL345_SPI) += adxl345_spi.o
obj-$(CONFIG_ADXL345_SPI) += adxl345_spi.o
obj-$(CONFIG_ADXL372) += adxl372.o
obj-$(CONFIG_ADXL372) += adxl372.o
obj-$(CONFIG_ADXL372_I2C) += adxl372_i2c.o
obj-$(CONFIG_ADXL372_SPI) += adxl372_spi.o
obj-$(CONFIG_ADXL372_SPI) += adxl372_spi.o
obj-$(CONFIG_BMA180) += bma180.o
obj-$(CONFIG_BMA180) += bma180.o
obj-$(CONFIG_BMA220) += bma220_spi.o
obj-$(CONFIG_BMA220) += bma220_spi.o
+0 −1
Original line number Original line Diff line number Diff line
@@ -26,7 +26,6 @@
#define ADXL372_DEVID			0x00
#define ADXL372_DEVID			0x00
#define ADXL372_DEVID_MST		0x01
#define ADXL372_DEVID_MST		0x01
#define ADXL372_PARTID			0x02
#define ADXL372_PARTID			0x02
#define ADXL372_REVID			0x03
#define ADXL372_STATUS_1		0x04
#define ADXL372_STATUS_1		0x04
#define ADXL372_STATUS_2		0x05
#define ADXL372_STATUS_2		0x05
#define ADXL372_FIFO_ENTRIES_2		0x06
#define ADXL372_FIFO_ENTRIES_2		0x06
+2 −0
Original line number Original line Diff line number Diff line
@@ -8,6 +8,8 @@
#ifndef _ADXL372_H_
#ifndef _ADXL372_H_
#define _ADXL372_H_
#define _ADXL372_H_


#define ADXL372_REVID	0x03

int adxl372_probe(struct device *dev, struct regmap *regmap,
int adxl372_probe(struct device *dev, struct regmap *regmap,
		  int irq, const char *name);
		  int irq, const char *name);
bool adxl372_readable_noinc_reg(struct device *dev, unsigned int reg);
bool adxl372_readable_noinc_reg(struct device *dev, unsigned int reg);
Loading