summaryrefslogtreecommitdiff
path: root/include/linux/iio/afe
diff options
context:
space:
mode:
authorLiam Beguin <liambeguin@gmail.com>2022-02-12 21:57:32 -0500
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-02-27 13:38:10 +0000
commita29c3283653b80b916c5ca5292c5d36415e38e92 (patch)
tree6ab85e42b9c5fab4b2126c6eb7e14c5b52cdfbfd /include/linux/iio/afe
parent701ee14da95dcd25c1bf20dea7c8335b70d73124 (diff)
iio: afe: rescale: add offset support
This is a preparatory change required for the addition of temperature sensing front ends. Signed-off-by: Liam Beguin <liambeguin@gmail.com> Reviewed-by: Peter Rosin <peda@axentia.se> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220213025739.2561834-4-liambeguin@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio/afe')
-rw-r--r--include/linux/iio/afe/rescale.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/iio/afe/rescale.h b/include/linux/iio/afe/rescale.h
index 8a2eb34af327..6eecb435488f 100644
--- a/include/linux/iio/afe/rescale.h
+++ b/include/linux/iio/afe/rescale.h
@@ -25,8 +25,12 @@ struct rescale {
bool chan_processed;
s32 numerator;
s32 denominator;
+ s32 offset;
};
int rescale_process_scale(struct rescale *rescale, int scale_type,
int *val, int *val2);
+int rescale_process_offset(struct rescale *rescale, int scale_type,
+ int scale, int scale2, int schan_off,
+ int *val, int *val2);
#endif /* __IIO_RESCALE_H__ */