st_gyro.h (bf61c8840efe60fd8f91446860b63338fb424158) | st_gyro.h (23cde4d65cc7d11e2048d2b240cdf13927ac50d0) |
---|---|
1/* 2 * STMicroelectronics gyroscopes driver 3 * 4 * Copyright 2012-2013 STMicroelectronics Inc. 5 * 6 * Denis Ciocca <denis.ciocca@st.com> 7 * v. 1.0.0 8 * Licensed under the GPL-2. --- 9 unchanged lines hidden (view full) --- 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 | 1/* 2 * STMicroelectronics gyroscopes driver 3 * 4 * Copyright 2012-2013 STMicroelectronics Inc. 5 * 6 * Denis Ciocca <denis.ciocca@st.com> 7 * v. 1.0.0 8 * Licensed under the GPL-2. --- 9 unchanged lines hidden (view full) --- 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 |
26int st_gyro_common_probe(struct iio_dev *indio_dev); | 26/** 27 * struct st_sensors_platform_data - gyro platform data 28 * @drdy_int_pin: DRDY on gyros is available only on INT2 pin. 29 */ 30static const struct st_sensors_platform_data gyro_pdata = { 31 .drdy_int_pin = 2, 32}; 33 34int st_gyro_common_probe(struct iio_dev *indio_dev, 35 struct st_sensors_platform_data *pdata); |
27void st_gyro_common_remove(struct iio_dev *indio_dev); 28 29#ifdef CONFIG_IIO_BUFFER 30int st_gyro_allocate_ring(struct iio_dev *indio_dev); 31void st_gyro_deallocate_ring(struct iio_dev *indio_dev); 32int st_gyro_trig_set_state(struct iio_trigger *trig, bool state); 33#define ST_GYRO_TRIGGER_SET_STATE (&st_gyro_trig_set_state) 34#else /* CONFIG_IIO_BUFFER */ 35static inline int st_gyro_allocate_ring(struct iio_dev *indio_dev) 36{ 37 return 0; 38} 39static inline void st_gyro_deallocate_ring(struct iio_dev *indio_dev) 40{ 41} 42#define ST_GYRO_TRIGGER_SET_STATE NULL 43#endif /* CONFIG_IIO_BUFFER */ 44 45#endif /* ST_GYRO_H */ | 36void st_gyro_common_remove(struct iio_dev *indio_dev); 37 38#ifdef CONFIG_IIO_BUFFER 39int st_gyro_allocate_ring(struct iio_dev *indio_dev); 40void st_gyro_deallocate_ring(struct iio_dev *indio_dev); 41int st_gyro_trig_set_state(struct iio_trigger *trig, bool state); 42#define ST_GYRO_TRIGGER_SET_STATE (&st_gyro_trig_set_state) 43#else /* CONFIG_IIO_BUFFER */ 44static inline int st_gyro_allocate_ring(struct iio_dev *indio_dev) 45{ 46 return 0; 47} 48static inline void st_gyro_deallocate_ring(struct iio_dev *indio_dev) 49{ 50} 51#define ST_GYRO_TRIGGER_SET_STATE NULL 52#endif /* CONFIG_IIO_BUFFER */ 53 54#endif /* ST_GYRO_H */ |