Re: [PATCH 1/5] hwmon: (cros_ec) Implement custom kelvin to celsius conversions

From: Guenter Roeck

Date: Tue Jun 09 2026 - 16:51:15 EST


On Fri, May 29, 2026 at 10:31:52PM +0200, Thomas Weißschuh wrote:
> The ChromeOS EC APIs use integers representing degrees kelvin for
> temperatures. The default conversions from linux/units.h will then
> always convert these integer degrees celsius with a 150 millidegree
> offset. This is a bit confusing, as it also differs from other CrOS EC
> tooling. Internally the EC uses a kelvin to celsius offset of a round
> 273, so the current conversion is also not entirely accurate.
>
> Implement a custom conversion which preserves round values.
>
> Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>

Applied.

Thanks,
Guenter