162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * STMicroelectronics accelerometers driver
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright 2012-2013 STMicroelectronics Inc.
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * Denis Ciocca <denis.ciocca@st.com>
862306a36Sopenharmony_ci * v. 1.0.0
962306a36Sopenharmony_ci */
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#ifndef ST_ACCEL_H
1262306a36Sopenharmony_ci#define ST_ACCEL_H
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#include <linux/types.h>
1562306a36Sopenharmony_ci#include <linux/iio/common/st_sensors.h>
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#define H3LIS331DL_ACCEL_DEV_NAME	"h3lis331dl_accel"
1862306a36Sopenharmony_ci#define LIS3LV02DL_ACCEL_DEV_NAME	"lis3lv02dl_accel"
1962306a36Sopenharmony_ci#define LSM303DLHC_ACCEL_DEV_NAME	"lsm303dlhc_accel"
2062306a36Sopenharmony_ci#define LIS3DH_ACCEL_DEV_NAME		"lis3dh"
2162306a36Sopenharmony_ci#define LSM330D_ACCEL_DEV_NAME		"lsm330d_accel"
2262306a36Sopenharmony_ci#define LSM330DL_ACCEL_DEV_NAME		"lsm330dl_accel"
2362306a36Sopenharmony_ci#define LSM330DLC_ACCEL_DEV_NAME	"lsm330dlc_accel"
2462306a36Sopenharmony_ci#define LIS331DL_ACCEL_DEV_NAME		"lis331dl_accel"
2562306a36Sopenharmony_ci#define LIS331DLH_ACCEL_DEV_NAME	"lis331dlh"
2662306a36Sopenharmony_ci#define LSM303DL_ACCEL_DEV_NAME		"lsm303dl_accel"
2762306a36Sopenharmony_ci#define LSM303DLH_ACCEL_DEV_NAME	"lsm303dlh_accel"
2862306a36Sopenharmony_ci#define LSM303DLM_ACCEL_DEV_NAME	"lsm303dlm_accel"
2962306a36Sopenharmony_ci#define LSM330_ACCEL_DEV_NAME		"lsm330_accel"
3062306a36Sopenharmony_ci#define LSM303AGR_ACCEL_DEV_NAME	"lsm303agr_accel"
3162306a36Sopenharmony_ci#define LIS2DH12_ACCEL_DEV_NAME		"lis2dh12_accel"
3262306a36Sopenharmony_ci#define LIS3L02DQ_ACCEL_DEV_NAME	"lis3l02dq"
3362306a36Sopenharmony_ci#define LNG2DM_ACCEL_DEV_NAME		"lng2dm"
3462306a36Sopenharmony_ci#define LIS2DW12_ACCEL_DEV_NAME		"lis2dw12"
3562306a36Sopenharmony_ci#define LIS3DHH_ACCEL_DEV_NAME		"lis3dhh"
3662306a36Sopenharmony_ci#define LIS3DE_ACCEL_DEV_NAME		"lis3de"
3762306a36Sopenharmony_ci#define LIS2DE12_ACCEL_DEV_NAME		"lis2de12"
3862306a36Sopenharmony_ci#define LIS2HH12_ACCEL_DEV_NAME		"lis2hh12"
3962306a36Sopenharmony_ci#define LIS302DL_ACCEL_DEV_NAME		"lis302dl"
4062306a36Sopenharmony_ci#define LSM303C_ACCEL_DEV_NAME		"lsm303c_accel"
4162306a36Sopenharmony_ci#define SC7A20_ACCEL_DEV_NAME		"sc7a20"
4262306a36Sopenharmony_ci#define IIS328DQ_ACCEL_DEV_NAME		"iis328dq"
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci#ifdef CONFIG_IIO_BUFFER
4662306a36Sopenharmony_ciint st_accel_allocate_ring(struct iio_dev *indio_dev);
4762306a36Sopenharmony_ciint st_accel_trig_set_state(struct iio_trigger *trig, bool state);
4862306a36Sopenharmony_ci#define ST_ACCEL_TRIGGER_SET_STATE (&st_accel_trig_set_state)
4962306a36Sopenharmony_ci#else /* CONFIG_IIO_BUFFER */
5062306a36Sopenharmony_cistatic inline int st_accel_allocate_ring(struct iio_dev *indio_dev)
5162306a36Sopenharmony_ci{
5262306a36Sopenharmony_ci	return 0;
5362306a36Sopenharmony_ci}
5462306a36Sopenharmony_ci#define ST_ACCEL_TRIGGER_SET_STATE NULL
5562306a36Sopenharmony_ci#endif /* CONFIG_IIO_BUFFER */
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci#endif /* ST_ACCEL_H */
58