Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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