This source file includes following definitions.
- st_gyro_allocate_ring
- st_gyro_deallocate_ring
1
2
3
4
5
6
7
8
9
10
11 #ifndef ST_GYRO_H
12 #define ST_GYRO_H
13
14 #include <linux/types.h>
15 #include <linux/iio/common/st_sensors.h>
16
17 #define L3G4200D_GYRO_DEV_NAME "l3g4200d"
18 #define LSM330D_GYRO_DEV_NAME "lsm330d_gyro"
19 #define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro"
20 #define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro"
21 #define L3GD20_GYRO_DEV_NAME "l3gd20"
22 #define L3GD20H_GYRO_DEV_NAME "l3gd20h"
23 #define L3G4IS_GYRO_DEV_NAME "l3g4is_ui"
24 #define LSM330_GYRO_DEV_NAME "lsm330_gyro"
25 #define LSM9DS0_GYRO_DEV_NAME "lsm9ds0_gyro"
26
27
28
29
30
31 static const struct st_sensors_platform_data gyro_pdata = {
32 .drdy_int_pin = 2,
33 };
34
35 const struct st_sensor_settings *st_gyro_get_settings(const char *name);
36 int st_gyro_common_probe(struct iio_dev *indio_dev);
37 void st_gyro_common_remove(struct iio_dev *indio_dev);
38
39 #ifdef CONFIG_IIO_BUFFER
40 int st_gyro_allocate_ring(struct iio_dev *indio_dev);
41 void st_gyro_deallocate_ring(struct iio_dev *indio_dev);
42 int st_gyro_trig_set_state(struct iio_trigger *trig, bool state);
43 #define ST_GYRO_TRIGGER_SET_STATE (&st_gyro_trig_set_state)
44 #else
45 static inline int st_gyro_allocate_ring(struct iio_dev *indio_dev)
46 {
47 return 0;
48 }
49 static inline void st_gyro_deallocate_ring(struct iio_dev *indio_dev)
50 {
51 }
52 #define ST_GYRO_TRIGGER_SET_STATE NULL
53 #endif
54
55 #endif