diff options
author | Artur Rojek <contact@artur-rojek.eu> | 2019-03-23 18:28:06 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-04-14 11:11:00 +0100 |
commit | 9f421096a16e75d22e69f766206f1bb0dc8fcf90 (patch) | |
tree | b9cd33e7f4491e2a5e661b1023dbeb0d180949af /include/linux/iio | |
parent | 1c163f4c7b3f621efff9b28a47abb36f7378d783 (diff) | |
download | linux-9f421096a16e75d22e69f766206f1bb0dc8fcf90.tar.gz linux-9f421096a16e75d22e69f766206f1bb0dc8fcf90.tar.bz2 linux-9f421096a16e75d22e69f766206f1bb0dc8fcf90.zip |
iio: inkern: API for reading available iio channel attribute values
Extend the inkern API with a function for reading available
attribute values of iio channels.
Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio')
-rw-r--r-- | include/linux/iio/consumer.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h index 9887f4f8e2a8..b2d34831ed7c 100644 --- a/include/linux/iio/consumer.h +++ b/include/linux/iio/consumer.h @@ -291,6 +291,20 @@ int iio_read_avail_channel_raw(struct iio_channel *chan, const int **vals, int *length); /** + * iio_read_avail_channel_attribute() - read available channel attribute values + * @chan: The channel being queried. + * @vals: Available values read back. + * @type: Type of values read back. + * @length: Number of entries in vals. + * @attribute: info attribute to be read back. + * + * Returns an error code, IIO_AVAIL_RANGE or IIO_AVAIL_LIST. + */ +int iio_read_avail_channel_attribute(struct iio_channel *chan, + const int **vals, int *type, int *length, + enum iio_chan_info_enum attribute); + +/** * iio_get_channel_type() - get the type of a channel * @channel: The channel being queried. * @type: The type of the channel. |