diff options
author | Liam Beguin <liambeguin@gmail.com> | 2022-02-13 05:57:32 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-02-27 16:38:10 +0300 |
commit | a29c3283653b80b916c5ca5292c5d36415e38e92 (patch) | |
tree | 6ab85e42b9c5fab4b2126c6eb7e14c5b52cdfbfd /include/linux/iio/afe | |
parent | 701ee14da95dcd25c1bf20dea7c8335b70d73124 (diff) | |
download | linux-a29c3283653b80b916c5ca5292c5d36415e38e92.tar.xz |
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.h | 4 |
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__ */ |