mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-23 11:04:44 +08:00
d372e5a19a
This driver has two parts, one for i2c and one for spi, since the chip can operate with both wire protocols. The core file has a common adxl345_core_remove() function which puts the chip into a powerdown state. This can be implemented with a devm_add_action_or_reset() hook. Doing that means we can register the IIO device with devm_iio_device_register() and get rid of the adxl345_core_remove() function. The dev_set_drvdata() call can be removed as there is no other user of this private data anymore. Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com> Link: https://lore.kernel.org/r/20210624080441.8710-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
20 lines
400 B
C
20 lines
400 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* ADXL345 3-Axis Digital Accelerometer
|
|
*
|
|
* Copyright (c) 2017 Eva Rachel Retuya <eraretuya@gmail.com>
|
|
*/
|
|
|
|
#ifndef _ADXL345_H_
|
|
#define _ADXL345_H_
|
|
|
|
enum adxl345_device_type {
|
|
ADXL345,
|
|
ADXL375,
|
|
};
|
|
|
|
int adxl345_core_probe(struct device *dev, struct regmap *regmap,
|
|
enum adxl345_device_type type, const char *name);
|
|
|
|
#endif /* _ADXL345_H_ */
|