]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iio: add read scale and offset services to iio backend framework
authorOlivier Moysan <olivier.moysan@foss.st.com>
Tue, 30 Jul 2024 08:46:31 +0000 (10:46 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 10 Aug 2024 10:17:34 +0000 (11:17 +0100)
commit0737158aabc278526c784f63b8dd8963cdc558a9
treeabee89fc7a94ac0e5f63aa9c65d99ac9e8c71e3d
parentc7668ac67bc21aebdd8e2d7f839bfffba31b7713
iio: add read scale and offset services to iio backend framework

Add iio_backend_read_scale() and iio_backend_read_offset() services
to read channel scale and offset from an IIO backbend device.

Also add a read_raw callback which replicates the read_raw callback of
the IIO framework, and is intended to request miscellaneous channel
attributes from the backend device.
Both scale and offset helpers use this callback.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Reviewed-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20240730084640.1307938-2-olivier.moysan@foss.st.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-backend.c
include/linux/iio/backend.h