Skip to content

Commit

Permalink
iio: accel: Add driver support for ADXL355
Browse files Browse the repository at this point in the history
ADXL355 is a 3-axis MEMS Accelerometer. It offers low noise density,
low 0g offset drift, low power with selectable measurement ranges.
It also features programmable high-pass and low-pass filters.

Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/adxl354_adxl355.pdf
Reviewed-by: Alexandru Ardelean <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Signed-off-by: Puranjay Mohan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
puranjaymohan authored and jic23 committed Sep 14, 2021
1 parent bf43a71 commit 12ed278
Show file tree
Hide file tree
Showing 7 changed files with 802 additions and 0 deletions.
10 changes: 10 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,16 @@ W: http://ez.analog.com/community/linux-device-drivers
F: Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
F: drivers/input/misc/adxl34x.c

ADXL355 THREE-AXIS DIGITAL ACCELEROMETER DRIVER
M: Puranjay Mohan <[email protected]>
L: [email protected]
S: Supported
F: Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
F: drivers/iio/accel/adxl355.h
F: drivers/iio/accel/adxl355_core.c
F: drivers/iio/accel/adxl355_i2c.c
F: drivers/iio/accel/adxl355_spi.c

ADXL372 THREE-AXIS DIGITAL ACCELEROMETER DRIVER
M: Michael Hennerich <[email protected]>
S: Supported
Expand Down
29 changes: 29 additions & 0 deletions drivers/iio/accel/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,35 @@ config ADXL345_SPI
will be called adxl345_spi and you will also get adxl345_core
for the core module.

config ADXL355
tristate

config ADXL355_I2C
tristate "Analog Devices ADXL355 3-Axis Digital Accelerometer I2C Driver"
depends on I2C
select ADXL355
select REGMAP_I2C
help
Say Y here if you want to build i2c support for the Analog Devices
ADXL355 3-axis digital accelerometer.

To compile this driver as a module, choose M here: the module
will be called adxl355_i2c and you will also get adxl355_core
for the core module.

config ADXL355_SPI
tristate "Analog Devices ADXL355 3-Axis Digital Accelerometer SPI Driver"
depends on SPI
select ADXL355
select REGMAP_SPI
help
Say Y here if you want to build spi support for the Analog Devices
ADXL355 3-axis digital accelerometer.

To compile this driver as a module, choose M here: the module
will be called adxl355_spi and you will also get adxl355_core
for the core module.

config ADXL372
tristate
select IIO_BUFFER
Expand Down
3 changes: 3 additions & 0 deletions drivers/iio/accel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ obj-$(CONFIG_ADIS16209) += adis16209.o
obj-$(CONFIG_ADXL345) += adxl345_core.o
obj-$(CONFIG_ADXL345_I2C) += adxl345_i2c.o
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_ADXL372) += adxl372.o
obj-$(CONFIG_ADXL372_I2C) += adxl372_i2c.o
obj-$(CONFIG_ADXL372_SPI) += adxl372_spi.o
Expand Down
21 changes: 21 additions & 0 deletions drivers/iio/accel/adxl355.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* ADXL355 3-Axis Digital Accelerometer
*
* Copyright (c) 2021 Puranjay Mohan <[email protected]>
*/

#ifndef _ADXL355_H_
#define _ADXL355_H_

#include <linux/regmap.h>

struct device;

extern const struct regmap_access_table adxl355_readable_regs_tbl;
extern const struct regmap_access_table adxl355_writeable_regs_tbl;

int adxl355_core_probe(struct device *dev, struct regmap *regmap,
const char *name);

#endif /* _ADXL355_H_ */
Loading

0 comments on commit 12ed278

Please sign in to comment.