linux/drivers/iio/accel/adxl313.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * ADXL313 3-Axis Digital Accelerometer
 *
 * Copyright (c) 2021 Lucas Stankus <[email protected]>
 */

#ifndef _ADXL313_H_
#define _ADXL313_H_

#include <linux/iio/iio.h>

/* ADXL313 register definitions */
#define ADXL313_REG_DEVID0
#define ADXL313_REG_DEVID1
#define ADXL313_REG_PARTID
#define ADXL313_REG_XID
#define ADXL313_REG_SOFT_RESET
#define ADXL313_REG_OFS_AXIS(index)
#define ADXL313_REG_THRESH_ACT
#define ADXL313_REG_ACT_INACT_CTL
#define ADXL313_REG_BW_RATE
#define ADXL313_REG_POWER_CTL
#define ADXL313_REG_INT_MAP
#define ADXL313_REG_DATA_FORMAT
#define ADXL313_REG_DATA_AXIS(index)
#define ADXL313_REG_FIFO_CTL
#define ADXL313_REG_FIFO_STATUS

#define ADXL313_DEVID0
#define ADXL313_DEVID0_ADXL312_314
#define ADXL313_DEVID1
#define ADXL313_PARTID
#define ADXL313_SOFT_RESET

#define ADXL313_RATE_MSK
#define ADXL313_RATE_BASE

#define ADXL313_POWER_CTL_MSK
#define ADXL313_MEASUREMENT_MODE

#define ADXL313_RANGE_MSK
#define ADXL313_RANGE_MAX

#define ADXL313_FULL_RES
#define ADXL313_SPI_3WIRE
#define ADXL313_I2C_DISABLE

extern const struct regmap_access_table adxl312_readable_regs_table;
extern const struct regmap_access_table adxl313_readable_regs_table;
extern const struct regmap_access_table adxl314_readable_regs_table;

extern const struct regmap_access_table adxl312_writable_regs_table;
extern const struct regmap_access_table adxl313_writable_regs_table;
extern const struct regmap_access_table adxl314_writable_regs_table;

enum adxl313_device_type {};

struct adxl313_data {};

struct adxl313_chip_info {};

extern const struct adxl313_chip_info adxl31x_chip_info[];

int adxl313_core_probe(struct device *dev,
		       struct regmap *regmap,
		       const struct adxl313_chip_info *chip_info,
		       int (*setup)(struct device *, struct regmap *));
#endif /* _ADXL313_H_ */