st_uvis25.h 787 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. #ifndef ST_UVIS25_H
  11. #define ST_UVIS25_H
  12. #define ST_UVIS25_DEV_NAME "uvis25"
  13. #include <linux/iio/iio.h>
  14. /**
  15. * struct st_uvis25_hw - ST UVIS25 sensor instance
  16. * @regmap: Register map of the device.
  17. * @trig: The trigger in use by the driver.
  18. * @enabled: Status of the sensor (false->off, true->on).
  19. * @irq: Device interrupt line (I2C or SPI).
  20. */
  21. struct st_uvis25_hw {
  22. struct regmap *regmap;
  23. struct iio_trigger *trig;
  24. bool enabled;
  25. int irq;
  26. };
  27. extern const struct dev_pm_ops st_uvis25_pm_ops;
  28. int st_uvis25_probe(struct device *dev, int irq, struct regmap *regmap);
  29. #endif /* ST_UVIS25_H */