2 * STMicroelectronics accelerometers driver
4 * Copyright 2012-2013 STMicroelectronics Inc.
6 * Denis Ciocca <denis.ciocca@st.com>
8 * Licensed under the GPL-2.
14 #include <linux/types.h>
15 #include <linux/iio/common/st_sensors.h>
40 #define H3LIS331DL_ACCEL_DEV_NAME "h3lis331dl_accel"
41 #define LIS3LV02DL_ACCEL_DEV_NAME "lis3lv02dl_accel"
42 #define LSM303DLHC_ACCEL_DEV_NAME "lsm303dlhc_accel"
43 #define LIS3DH_ACCEL_DEV_NAME "lis3dh"
44 #define LSM330D_ACCEL_DEV_NAME "lsm330d_accel"
45 #define LSM330DL_ACCEL_DEV_NAME "lsm330dl_accel"
46 #define LSM330DLC_ACCEL_DEV_NAME "lsm330dlc_accel"
47 #define LIS331DL_ACCEL_DEV_NAME "lis331dl_accel"
48 #define LIS331DLH_ACCEL_DEV_NAME "lis331dlh"
49 #define LSM303DL_ACCEL_DEV_NAME "lsm303dl_accel"
50 #define LSM303DLH_ACCEL_DEV_NAME "lsm303dlh_accel"
51 #define LSM303DLM_ACCEL_DEV_NAME "lsm303dlm_accel"
52 #define LSM330_ACCEL_DEV_NAME "lsm330_accel"
53 #define LSM303AGR_ACCEL_DEV_NAME "lsm303agr_accel"
54 #define LIS2DH12_ACCEL_DEV_NAME "lis2dh12_accel"
55 #define LIS3L02DQ_ACCEL_DEV_NAME "lis3l02dq"
56 #define LNG2DM_ACCEL_DEV_NAME "lng2dm"
57 #define LIS2DW12_ACCEL_DEV_NAME "lis2dw12"
58 #define LIS3DHH_ACCEL_DEV_NAME "lis3dhh"
59 #define LIS3DE_ACCEL_DEV_NAME "lis3de"
62 * struct st_sensors_platform_data - default accel platform data
63 * @drdy_int_pin: default accel DRDY is available on INT1 pin.
65 static const struct st_sensors_platform_data default_accel_pdata
= {
69 int st_accel_common_probe(struct iio_dev
*indio_dev
);
70 void st_accel_common_remove(struct iio_dev
*indio_dev
);
72 #ifdef CONFIG_IIO_BUFFER
73 int st_accel_allocate_ring(struct iio_dev
*indio_dev
);
74 void st_accel_deallocate_ring(struct iio_dev
*indio_dev
);
75 int st_accel_trig_set_state(struct iio_trigger
*trig
, bool state
);
76 #define ST_ACCEL_TRIGGER_SET_STATE (&st_accel_trig_set_state)
77 #else /* CONFIG_IIO_BUFFER */
78 static inline int st_accel_allocate_ring(struct iio_dev
*indio_dev
)
82 static inline void st_accel_deallocate_ring(struct iio_dev
*indio_dev
)
85 #define ST_ACCEL_TRIGGER_SET_STATE NULL
86 #endif /* CONFIG_IIO_BUFFER */
88 #endif /* ST_ACCEL_H */