xref: /linux/drivers/iio/imu/bmi160/bmi160.h (revision 812a46b7ff8f77f44ad3d9867b3525b4e0804f70)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
277c4ad2dSDaniel Baluta #ifndef BMI160_H_
377c4ad2dSDaniel Baluta #define BMI160_H_
477c4ad2dSDaniel Baluta 
5895bf81eSMartin Kelly #include <linux/iio/iio.h>
65dea3fb0SJonathan Albrieux #include <linux/regulator/consumer.h>
7895bf81eSMartin Kelly 
8895bf81eSMartin Kelly struct bmi160_data {
9895bf81eSMartin Kelly 	struct regmap *regmap;
10895bf81eSMartin Kelly 	struct iio_trigger *trig;
115dea3fb0SJonathan Albrieux 	struct regulator_bulk_data supplies[2];
12*812a46b7SJonathan Albrieux 	struct iio_mount_matrix orientation;
13895bf81eSMartin Kelly };
14895bf81eSMartin Kelly 
1577c4ad2dSDaniel Baluta extern const struct regmap_config bmi160_regmap_config;
1677c4ad2dSDaniel Baluta 
1777c4ad2dSDaniel Baluta int bmi160_core_probe(struct device *dev, struct regmap *regmap,
1877c4ad2dSDaniel Baluta 		      const char *name, bool use_spi);
1977c4ad2dSDaniel Baluta 
20895bf81eSMartin Kelly int bmi160_enable_irq(struct regmap *regmap, bool enable);
21895bf81eSMartin Kelly 
22895bf81eSMartin Kelly int bmi160_probe_trigger(struct iio_dev *indio_dev, int irq, u32 irq_type);
23895bf81eSMartin Kelly 
2477c4ad2dSDaniel Baluta #endif  /* BMI160_H_ */
25