st_uvis25.h 897 B

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