1fda8d26eSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 23025c868SLorenzo Bianconi /* 33025c868SLorenzo Bianconi * STMicroelectronics uvis25 sensor driver 43025c868SLorenzo Bianconi * 53025c868SLorenzo Bianconi * Copyright 2017 STMicroelectronics Inc. 63025c868SLorenzo Bianconi * 73025c868SLorenzo Bianconi * Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> 83025c868SLorenzo Bianconi */ 93025c868SLorenzo Bianconi 103025c868SLorenzo Bianconi #ifndef ST_UVIS25_H 113025c868SLorenzo Bianconi #define ST_UVIS25_H 123025c868SLorenzo Bianconi 133025c868SLorenzo Bianconi #define ST_UVIS25_DEV_NAME "uvis25" 143025c868SLorenzo Bianconi 153025c868SLorenzo Bianconi #include <linux/iio/iio.h> 163025c868SLorenzo Bianconi 173025c868SLorenzo Bianconi /** 183025c868SLorenzo Bianconi * struct st_uvis25_hw - ST UVIS25 sensor instance 193025c868SLorenzo Bianconi * @regmap: Register map of the device. 203025c868SLorenzo Bianconi * @trig: The trigger in use by the driver. 213025c868SLorenzo Bianconi * @enabled: Status of the sensor (false->off, true->on). 223025c868SLorenzo Bianconi * @irq: Device interrupt line (I2C or SPI). 233025c868SLorenzo Bianconi */ 243025c868SLorenzo Bianconi struct st_uvis25_hw { 253025c868SLorenzo Bianconi struct regmap *regmap; 263025c868SLorenzo Bianconi 273025c868SLorenzo Bianconi struct iio_trigger *trig; 283025c868SLorenzo Bianconi bool enabled; 293025c868SLorenzo Bianconi int irq; 30*d837a996SJonathan Cameron /* Ensure timestamp is naturally aligned */ 31*d837a996SJonathan Cameron struct { 32*d837a996SJonathan Cameron u8 chan; 33*d837a996SJonathan Cameron s64 ts __aligned(8); 34*d837a996SJonathan Cameron } scan; 353025c868SLorenzo Bianconi }; 363025c868SLorenzo Bianconi 373025c868SLorenzo Bianconi extern const struct dev_pm_ops st_uvis25_pm_ops; 383025c868SLorenzo Bianconi 393025c868SLorenzo Bianconi int st_uvis25_probe(struct device *dev, int irq, struct regmap *regmap); 403025c868SLorenzo Bianconi 413025c868SLorenzo Bianconi #endif /* ST_UVIS25_H */ 42