aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/consumer.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h
index 57efee63a6da..126c0a9375f2 100644
--- a/include/linux/iio/consumer.h
+++ b/include/linux/iio/consumer.h
@@ -61,6 +61,52 @@ struct iio_channel *iio_channel_get_all(const char *name);
61 */ 61 */
62void iio_channel_release_all(struct iio_channel *chan); 62void iio_channel_release_all(struct iio_channel *chan);
63 63
64struct iio_cb_buffer;
65/**
66 * iio_channel_get_all_cb() - register callback for triggered capture
67 * @name: Name of client device.
68 * @cb: Callback function.
69 * @private: Private data passed to callback.
70 *
71 * NB right now we have no ability to mux data from multiple devices.
72 * So if the channels requested come from different devices this will
73 * fail.
74 */
75struct iio_cb_buffer *iio_channel_get_all_cb(const char *name,
76 int (*cb)(u8 *data,
77 void *private),
78 void *private);
79/**
80 * iio_channel_release_all_cb() - release and unregister the callback.
81 * @cb_buffer: The callback buffer that was allocated.
82 */
83void iio_channel_release_all_cb(struct iio_cb_buffer *cb_buffer);
84
85/**
86 * iio_channel_start_all_cb() - start the flow of data through callback.
87 * @cb_buff: The callback buffer we are starting.
88 */
89int iio_channel_start_all_cb(struct iio_cb_buffer *cb_buff);
90
91/**
92 * iio_channel_stop_all_cb() - stop the flow of data through the callback.
93 * @cb_buff: The callback buffer we are stopping.
94 */
95void iio_channel_stop_all_cb(struct iio_cb_buffer *cb_buff);
96
97/**
98 * iio_channel_cb_get_channels() - get access to the underlying channels.
99 * @cb_buff: The callback buffer from whom we want the channel
100 * information.
101 *
102 * This function allows one to obtain information about the channels.
103 * Whilst this may allow direct reading if all buffers are disabled, the
104 * primary aim is to allow drivers that are consuming a channel to query
105 * things like scaling of the channel.
106 */
107struct iio_channel
108*iio_channel_cb_get_channels(const struct iio_cb_buffer *cb_buffer);
109
64/** 110/**
65 * iio_read_channel_raw() - read from a given channel 111 * iio_read_channel_raw() - read from a given channel
66 * @chan: The channel being queried. 112 * @chan: The channel being queried.