1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * ADXL380 3-Axis Digital Accelerometer 4 * 5 * Copyright 2024 Analog Devices Inc. 6 */ 7 8 #ifndef _ADXL380_H_ 9 #define _ADXL380_H_ 10 11 enum adxl380_odr { 12 ADXL380_ODR_VLP, 13 ADXL380_ODR_DSM, 14 ADXL380_ODR_DSM_2X, 15 ADXL380_ODR_DSM_4X, 16 ADXL380_ODR_MAX 17 }; 18 19 struct adxl380_chip_info { 20 const char *name; 21 const int scale_tbl[3][2]; 22 const int samp_freq_tbl[ADXL380_ODR_MAX]; 23 const struct iio_info *info; 24 const int temp_offset; 25 const u16 chip_id; 26 const bool has_low_power; 27 }; 28 29 extern const struct adxl380_chip_info adxl318_chip_info; 30 extern const struct adxl380_chip_info adxl319_chip_info; 31 extern const struct adxl380_chip_info adxl380_chip_info; 32 extern const struct adxl380_chip_info adxl382_chip_info; 33 34 int adxl380_probe(struct device *dev, struct regmap *regmap, 35 const struct adxl380_chip_info *chip_info); 36 bool adxl380_readable_noinc_reg(struct device *dev, unsigned int reg); 37 38 #endif /* _ADXL380_H_ */ 39