.. | .. |
---|
2 | 2 | #ifndef BMI160_H_ |
---|
3 | 3 | #define BMI160_H_ |
---|
4 | 4 | |
---|
| 5 | +#include <linux/iio/iio.h> |
---|
| 6 | +#include <linux/regulator/consumer.h> |
---|
| 7 | + |
---|
| 8 | +struct bmi160_data { |
---|
| 9 | + struct regmap *regmap; |
---|
| 10 | + struct iio_trigger *trig; |
---|
| 11 | + struct regulator_bulk_data supplies[2]; |
---|
| 12 | + struct iio_mount_matrix orientation; |
---|
| 13 | + /* |
---|
| 14 | + * Ensure natural alignment for timestamp if present. |
---|
| 15 | + * Max length needed: 2 * 3 channels + 4 bytes padding + 8 byte ts. |
---|
| 16 | + * If fewer channels are enabled, less space may be needed, as |
---|
| 17 | + * long as the timestamp is still aligned to 8 bytes. |
---|
| 18 | + */ |
---|
| 19 | + __le16 buf[12] __aligned(8); |
---|
| 20 | +}; |
---|
| 21 | + |
---|
5 | 22 | extern const struct regmap_config bmi160_regmap_config; |
---|
6 | 23 | |
---|
7 | 24 | int bmi160_core_probe(struct device *dev, struct regmap *regmap, |
---|
8 | 25 | const char *name, bool use_spi); |
---|
9 | | -void bmi160_core_remove(struct device *dev); |
---|
| 26 | + |
---|
| 27 | +int bmi160_enable_irq(struct regmap *regmap, bool enable); |
---|
| 28 | + |
---|
| 29 | +int bmi160_probe_trigger(struct iio_dev *indio_dev, int irq, u32 irq_type); |
---|
10 | 30 | |
---|
11 | 31 | #endif /* BMI160_H_ */ |
---|