Merge tag 'iwlwifi-for-kalle-2015-12-16' into next
[deliverable/linux.git] / drivers / iio / accel / st_accel.h
CommitLineData
d6251168
DC
1/*
2 * STMicroelectronics accelerometers driver
3 *
4 * Copyright 2012-2013 STMicroelectronics Inc.
5 *
6 * Denis Ciocca <denis.ciocca@st.com>
7 * v. 1.0.0
8 * Licensed under the GPL-2.
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
3acddf74 17#define LIS3LV02DL_ACCEL_DEV_NAME "lis3lv02dl_accel"
d6251168
DC
18#define LSM303DLHC_ACCEL_DEV_NAME "lsm303dlhc_accel"
19#define LIS3DH_ACCEL_DEV_NAME "lis3dh"
20#define LSM330D_ACCEL_DEV_NAME "lsm330d_accel"
21#define LSM330DL_ACCEL_DEV_NAME "lsm330dl_accel"
22#define LSM330DLC_ACCEL_DEV_NAME "lsm330dlc_accel"
bbf5f037 23#define LIS331DL_ACCEL_DEV_NAME "lis331dl_accel"
d6251168
DC
24#define LIS331DLH_ACCEL_DEV_NAME "lis331dlh"
25#define LSM303DL_ACCEL_DEV_NAME "lsm303dl_accel"
26#define LSM303DLH_ACCEL_DEV_NAME "lsm303dlh_accel"
27#define LSM303DLM_ACCEL_DEV_NAME "lsm303dlm_accel"
28#define LSM330_ACCEL_DEV_NAME "lsm330_accel"
ddc05fa2 29#define LSM303AGR_ACCEL_DEV_NAME "lsm303agr_accel"
d6251168 30
23cde4d6
DC
31/**
32* struct st_sensors_platform_data - default accel platform data
33* @drdy_int_pin: default accel DRDY is available on INT1 pin.
34*/
35static const struct st_sensors_platform_data default_accel_pdata = {
36 .drdy_int_pin = 1,
37};
38
b6e6bda6 39int st_accel_common_probe(struct iio_dev *indio_dev);
d6251168
DC
40void st_accel_common_remove(struct iio_dev *indio_dev);
41
42#ifdef CONFIG_IIO_BUFFER
43int st_accel_allocate_ring(struct iio_dev *indio_dev);
44void st_accel_deallocate_ring(struct iio_dev *indio_dev);
45int st_accel_trig_set_state(struct iio_trigger *trig, bool state);
46#define ST_ACCEL_TRIGGER_SET_STATE (&st_accel_trig_set_state)
47#else /* CONFIG_IIO_BUFFER */
48static inline int st_accel_allocate_ring(struct iio_dev *indio_dev)
49{
50 return 0;
51}
52static inline void st_accel_deallocate_ring(struct iio_dev *indio_dev)
53{
54}
55#define ST_ACCEL_TRIGGER_SET_STATE NULL
56#endif /* CONFIG_IIO_BUFFER */
57
58#endif /* ST_ACCEL_H */
This page took 0.214103 seconds and 5 git commands to generate.