1 /*
2  * STMicroelectronics uvis25 sensor driver
3  *
4  * Copyright 2017 STMicroelectronics Inc.
5  *
6  * Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
7  *
8  * Licensed under the GPL-2.
9  */
10 
11 #ifndef ST_UVIS25_H
12 #define ST_UVIS25_H
13 
14 #define ST_UVIS25_DEV_NAME		"uvis25"
15 
16 #include <linux/iio/iio.h>
17 
18 /**
19  * struct st_uvis25_hw - ST UVIS25 sensor instance
20  * @regmap: Register map of the device.
21  * @trig: The trigger in use by the driver.
22  * @enabled: Status of the sensor (false->off, true->on).
23  * @irq: Device interrupt line (I2C or SPI).
24  */
25 struct st_uvis25_hw {
26 	struct regmap *regmap;
27 
28 	struct iio_trigger *trig;
29 	bool enabled;
30 	int irq;
31 	/* Ensure timestamp is naturally aligned */
32 	struct {
33 		u8 chan;
34 		s64 ts __aligned(8);
35 	} scan;
36 };
37 
38 extern const struct dev_pm_ops st_uvis25_pm_ops;
39 
40 int st_uvis25_probe(struct device *dev, int irq, struct regmap *regmap);
41 
42 #endif /* ST_UVIS25_H */
43