diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2014-11-27 01:42:45 +0300 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-12-12 15:28:27 +0300 |
commit | f9380e7123863a4cb0627d940533be954a0a15df (patch) | |
tree | c85e2a56d3c30e6380314acb2179f773dfd1420d /include/linux/iio | |
parent | c75b8dc84fd28511224a4cd2bfa791bb56a06172 (diff) | |
download | linux-f9380e7123863a4cb0627d940533be954a0a15df.tar.xz |
iio: inkern: add iio_write_channel_raw
Introduce API for easy in-kernel setting of DAC values.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/iio')
-rw-r--r-- | include/linux/iio/consumer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h index 651f9a0e2765..6f64624f329b 100644 --- a/include/linux/iio/consumer.h +++ b/include/linux/iio/consumer.h @@ -151,6 +151,16 @@ int iio_read_channel_average_raw(struct iio_channel *chan, int *val); int iio_read_channel_processed(struct iio_channel *chan, int *val); /** + * iio_write_channel_raw() - write to a given channel + * @chan: The channel being queried. + * @val: Value being written. + * + * Note raw writes to iio channels are in dac counts and hence + * scale will need to be applied if standard units required. + */ +int iio_write_channel_raw(struct iio_channel *chan, int val); + +/** * iio_get_channel_type() - get the type of a channel * @channel: The channel being queried. * @type: The type of the channel. |