diff options
author | Arnaud Pouliquen <arnaud.pouliquen@st.com> | 2018-01-10 11:13:13 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-01-10 10:30:14 +0000 |
commit | 16cbca06fa8288a4f58426fc898b141e12ee8008 (patch) | |
tree | 74b875e2df0adae7b84afae5531fedaa7253029b /include/linux/iio | |
parent | eca949800d2dd761bc0c73b793e4e9ad4a997469 (diff) | |
download | linux-16cbca06fa8288a4f58426fc898b141e12ee8008.tar.gz linux-16cbca06fa8288a4f58426fc898b141e12ee8008.tar.bz2 linux-16cbca06fa8288a4f58426fc898b141e12ee8008.zip |
IIO: consumer: allow to set buffer sizes
Add iio consumer API to set buffer size and watermark according
to sysfs API.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/iio')
-rw-r--r-- | include/linux/iio/consumer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/iio/consumer.h b/include/linux/iio/consumer.h index 2017f35db17c..9887f4f8e2a8 100644 --- a/include/linux/iio/consumer.h +++ b/include/linux/iio/consumer.h @@ -134,6 +134,17 @@ struct iio_cb_buffer *iio_channel_get_all_cb(struct device *dev, void *private), void *private); /** + * iio_channel_cb_set_buffer_watermark() - set the buffer watermark. + * @cb_buffer: The callback buffer from whom we want the channel + * information. + * @watermark: buffer watermark in bytes. + * + * This function allows to configure the buffer watermark. + */ +int iio_channel_cb_set_buffer_watermark(struct iio_cb_buffer *cb_buffer, + size_t watermark); + +/** * iio_channel_release_all_cb() - release and unregister the callback. * @cb_buffer: The callback buffer that was allocated. */ |