2 * STMicroelectronics pressures driver
4 * Copyright 2013 STMicroelectronics Inc.
6 * Denis Ciocca <denis.ciocca@st.com>
8 * Licensed under the GPL-2.
14 #include <linux/types.h>
15 #include <linux/iio/common/st_sensors.h>
17 #define LPS001WP_PRESS_DEV_NAME "lps001wp"
18 #define LPS331AP_PRESS_DEV_NAME "lps331ap"
21 * struct st_sensors_platform_data - default press platform data
22 * @drdy_int_pin: default press DRDY is available on INT1 pin.
24 static const struct st_sensors_platform_data default_press_pdata
= {
28 int st_press_common_probe(struct iio_dev
*indio_dev
,
29 struct st_sensors_platform_data
*pdata
);
30 void st_press_common_remove(struct iio_dev
*indio_dev
);
32 #ifdef CONFIG_IIO_BUFFER
33 int st_press_allocate_ring(struct iio_dev
*indio_dev
);
34 void st_press_deallocate_ring(struct iio_dev
*indio_dev
);
35 int st_press_trig_set_state(struct iio_trigger
*trig
, bool state
);
36 #define ST_PRESS_TRIGGER_SET_STATE (&st_press_trig_set_state)
37 #else /* CONFIG_IIO_BUFFER */
38 static inline int st_press_allocate_ring(struct iio_dev
*indio_dev
)
43 static inline void st_press_deallocate_ring(struct iio_dev
*indio_dev
)
46 #define ST_PRESS_TRIGGER_SET_STATE NULL
47 #endif /* CONFIG_IIO_BUFFER */
49 #endif /* ST_PRESS_H */