summaryrefslogtreecommitdiffstats
path: root/include/linux/iio/iio.h
diff options
context:
space:
mode:
authorBenjamin Gaignard2017-04-27 15:29:15 +0200
committerJonathan Cameron2017-06-11 16:58:41 +0200
commitd89e119a088ec83881eda5645307ae252ecea33a (patch)
tree2e16f03c91a46897dedacb2ecffa9c3e9830d65b /include/linux/iio/iio.h
parentiio: Aspeed ADC - Handle return value of clk_prepare_enable (diff)
downloadkernel-qcow2-linux-d89e119a088ec83881eda5645307ae252ecea33a.tar.gz
kernel-qcow2-linux-d89e119a088ec83881eda5645307ae252ecea33a.tar.xz
kernel-qcow2-linux-d89e119a088ec83881eda5645307ae252ecea33a.zip
iio: add hardware triggered operating mode
Devices, like stm32 timer, could be triggered by hardware events which are not buffer or software events. However it could be necessary to validate the triggers like it is done for buffer or event triggered modes. This patch add a new INDIO_HARDWARE_TRIGGERED operating mode for this kind of devices and allow this mode to register trigger consumer. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/iio/iio.h')
-rw-r--r--include/linux/iio/iio.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 3f5ea2e9a39e..d68bec297a45 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -352,10 +352,16 @@ unsigned int iio_get_time_res(const struct iio_dev *indio_dev);
#define INDIO_BUFFER_SOFTWARE 0x04
#define INDIO_BUFFER_HARDWARE 0x08
#define INDIO_EVENT_TRIGGERED 0x10
+#define INDIO_HARDWARE_TRIGGERED 0x20
#define INDIO_ALL_BUFFER_MODES \
(INDIO_BUFFER_TRIGGERED | INDIO_BUFFER_HARDWARE | INDIO_BUFFER_SOFTWARE)
+#define INDIO_ALL_TRIGGERED_MODES \
+ (INDIO_BUFFER_TRIGGERED \
+ | INDIO_EVENT_TRIGGERED \
+ | INDIO_HARDWARE_TRIGGERED)
+
#define INDIO_MAX_RAW_ELEMENTS 4
struct iio_trigger; /* forward declaration */