aboutsummaryrefslogtreecommitdiff
path: root/lib/polynomial.c
AgeCommit message (Collapse)AuthorFilesLines
2022-05-22lib: add generic polynomial calculationMichael Walle1-0/+108
Some temperature and voltage sensors use a polynomial to convert between raw data points and actual temperature or voltage. The polynomial is usually the result of a curve fitting of the diode characteristic. The BT1 PVT hwmon driver already uses such a polynonmial calculation which is rather generic. Move it to lib/ so other drivers can reuse it. Signed-off-by: Michael Walle <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>