Merge tag 'gpio-v3.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[linux-2.6.git] / drivers / iio / magnetometer / st_magn.h
blob694e33e0fb722f4d210904984c227a26dc4e4af1
1 /*
2 * STMicroelectronics magnetometers driver
4 * Copyright 2012-2013 STMicroelectronics Inc.
6 * Denis Ciocca <denis.ciocca@st.com>
7 * v. 1.0.0
8 * Licensed under the GPL-2.
9 */
11 #ifndef ST_MAGN_H
12 #define ST_MAGN_H
14 #include <linux/types.h>
15 #include <linux/iio/common/st_sensors.h>
17 #define LSM303DLHC_MAGN_DEV_NAME "lsm303dlhc_magn"
18 #define LSM303DLM_MAGN_DEV_NAME "lsm303dlm_magn"
19 #define LIS3MDL_MAGN_DEV_NAME "lis3mdl"
21 int st_magn_common_probe(struct iio_dev *indio_dev,
22 struct st_sensors_platform_data *pdata);
23 void st_magn_common_remove(struct iio_dev *indio_dev);
25 #ifdef CONFIG_IIO_BUFFER
26 int st_magn_allocate_ring(struct iio_dev *indio_dev);
27 void st_magn_deallocate_ring(struct iio_dev *indio_dev);
28 #else /* CONFIG_IIO_BUFFER */
29 static inline int st_magn_probe_trigger(struct iio_dev *indio_dev, int irq)
31 return 0;
33 static inline void st_magn_remove_trigger(struct iio_dev *indio_dev, int irq)
35 return;
37 static inline int st_magn_allocate_ring(struct iio_dev *indio_dev)
39 return 0;
41 static inline void st_magn_deallocate_ring(struct iio_dev *indio_dev)
44 #endif /* CONFIG_IIO_BUFFER */
46 #endif /* ST_MAGN_H */