aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio/consumer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/iio/consumer.h')
-rw-r--r--include/linux/iio/consumer.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h
index 16c35ac045bd..833926c91aa8 100644
--- a/include/linux/iio/consumer.h
+++ b/include/linux/iio/consumer.h
@@ -15,6 +15,7 @@
15 15
16struct iio_dev; 16struct iio_dev;
17struct iio_chan_spec; 17struct iio_chan_spec;
18struct device;
18 19
19/** 20/**
20 * struct iio_channel - everything needed for a consumer to use a channel 21 * struct iio_channel - everything needed for a consumer to use a channel
@@ -30,14 +31,15 @@ struct iio_channel {
30 31
31/** 32/**
32 * iio_channel_get() - get description of all that is needed to access channel. 33 * iio_channel_get() - get description of all that is needed to access channel.
33 * @name: Unique name of the device as provided in the iio_map 34 * @dev: Pointer to consumer device. Device name must match
35 * the name of the device as provided in the iio_map
34 * with which the desired provider to consumer mapping 36 * with which the desired provider to consumer mapping
35 * was registered. 37 * was registered.
36 * @consumer_channel: Unique name to identify the channel on the consumer 38 * @consumer_channel: Unique name to identify the channel on the consumer
37 * side. This typically describes the channels use within 39 * side. This typically describes the channels use within
38 * the consumer. E.g. 'battery_voltage' 40 * the consumer. E.g. 'battery_voltage'
39 */ 41 */
40struct iio_channel *iio_channel_get(const char *name, 42struct iio_channel *iio_channel_get(struct device *dev,
41 const char *consumer_channel); 43 const char *consumer_channel);
42 44
43/** 45/**
@@ -48,14 +50,14 @@ void iio_channel_release(struct iio_channel *chan);
48 50
49/** 51/**
50 * iio_channel_get_all() - get all channels associated with a client 52 * iio_channel_get_all() - get all channels associated with a client
51 * @name: name of consumer device. 53 * @dev: Pointer to consumer device.
52 * 54 *
53 * Returns an array of iio_channel structures terminated with one with 55 * Returns an array of iio_channel structures terminated with one with
54 * null iio_dev pointer. 56 * null iio_dev pointer.
55 * This function is used by fairly generic consumers to get all the 57 * This function is used by fairly generic consumers to get all the
56 * channels registered as having this consumer. 58 * channels registered as having this consumer.
57 */ 59 */
58struct iio_channel *iio_channel_get_all(const char *name); 60struct iio_channel *iio_channel_get_all(struct device *dev);
59 61
60/** 62/**
61 * iio_channel_release_all() - reverse iio_channel_get_all 63 * iio_channel_release_all() - reverse iio_channel_get_all
@@ -66,7 +68,7 @@ void iio_channel_release_all(struct iio_channel *chan);
66struct iio_cb_buffer; 68struct iio_cb_buffer;
67/** 69/**
68 * iio_channel_get_all_cb() - register callback for triggered capture 70 * iio_channel_get_all_cb() - register callback for triggered capture
69 * @name: Name of client device. 71 * @dev: Pointer to client device.
70 * @cb: Callback function. 72 * @cb: Callback function.
71 * @private: Private data passed to callback. 73 * @private: Private data passed to callback.
72 * 74 *
@@ -74,7 +76,7 @@ struct iio_cb_buffer;
74 * So if the channels requested come from different devices this will 76 * So if the channels requested come from different devices this will
75 * fail. 77 * fail.
76 */ 78 */
77struct iio_cb_buffer *iio_channel_get_all_cb(const char *name, 79struct iio_cb_buffer *iio_channel_get_all_cb(struct device *dev,
78 int (*cb)(u8 *data, 80 int (*cb)(u8 *data,
79 void *private), 81 void *private),
80 void *private); 82 void *private);