brintos

brintos / linux-shallow public Read only

0
0
Text · 853 B · 061e66d Raw
40 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*3 * ADXL355 3-Axis Digital Accelerometer4 *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