[PATCH] thermal: Convert .get_temp() return value to millicelsius

Quentin Schulz quentin.schulz at cherry.de
Mon Sep 8 11:38:18 CEST 2025


Hi Marek,

On 9/6/25 2:05 AM, Marek Vasut wrote:
> Linux kernel .get_temp() callback reports values in millicelsius,
> U-Boot currently reports them in celsius. Align the two and report
> in millicelsius. Update drivers accordingly. Update callsites that
> use thermal_get_temp() as well.
> 
> The 'temperature' command now reports temperature in millicelsius
> as well, with additional accuracy. This changes command line ABI
> slightly.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
> Cc: "NXP i.MX U-Boot Team" <uboot-imx at nxp.com>
> Cc: Adam Ford <aford173 at gmail.com>
> Cc: Alice Guo <alice.guo at nxp.com>
> Cc: Andrew Goodbody <andrew.goodbody at linaro.org>
> Cc: David Zang <davidzangcs at gmail.com>
> Cc: Fabio Estevam <festevam at gmail.com>
> Cc: Jaehoon Chung <jh80.chung at samsung.com>
> Cc: Mathieu Othacehe <othacehe at gnu.org>
> Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
> Cc: Peng Fan <peng.fan at nxp.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Stefano Babic <sbabic at nabladev.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Ye Li <ye.li at nxp.com>
> Cc: u-boot at lists.denx.de
> ---
>   arch/arm/mach-imx/cpu.c             | 1 +
>   arch/arm/mach-imx/imx8ulp/soc.c     | 2 +-
>   cmd/temperature.c                   | 2 +-
>   drivers/cpu/imx8_cpu.c              | 2 +-
>   drivers/mmc/omap_hsmmc.c            | 1 +
>   drivers/thermal/imx_scu_thermal.c   | 2 +-
>   drivers/thermal/imx_thermal.c       | 2 +-
>   drivers/thermal/imx_tmu.c           | 2 +-
>   drivers/thermal/rcar_gen3_thermal.c | 6 +++---

I don't see this file in master or next branches, did I miss something?

Otherwise looks ok to me, so:

Reviewed-by: Quentin Schulz <quentin.schulz at cherry.de>

I'm wondering if we shouldn't keep the output of the cmd in °C instead 
of °mC?

Cheers,
Quentin


More information about the U-Boot mailing list