st_gyro.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * STMicroelectronics gyroscopes driver
  4. *
  5. * Copyright 2012-2013 STMicroelectronics Inc.
  6. *
  7. * Denis Ciocca <[email protected]>
  8. * v. 1.0.0
  9. */
  10. #ifndef ST_GYRO_H
  11. #define ST_GYRO_H
  12. #include <linux/types.h>
  13. #include <linux/iio/common/st_sensors.h>
  14. #define L3G4200D_GYRO_DEV_NAME "l3g4200d"
  15. #define LSM330D_GYRO_DEV_NAME "lsm330d_gyro"
  16. #define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro"
  17. #define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro"
  18. #define L3GD20_GYRO_DEV_NAME "l3gd20"
  19. #define L3GD20H_GYRO_DEV_NAME "l3gd20h"
  20. #define L3G4IS_GYRO_DEV_NAME "l3g4is_ui"
  21. #define LSM330_GYRO_DEV_NAME "lsm330_gyro"
  22. #define LSM9DS0_GYRO_DEV_NAME "lsm9ds0_gyro"
  23. #ifdef CONFIG_IIO_BUFFER
  24. int st_gyro_allocate_ring(struct iio_dev *indio_dev);
  25. int st_gyro_trig_set_state(struct iio_trigger *trig, bool state);
  26. #define ST_GYRO_TRIGGER_SET_STATE (&st_gyro_trig_set_state)
  27. #else /* CONFIG_IIO_BUFFER */
  28. static inline int st_gyro_allocate_ring(struct iio_dev *indio_dev)
  29. {
  30. return 0;
  31. }
  32. #define ST_GYRO_TRIGGER_SET_STATE NULL
  33. #endif /* CONFIG_IIO_BUFFER */
  34. #endif /* ST_GYRO_H */