[PATCH 0/2] hwmon: (cros_ec) Rework the temperature conversions

Thomas Weißschuh <[email protected]> Tue, 30 Jun 2026 22:57:50 +0200
Newsgroups dev.linux.lists.chrome-platform,org.kernel.vger.linux-hwmon,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Align the temperature conversion to the one inside the EC itself
to preserve nice round integer degree values.
Also handle overflows.

Patch 1 was originally part of [0], but I'll need more time for the new
functionality, and these patches are useful either way.

[0] https://lore.kernel.org/lkml/20260529-cros_ec-hwmon-fan-curve-v1-0-da6792b3830f@weissschuh.net/

Signed-off-by: Thomas Weißschuh <[email protected]>
---
Thomas Weißschuh (2):
      hwmon: (cros_ec) Implement custom kelvin to celsius conversions
      hwmon: (cros_ec) Handle temperature conversion overflows

 drivers/hwmon/cros_ec_hwmon.c | 34 ++++++++++++++++++++++++++++++----
 1 file changed, 30 insertions(+), 4 deletions(-)
---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260630-cros_ec-hwmon-overflow-0381c8509df3

Best regards,
--  
Thomas Weißschuh <[email protected]>