1*fda8d26eSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 27be56a8fSDenis Ciocca /* 37be56a8fSDenis Ciocca * STMicroelectronics gyroscopes driver 47be56a8fSDenis Ciocca * 57be56a8fSDenis Ciocca * Copyright 2012-2013 STMicroelectronics Inc. 67be56a8fSDenis Ciocca * 77be56a8fSDenis Ciocca * Denis Ciocca <denis.ciocca@st.com> 87be56a8fSDenis Ciocca * v. 1.0.0 97be56a8fSDenis Ciocca */ 107be56a8fSDenis Ciocca 117be56a8fSDenis Ciocca #ifndef ST_GYRO_H 127be56a8fSDenis Ciocca #define ST_GYRO_H 137be56a8fSDenis Ciocca 147be56a8fSDenis Ciocca #include <linux/types.h> 157be56a8fSDenis Ciocca #include <linux/iio/common/st_sensors.h> 167be56a8fSDenis Ciocca 177be56a8fSDenis Ciocca #define L3G4200D_GYRO_DEV_NAME "l3g4200d" 187be56a8fSDenis Ciocca #define LSM330D_GYRO_DEV_NAME "lsm330d_gyro" 197be56a8fSDenis Ciocca #define LSM330DL_GYRO_DEV_NAME "lsm330dl_gyro" 207be56a8fSDenis Ciocca #define LSM330DLC_GYRO_DEV_NAME "lsm330dlc_gyro" 217be56a8fSDenis Ciocca #define L3GD20_GYRO_DEV_NAME "l3gd20" 2245a4e422SLorenzo Bianconi #define L3GD20H_GYRO_DEV_NAME "l3gd20h" 237be56a8fSDenis Ciocca #define L3G4IS_GYRO_DEV_NAME "l3g4is_ui" 247be56a8fSDenis Ciocca #define LSM330_GYRO_DEV_NAME "lsm330_gyro" 2541c128cbSCrestez Dan Leonard #define LSM9DS0_GYRO_DEV_NAME "lsm9ds0_gyro" 267be56a8fSDenis Ciocca 277be56a8fSDenis Ciocca #ifdef CONFIG_IIO_BUFFER 287be56a8fSDenis Ciocca int st_gyro_allocate_ring(struct iio_dev *indio_dev); 297be56a8fSDenis Ciocca int st_gyro_trig_set_state(struct iio_trigger *trig, bool state); 307be56a8fSDenis Ciocca #define ST_GYRO_TRIGGER_SET_STATE (&st_gyro_trig_set_state) 317be56a8fSDenis Ciocca #else /* CONFIG_IIO_BUFFER */ st_gyro_allocate_ring(struct iio_dev * indio_dev)327be56a8fSDenis Cioccastatic inline int st_gyro_allocate_ring(struct iio_dev *indio_dev) 337be56a8fSDenis Ciocca { 347be56a8fSDenis Ciocca return 0; 357be56a8fSDenis Ciocca } 367be56a8fSDenis Ciocca #define ST_GYRO_TRIGGER_SET_STATE NULL 377be56a8fSDenis Ciocca #endif /* CONFIG_IIO_BUFFER */ 387be56a8fSDenis Ciocca 397be56a8fSDenis Ciocca #endif /* ST_GYRO_H */ 40