1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * ADXL355 3-Axis Digital Accelerometer
4 *
5 * Copyright (c) 2021 Puranjay Mohan <puranjay12@gmail.com>
6 */
7
8#ifndef _ADXL355_H_
9#define _ADXL355_H_
10
11#include <linux/regmap.h>
12
13enum adxl355_device_type {
14 ADXL355,
15 ADXL359,
16};
17
18struct adxl355_fractional_type {
19 int integer;
20 int decimal;
21};
22
23struct device;
24
25struct adxl355_chip_info {
26 const char *name;
27 u8 part_id;
28 struct adxl355_fractional_type accel_scale;
29 struct adxl355_fractional_type temp_offset;
30};
31
32extern const struct regmap_access_table adxl355_readable_regs_tbl;
33extern const struct regmap_access_table adxl355_writeable_regs_tbl;
34extern const struct adxl355_chip_info adxl35x_chip_info[];
35
36int adxl355_core_probe(struct device *dev, struct regmap *regmap,
37 const struct adxl355_chip_info *chip_info);
38
39#endif /* _ADXL355_H_ */
40

source code of linux/drivers/iio/accel/adxl355.h