Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[deliverable/linux.git] / drivers / iio / pressure / st_pressure.h
CommitLineData
217494e5
DC
1/*
2 * STMicroelectronics pressures driver
3 *
4 * Copyright 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_PRESS_H
12#define ST_PRESS_H
13
14#include <linux/types.h>
15#include <linux/iio/common/st_sensors.h>
16
7885a8ce 17#define LPS001WP_PRESS_DEV_NAME "lps001wp"
93187840 18#define LPS25H_PRESS_DEV_NAME "lps25h"
217494e5
DC
19#define LPS331AP_PRESS_DEV_NAME "lps331ap"
20
23cde4d6
DC
21/**
22 * struct st_sensors_platform_data - default press platform data
23 * @drdy_int_pin: default press DRDY is available on INT1 pin.
24 */
25static const struct st_sensors_platform_data default_press_pdata = {
26 .drdy_int_pin = 1,
27};
28
0baa3fc1 29int st_press_common_probe(struct iio_dev *indio_dev);
217494e5
DC
30void st_press_common_remove(struct iio_dev *indio_dev);
31
32#ifdef CONFIG_IIO_BUFFER
33int st_press_allocate_ring(struct iio_dev *indio_dev);
34void st_press_deallocate_ring(struct iio_dev *indio_dev);
35int 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 */
38static inline int st_press_allocate_ring(struct iio_dev *indio_dev)
39{
40 return 0;
41}
42
43static inline void st_press_deallocate_ring(struct iio_dev *indio_dev)
44{
45}
46#define ST_PRESS_TRIGGER_SET_STATE NULL
47#endif /* CONFIG_IIO_BUFFER */
48
49#endif /* ST_PRESS_H */
This page took 0.250722 seconds and 5 git commands to generate.