Commit cbab791c authored by Cosmin Tanislav's avatar Cosmin Tanislav Committed by Jonathan Cameron
Browse files

iio: accel: add ADXL367 driver



The ADXL367 is an ultralow power, 3-axis MEMS accelerometer.

The ADXL367 does not alias input signals to achieve ultralow power
consumption, it samples the full bandwidth of the sensor at all
data rates. Measurement ranges of +-2g, +-4g, and +-8g are available,
with a resolution of 0.25mg/LSB on the +-2 g range.

In addition to its ultralow power consumption, the ADXL367
has many features to enable true system level power reduction.
It includes a deep multimode output FIFO, a built-in micropower
temperature sensor, and an internal ADC for synchronous conversion
of an additional analog input.

Signed-off-by: default avatarCosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20220214073810.781016-6-cosmin.tanislav@analog.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 27ae7f9d
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -606,6 +606,14 @@ F: drivers/iio/accel/adxl355_core.c
F:	drivers/iio/accel/adxl355_i2c.c
F:	drivers/iio/accel/adxl355_spi.c
ADXL367 THREE-AXIS DIGITAL ACCELEROMETER DRIVER
M:	Cosmin Tanislav <cosmin.tanislav@analog.com>
L:	linux-iio@vger.kernel.org
S:	Supported
W:	http://ez.analog.com/community/linux-device-drivers
F:	Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
F:	drivers/iio/accel/adxl367*
ADXL372 THREE-AXIS DIGITAL ACCELEROMETER DRIVER
M:	Michael Hennerich <michael.hennerich@analog.com>
S:	Supported
+27 −0
Original line number Diff line number Diff line
@@ -123,6 +123,33 @@ config ADXL355_SPI
	  will be called adxl355_spi and you will also get adxl355_core
	  for the core module.

config ADXL367
	tristate
	select IIO_BUFFER
	select IIO_TRIGGERED_BUFFER

config ADXL367_SPI
	tristate "Analog Devices ADXL367 3-Axis Accelerometer SPI Driver"
	depends on SPI
	select ADXL367
	select REGMAP_SPI
	help
	  Say yes here to add support for the Analog Devices ADXL367 triaxial
	  acceleration sensor.
	  To compile this driver as a module, choose M here: the
	  module will be called adxl367_spi.

config ADXL367_I2C
	tristate "Analog Devices ADXL367 3-Axis Accelerometer I2C Driver"
	depends on I2C
	select ADXL367
	select REGMAP_I2C
	help
	  Say yes here to add support for the Analog Devices ADXL367 triaxial
	  acceleration sensor.
	  To compile this driver as a module, choose M here: the
	  module will be called adxl367_i2c.

config ADXL372
	tristate
	select IIO_BUFFER
+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,9 @@ obj-$(CONFIG_ADXL345_SPI) += adxl345_spi.o
obj-$(CONFIG_ADXL355) += adxl355_core.o
obj-$(CONFIG_ADXL355_I2C) += adxl355_i2c.o
obj-$(CONFIG_ADXL355_SPI) += adxl355_spi.o
obj-$(CONFIG_ADXL367) += adxl367.o
obj-$(CONFIG_ADXL367_I2C) += adxl367_i2c.o
obj-$(CONFIG_ADXL367_SPI) += adxl367_spi.o
obj-$(CONFIG_ADXL372) += adxl372.o
obj-$(CONFIG_ADXL372_I2C) += adxl372_i2c.o
obj-$(CONFIG_ADXL372_SPI) += adxl372_spi.o
+1588 −0

File added.

Preview size limit exceeded, changes collapsed.

+23 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (C) 2021 Analog Devices, Inc.
 * Author: Cosmin Tanislav <cosmin.tanislav@analog.com>
 */

#ifndef _ADXL367_H_
#define _ADXL367_H_

#include <linux/types.h>

struct device;
struct regmap;

struct adxl367_ops {
	int (*read_fifo)(void *context, __be16 *fifo_buf,
			 unsigned int fifo_entries);
};

int adxl367_probe(struct device *dev, const struct adxl367_ops *ops,
		  void *context, struct regmap *regmap, int irq);

#endif /* _ADXL367_H_ */
Loading