From f9f13c06f6b97a4e39465c861384128379c6adb1 Mon Sep 17 00:00:00 2001 From: Jonathan Cameron Date: Sat, 30 Jun 2012 20:06:00 +0100 Subject: [PATCH] --- yaml --- r: 337702 b: refs/heads/master c: 0464415dd21785aa8e8b12dbc939fcb5ca52f464 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/iio/inkern.c | 1 + trunk/include/linux/iio/consumer.h | 2 ++ trunk/include/linux/iio/machine.h | 2 ++ 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 4d4f251b8507..6efd8bc75f02 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 84b36ce5f79c01f792c623f14e92ed86cdccb42f +refs/heads/master: 0464415dd21785aa8e8b12dbc939fcb5ca52f464 diff --git a/trunk/drivers/iio/inkern.c b/trunk/drivers/iio/inkern.c index b394621d362c..d55e98fb300e 100644 --- a/trunk/drivers/iio/inkern.c +++ b/trunk/drivers/iio/inkern.c @@ -203,6 +203,7 @@ struct iio_channel *iio_channel_get_all(const char *name) if (name && strcmp(name, c->map->consumer_dev_name) != 0) continue; chans[mapind].indio_dev = c->indio_dev; + chans[mapind].data = c->map->consumer_data; chans[mapind].channel = iio_chan_spec_from_name(chans[mapind].indio_dev, c->map->adc_channel_label); diff --git a/trunk/include/linux/iio/consumer.h b/trunk/include/linux/iio/consumer.h index e875bcf0478f..57efee63a6da 100644 --- a/trunk/include/linux/iio/consumer.h +++ b/trunk/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/trunk/include/linux/iio/machine.h b/trunk/include/linux/iio/machine.h index 809a3f08d5a5..1601a2a63a72 100644 --- a/trunk/include/linux/iio/machine.h +++ b/trunk/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