summaryrefslogtreecommitdiffstats
path: root/drivers/iio/iio_core.h
diff options
context:
space:
mode:
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>2014-04-29 00:51:00 +0100
committerJonathan Cameron <jic23@kernel.org>2014-04-29 22:05:32 +0100
commit9fbfb4b37ed23f71aa9484484266381c6c6964cb (patch)
tree441b1f942d51a1729d10a3237c7a28853f482ff9 /drivers/iio/iio_core.h
parent3046365bb470f0ec2f7cf5cb07a8ee7e4b490103 (diff)
downloadlinux-9fbfb4b37ed23f71aa9484484266381c6c6964cb.tar.bz2
IIO: core: Introduce read_raw_multi
This callback is introduced to overcome some limitations of existing read_raw callback. The functionality of both existing read_raw and read_raw_multi is similar, both are used to request values from the device. The current read_raw callback allows only two return values. The new read_raw_multi allows returning multiple values. Instead of passing just address of val and val2, it passes length and pointer to values. Depending on the type and length of passed buffer, iio client drivers can return multiple values. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/iio_core.h')
-rw-r--r--drivers/iio/iio_core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/iio_core.h b/drivers/iio/iio_core.h
index f6db6af36ba6..5f0ea77fe717 100644
--- a/drivers/iio/iio_core.h
+++ b/drivers/iio/iio_core.h
@@ -35,7 +35,7 @@ int __iio_add_chan_devattr(const char *postfix,
struct list_head *attr_list);
void iio_free_chan_devattr_list(struct list_head *attr_list);
-ssize_t iio_format_value(char *buf, unsigned int type, int val, int val2);
+ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals);
/* Event interface flags */
#define IIO_BUSY_BIT_POS 1