xref: /openbmc/linux/drivers/iio/accel/st_accel.h (revision fd067c8b)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * STMicroelectronics accelerometers driver
4  *
5  * Copyright 2012-2013 STMicroelectronics Inc.
6  *
7  * Denis Ciocca <denis.ciocca@st.com>
8  * v. 1.0.0
9  */
10 
11 #ifndef ST_ACCEL_H
12 #define ST_ACCEL_H
13 
14 #include <linux/types.h>
15 #include <linux/iio/common/st_sensors.h>
16 
17 #define H3LIS331DL_ACCEL_DEV_NAME	"h3lis331dl_accel"
18 #define LIS3LV02DL_ACCEL_DEV_NAME	"lis3lv02dl_accel"
19 #define LSM303DLHC_ACCEL_DEV_NAME	"lsm303dlhc_accel"
20 #define LIS3DH_ACCEL_DEV_NAME		"lis3dh"
21 #define LSM330D_ACCEL_DEV_NAME		"lsm330d_accel"
22 #define LSM330DL_ACCEL_DEV_NAME		"lsm330dl_accel"
23 #define LSM330DLC_ACCEL_DEV_NAME	"lsm330dlc_accel"
24 #define LIS331DL_ACCEL_DEV_NAME		"lis331dl_accel"
25 #define LIS331DLH_ACCEL_DEV_NAME	"lis331dlh"
26 #define LSM303DL_ACCEL_DEV_NAME		"lsm303dl_accel"
27 #define LSM303DLH_ACCEL_DEV_NAME	"lsm303dlh_accel"
28 #define LSM303DLM_ACCEL_DEV_NAME	"lsm303dlm_accel"
29 #define LSM330_ACCEL_DEV_NAME		"lsm330_accel"
30 #define LSM303AGR_ACCEL_DEV_NAME	"lsm303agr_accel"
31 #define LIS2DH12_ACCEL_DEV_NAME		"lis2dh12_accel"
32 #define LIS3L02DQ_ACCEL_DEV_NAME	"lis3l02dq"
33 #define LNG2DM_ACCEL_DEV_NAME		"lng2dm"
34 #define LIS2DW12_ACCEL_DEV_NAME		"lis2dw12"
35 #define LIS3DHH_ACCEL_DEV_NAME		"lis3dhh"
36 #define LIS3DE_ACCEL_DEV_NAME		"lis3de"
37 #define LIS2DE12_ACCEL_DEV_NAME		"lis2de12"
38 #define LIS2HH12_ACCEL_DEV_NAME		"lis2hh12"
39 #define LIS302DL_ACCEL_DEV_NAME		"lis302dl"
40 #define LSM303C_ACCEL_DEV_NAME		"lsm303c_accel"
41 #define SC7A20_ACCEL_DEV_NAME		"sc7a20"
42 #define IIS328DQ_ACCEL_DEV_NAME		"iis328dq"
43 
44 
45 #ifdef CONFIG_IIO_BUFFER
46 int st_accel_allocate_ring(struct iio_dev *indio_dev);
47 int st_accel_trig_set_state(struct iio_trigger *trig, bool state);
48 #define ST_ACCEL_TRIGGER_SET_STATE (&st_accel_trig_set_state)
49 #else /* CONFIG_IIO_BUFFER */
50 static inline int st_accel_allocate_ring(struct iio_dev *indio_dev)
51 {
52 	return 0;
53 }
54 #define ST_ACCEL_TRIGGER_SET_STATE NULL
55 #endif /* CONFIG_IIO_BUFFER */
56 
57 #endif /* ST_ACCEL_H */
58