From cd705ea857fdd859a9df09e8adda4cb4c906e8a2 Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Fri, 1 Apr 2022 23:40:29 +0200 Subject: lib: add generic polynomial calculation 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 Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20220401214032.3738095-2-michael@walle.cc Signed-off-by: Guenter Roeck --- lib/Kconfig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Kconfig') diff --git a/lib/Kconfig b/lib/Kconfig index 087e06b4cdfd..6a843639814f 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -737,3 +737,6 @@ config PLDMFW config ASN1_ENCODER tristate + +config POLYNOMIAL + tristate -- cgit