1fda8d26eSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 2d6251168SDenis Ciocca /* 3d6251168SDenis Ciocca * STMicroelectronics accelerometers driver 4d6251168SDenis Ciocca * 5d6251168SDenis Ciocca * Copyright 2012-2013 STMicroelectronics Inc. 6d6251168SDenis Ciocca * 7d6251168SDenis Ciocca * Denis Ciocca <denis.ciocca@st.com> 8d6251168SDenis Ciocca * v. 1.0.0 9d6251168SDenis Ciocca */ 10d6251168SDenis Ciocca 11d6251168SDenis Ciocca #ifndef ST_ACCEL_H 12d6251168SDenis Ciocca #define ST_ACCEL_H 13d6251168SDenis Ciocca 14d6251168SDenis Ciocca #include <linux/types.h> 15d6251168SDenis Ciocca #include <linux/iio/common/st_sensors.h> 16d6251168SDenis Ciocca 17b30f1593SLorenzo Bianconi #define H3LIS331DL_ACCEL_DEV_NAME "h3lis331dl_accel" 183acddf74SLinus Walleij #define LIS3LV02DL_ACCEL_DEV_NAME "lis3lv02dl_accel" 19d6251168SDenis Ciocca #define LSM303DLHC_ACCEL_DEV_NAME "lsm303dlhc_accel" 20d6251168SDenis Ciocca #define LIS3DH_ACCEL_DEV_NAME "lis3dh" 21d6251168SDenis Ciocca #define LSM330D_ACCEL_DEV_NAME "lsm330d_accel" 22d6251168SDenis Ciocca #define LSM330DL_ACCEL_DEV_NAME "lsm330dl_accel" 23d6251168SDenis Ciocca #define LSM330DLC_ACCEL_DEV_NAME "lsm330dlc_accel" 24bbf5f037SLinus Walleij #define LIS331DL_ACCEL_DEV_NAME "lis331dl_accel" 25d6251168SDenis Ciocca #define LIS331DLH_ACCEL_DEV_NAME "lis331dlh" 26d6251168SDenis Ciocca #define LSM303DL_ACCEL_DEV_NAME "lsm303dl_accel" 27d6251168SDenis Ciocca #define LSM303DLH_ACCEL_DEV_NAME "lsm303dlh_accel" 28d6251168SDenis Ciocca #define LSM303DLM_ACCEL_DEV_NAME "lsm303dlm_accel" 29d6251168SDenis Ciocca #define LSM330_ACCEL_DEV_NAME "lsm330_accel" 30ddc05fa2SGiuseppe Barba #define LSM303AGR_ACCEL_DEV_NAME "lsm303agr_accel" 3134dc578dSGiuseppe Barba #define LIS2DH12_ACCEL_DEV_NAME "lis2dh12_accel" 324e68cfbfSJonathan Cameron #define LIS3L02DQ_ACCEL_DEV_NAME "lis3l02dq" 33dcdb0a78SLorenzo Bianconi #define LNG2DM_ACCEL_DEV_NAME "lng2dm" 34f94124f9SLorenzo Bianconi #define LIS2DW12_ACCEL_DEV_NAME "lis2dw12" 35fea4d486SLorenzo Bianconi #define LIS3DHH_ACCEL_DEV_NAME "lis3dhh" 3649b62373SHeiko Stuebner #define LIS3DE_ACCEL_DEV_NAME "lis3de" 3763440a63SRobert Jones #define LIS2DE12_ACCEL_DEV_NAME "lis2de12" 38*f168a6dbSKaustabh Chakraborty #define LIS2DS12_ACCEL_DEV_NAME "lis2ds12" 393f4a559bSGaëtan André #define LIS2HH12_ACCEL_DEV_NAME "lis2hh12" 408a7449d6SSicelo A. Mhlongo #define LIS302DL_ACCEL_DEV_NAME "lis302dl" 4123fd6f0bSStephan Gerhold #define LSM303C_ACCEL_DEV_NAME "lsm303c_accel" 42c7a43b08SSamuel Holland #define SC7A20_ACCEL_DEV_NAME "sc7a20" 4346e33707SStefan Wahren #define IIS328DQ_ACCEL_DEV_NAME "iis328dq" 44d6251168SDenis Ciocca 458a7449d6SSicelo A. Mhlongo 46d6251168SDenis Ciocca #ifdef CONFIG_IIO_BUFFER 47d6251168SDenis Ciocca int st_accel_allocate_ring(struct iio_dev *indio_dev); 48d6251168SDenis Ciocca int st_accel_trig_set_state(struct iio_trigger *trig, bool state); 49d6251168SDenis Ciocca #define ST_ACCEL_TRIGGER_SET_STATE (&st_accel_trig_set_state) 50d6251168SDenis Ciocca #else /* CONFIG_IIO_BUFFER */ st_accel_allocate_ring(struct iio_dev * indio_dev)51d6251168SDenis Cioccastatic inline int st_accel_allocate_ring(struct iio_dev *indio_dev) 52d6251168SDenis Ciocca { 53d6251168SDenis Ciocca return 0; 54d6251168SDenis Ciocca } 55d6251168SDenis Ciocca #define ST_ACCEL_TRIGGER_SET_STATE NULL 56d6251168SDenis Ciocca #endif /* CONFIG_IIO_BUFFER */ 57d6251168SDenis Ciocca 58d6251168SDenis Ciocca #endif /* ST_ACCEL_H */ 59