[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdX39Bdg_LBry8QmGTR9Z=CNs6xGksFbzJw-8oDt4CcOqQ@mail.gmail.com>
Date: Fri, 9 Jan 2026 14:49:12 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@...esas.com>
Cc: John Madieu <john.madieu.xa@...renesas.com>, "Rafael J . Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
Lukasz Luba <lukasz.luba@....com>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>, Magnus Damm <magnus.damm@...il.com>, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH v5 3/5] thermal: renesas: rzg3e: make calibration value
retrieval per-chip
On Thu, 8 Jan 2026 at 20:53, Cosmin Tanislav
<cosmin-gabriel.tanislav.xa@...esas.com> wrote:
> The Renesas RZ/T2H (R9A09G077) and RZ/N2H (R9A09G087) SoCs expose the
> temperature calibration data via SMC SIP calls.
>
> To prepare for supporting these SoCs, do the following changes.
>
> Rename rzg3e_thermal_parse_dt() to rzg3e_thermal_get_syscon_trim().
>
> Move the syscon usage out of rzg3e_thermal_get_calibration() and into
> rzg3e_thermal_get_syscon_trim() and remove single-use variables from the
> private state.
>
> Place a pointer to rzg3e_thermal_get_syscon_trim() into the
> chip-specific struct, and use it in the probe function to retrieve the
> calibration values.
>
> Now that syscon usage has been moved out of
> rzg3e_thermal_get_calibration(), remove it and inline the calibration
> validation into the probe function.
>
> Also, reuse the TSU_CODE_MAX macro to mask the calibration values, as
> GEMASK(11, 0) and 0xFFF are equivalent, and replace the hardcoded 0xFFF
> with TSU_CODE_MAX in the calibration validation.
>
> Reviewed-by: John Madieu <john.madieu.xa@...renesas.com>
> Tested-by: John Madieu <john.madieu.xa@...renesas.com>
> Signed-off-by: Cosmin Tanislav <cosmin-gabriel.tanislav.xa@...esas.com>
> ---
>
> V5:
> * replace hardcoded 0xFFF values with TSU_CODE_MAX
>
> V4:
> * pick up John's Reviewed-by and Tested-by
> * replace new macro TSU_TEMP_MASK usage with existing macro
> TSU_CODE_MAX
> * remove "Validate calibration data" comments
> * inline rzg3e_validate_calibration() into rzg3e_thermal_probe()
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists