summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2012-06-30 20:06:00 +0100
committerJonathan Cameron <jic23@kernel.org>2012-11-10 10:17:27 +0000
commit0464415dd21785aa8e8b12dbc939fcb5ca52f464 (patch)
tree36a5fff19aebcf8aa5eeff66ac8d8473a01765e8 /include/linux
parent84b36ce5f79c01f792c623f14e92ed86cdccb42f (diff)
downloadlinux-3.10-0464415dd21785aa8e8b12dbc939fcb5ca52f464.tar.gz
linux-3.10-0464415dd21785aa8e8b12dbc939fcb5ca52f464.tar.bz2
linux-3.10-0464415dd21785aa8e8b12dbc939fcb5ca52f464.zip
staging:iio:in kernel users: Add a data field for channel specific info.
Used to allow information about a given channel mapping to be passed through from board files to the consumer drivers. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/iio/consumer.h2
-rw-r--r--include/linux/iio/machine.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h
index e875bcf0478..57efee63a6d 100644
--- a/include/linux/iio/consumer.h
+++ b/include/linux/iio/consumer.h
@@ -18,10 +18,12 @@ struct iio_chan_spec;
* struct iio_channel - everything needed for a consumer to use a channel
* @indio_dev: Device on which the channel exists.
* @channel: Full description of the channel.
+ * @data: Data about the channel used by consumer.
*/
struct iio_channel {
struct iio_dev *indio_dev;
const struct iio_chan_spec *channel;
+ void *data;
};
/**
diff --git a/include/linux/iio/machine.h b/include/linux/iio/machine.h
index 809a3f08d5a..1601a2a63a7 100644
--- a/include/linux/iio/machine.h
+++ b/include/linux/iio/machine.h
@@ -19,11 +19,13 @@
* @consumer_dev_name: Name to uniquely identify the consumer device.
* @consumer_channel: Unique name used to identify the channel on the
* consumer side.
+ * @consumer_data: Data about the channel for use by the consumer driver.
*/
struct iio_map {
const char *adc_channel_label;
const char *consumer_dev_name;
const char *consumer_channel;
+ void *consumer_data;
};
#endif