Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / iio / light / st_uvis25.h
blob283086887caf5d4f750e7b79f01c8bf91a982aa3
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * STMicroelectronics uvis25 sensor driver
5 * Copyright 2017 STMicroelectronics Inc.
7 * Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
8 */
10 #ifndef ST_UVIS25_H
11 #define ST_UVIS25_H
13 #define ST_UVIS25_DEV_NAME "uvis25"
15 #include <linux/iio/iio.h>
17 /**
18 * struct st_uvis25_hw - ST UVIS25 sensor instance
19 * @regmap: Register map of the device.
20 * @trig: The trigger in use by the driver.
21 * @enabled: Status of the sensor (false->off, true->on).
22 * @irq: Device interrupt line (I2C or SPI).
24 struct st_uvis25_hw {
25 struct regmap *regmap;
27 struct iio_trigger *trig;
28 bool enabled;
29 int irq;
30 /* Ensure timestamp is naturally aligned */
31 struct {
32 u8 chan;
33 s64 ts __aligned(8);
34 } scan;
37 extern const struct dev_pm_ops st_uvis25_pm_ops;
39 int st_uvis25_probe(struct device *dev, int irq, struct regmap *regmap);
41 #endif /* ST_UVIS25_H */