xref: /linux/drivers/iio/accel/adxl372.h (revision cb4eb6771c0f8fd1c52a8f6fdec7762fb087380a)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * ADXL371/ADXL372 3-Axis Digital Accelerometer
4  *
5  * Copyright 2018 Analog Devices Inc.
6  */
7 
8 #ifndef _ADXL372_H_
9 #define _ADXL372_H_
10 
11 #define ADXL372_REVID	0x03
12 
13 struct adxl372_chip_info {
14 	const char *name;
15 	const int *samp_freq_tbl;
16 	const int *bw_freq_tbl;
17 	unsigned int num_freqs;
18 	unsigned int act_time_scale_us;
19 	unsigned int act_time_scale_low_us;
20 	unsigned int inact_time_scale_ms;
21 	unsigned int inact_time_scale_low_ms;
22 	unsigned int max_odr;
23 	bool fifo_supported;
24 };
25 
26 extern const struct adxl372_chip_info adxl371_chip_info;
27 extern const struct adxl372_chip_info adxl372_chip_info;
28 
29 int adxl372_probe(struct device *dev, struct regmap *regmap,
30 		  int irq, const struct adxl372_chip_info *chip_info);
31 bool adxl372_readable_noinc_reg(struct device *dev, unsigned int reg);
32 
33 #endif /* _ADXL372_H_ */
34