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>
17 #define LSM303DLHC_ACCEL_DEV_NAME "lsm303dlhc_accel"
18 #define LIS3DH_ACCEL_DEV_NAME "lis3dh"
19 #define LSM330D_ACCEL_DEV_NAME "lsm330d_accel"
20 #define LSM330DL_ACCEL_DEV_NAME "lsm330dl_accel"
21 #define LSM330DLC_ACCEL_DEV_NAME "lsm330dlc_accel"
22 #define LIS331DLH_ACCEL_DEV_NAME "lis331dlh"
23 #define LSM303DL_ACCEL_DEV_NAME "lsm303dl_accel"
24 #define LSM303DLH_ACCEL_DEV_NAME "lsm303dlh_accel"
25 #define LSM303DLM_ACCEL_DEV_NAME "lsm303dlm_accel"
26 #define LSM330_ACCEL_DEV_NAME "lsm330_accel"
28 int st_accel_common_probe(struct iio_dev
*indio_dev
);
29 void st_accel_common_remove(struct iio_dev
*indio_dev
);
31 #ifdef CONFIG_IIO_BUFFER
32 int st_accel_allocate_ring(struct iio_dev
*indio_dev
);
33 void st_accel_deallocate_ring(struct iio_dev
*indio_dev
);
34 int st_accel_trig_set_state(struct iio_trigger
*trig
, bool state
);
35 #define ST_ACCEL_TRIGGER_SET_STATE (&st_accel_trig_set_state)
36 #else /* CONFIG_IIO_BUFFER */
37 static inline int st_accel_allocate_ring(struct iio_dev
*indio_dev
)
41 static inline void st_accel_deallocate_ring(struct iio_dev
*indio_dev
)
44 #define ST_ACCEL_TRIGGER_SET_STATE NULL
45 #endif /* CONFIG_IIO_BUFFER */
47 #endif /* ST_ACCEL_H */