Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / drivers / iio / magnetometer / st_magn.h
1 /*
2  * STMicroelectronics magnetometers 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_MAGN_H
12 #define ST_MAGN_H
13
14 #include <linux/types.h>
15 #include <linux/iio/common/st_sensors.h>
16
17 #define LSM303DLHC_MAGN_DEV_NAME        "lsm303dlhc_magn"
18 #define LSM303DLM_MAGN_DEV_NAME         "lsm303dlm_magn"
19 #define LIS3MDL_MAGN_DEV_NAME           "lis3mdl"
20
21 int st_magn_common_probe(struct iio_dev *indio_dev);
22 void st_magn_common_remove(struct iio_dev *indio_dev);
23
24 #ifdef CONFIG_IIO_BUFFER
25 int st_magn_allocate_ring(struct iio_dev *indio_dev);
26 void st_magn_deallocate_ring(struct iio_dev *indio_dev);
27 #else /* CONFIG_IIO_BUFFER */
28 static inline int st_magn_probe_trigger(struct iio_dev *indio_dev, int irq)
29 {
30         return 0;
31 }
32 static inline void st_magn_remove_trigger(struct iio_dev *indio_dev, int irq)
33 {
34         return;
35 }
36 static inline int st_magn_allocate_ring(struct iio_dev *indio_dev)
37 {
38         return 0;
39 }
40 static inline void st_magn_deallocate_ring(struct iio_dev *indio_dev)
41 {
42 }
43 #endif /* CONFIG_IIO_BUFFER */
44
45 #endif /* ST_MAGN_H */