mmc: rtsx_pci: Enable MMC_CAP_ERASE to allow erase/discard/trim requests
[linux/fpc-iii.git] / drivers / iio / magnetometer / st_magn.h
blob9daca46819222bedb73e166eda7d1607af6277c8
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 LSM303DLH_MAGN_DEV_NAME "lsm303dlh_magn"
18 #define LSM303DLHC_MAGN_DEV_NAME "lsm303dlhc_magn"
19 #define LSM303DLM_MAGN_DEV_NAME "lsm303dlm_magn"
20 #define LIS3MDL_MAGN_DEV_NAME "lis3mdl"
21 #define LSM303AGR_MAGN_DEV_NAME "lsm303agr_magn"
23 int st_magn_common_probe(struct iio_dev *indio_dev);
24 void st_magn_common_remove(struct iio_dev *indio_dev);
26 #ifdef CONFIG_IIO_BUFFER
27 int st_magn_allocate_ring(struct iio_dev *indio_dev);
28 void st_magn_deallocate_ring(struct iio_dev *indio_dev);
29 int st_magn_trig_set_state(struct iio_trigger *trig, bool state);
30 #define ST_MAGN_TRIGGER_SET_STATE (&st_magn_trig_set_state)
31 #else /* CONFIG_IIO_BUFFER */
32 static inline int st_magn_probe_trigger(struct iio_dev *indio_dev, int irq)
34 return 0;
36 static inline void st_magn_remove_trigger(struct iio_dev *indio_dev, int irq)
38 return;
40 static inline int st_magn_allocate_ring(struct iio_dev *indio_dev)
42 return 0;
44 static inline void st_magn_deallocate_ring(struct iio_dev *indio_dev)
47 #define ST_MAGN_TRIGGER_SET_STATE NULL
48 #endif /* CONFIG_IIO_BUFFER */
50 #endif /* ST_MAGN_H */