]> git.baikalelectronics.ru Git - kernel.git/commit
IIO: core: Introduce read_raw_multi
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Mon, 28 Apr 2014 23:51:00 +0000 (00:51 +0100)
committerJonathan Cameron <jic23@kernel.org>
Tue, 29 Apr 2014 21:05:32 +0000 (22:05 +0100)
commitebb1efc57a1da69ec768681c8a880e63eedc4351
tree441b1f942d51a1729d10a3237c7a28853f482ff9
parente66e66b656bf7a812e6d3cdb1b4febf55d7a6c05
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>
drivers/iio/iio_core.h
drivers/iio/industrialio-core.c
drivers/iio/industrialio-event.c
drivers/iio/inkern.c
include/linux/iio/iio.h
include/linux/iio/types.h