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