diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2011-06-27 13:07:10 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-28 14:39:34 -0700 |
commit | 5c04af04835269c194662be63fe168893fad667f (patch) | |
tree | 06bdc2180ad8390d5bd398314ca986bf17adb578 /drivers/staging/iio/iio.h | |
parent | 43a4360ea8f075540cb7c1efc8d643b4261eb901 (diff) |
iio: industrialio-core: iio_write_channel_info accept IIO_VAL_INT_PLUS_NANO
Allow iio_write_channel_info() to accept IIO_VAL_INT_PLUS_NANO
Changes since V1:
use callback to query expected format/precision
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/iio.h')
-rw-r--r-- | drivers/staging/iio/iio.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/iio/iio.h b/drivers/staging/iio/iio.h index 6e51baaaa75..9ca89c7d569 100644 --- a/drivers/staging/iio/iio.h +++ b/drivers/staging/iio/iio.h @@ -220,6 +220,9 @@ struct iio_trigger; /* forward declaration */ * contain the elements making up the returned value. * @write_raw: function to write a value to the device. * Parameters are the same as for read_raw. + * @write_raw_get_fmt: callback function to query the expected + * format/precision. If not set by the driver, write_raw + * returns IIO_VAL_INT_PLUS_MICRO. * @read_event_config: find out if the event is enabled. * @write_event_config: set if the event is enabled. * @read_event_value: read a value associated with the event. Meaning @@ -247,6 +250,10 @@ struct iio_info { int val2, long mask); + int (*write_raw_get_fmt)(struct iio_dev *indio_dev, + struct iio_chan_spec const *chan, + long mask); + int (*read_event_config)(struct iio_dev *indio_dev, int event_code); |