devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: John Madieu <john.madieu.xa@bp.renesas.com>
Cc: magnus.damm@gmail.com, mturquette@baylibre.com, sboyd@kernel.org,
	 rafael@kernel.org, daniel.lezcano@linaro.org,
	rui.zhang@intel.com,  lukasz.luba@arm.com, robh@kernel.org,
	krzk+dt@kernel.org, conor+dt@kernel.org,  p.zabel@pengutronix.de,
	catalin.marinas@arm.com, will@kernel.org,  john.madieu@gmail.com,
	linux-renesas-soc@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org,  devicetree@vger.kernel.org,
	biju.das.jz@bp.renesas.com,
	 linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 3/6] thermal: renesas: rzg3e: Add thermal driver for the Renesas RZ/G3E SoC
Date: Tue, 19 Aug 2025 09:49:56 +0200	[thread overview]
Message-ID: <CAMuHMdUGmbn1H2JV17+9gTYBbnEOmoR9vUevWVx5BTX973MfoQ@mail.gmail.com> (raw)
In-Reply-To: <20250818162859.9661-4-john.madieu.xa@bp.renesas.com>

Hi John,

On Mon, 18 Aug 2025 at 18:29, John Madieu <john.madieu.xa@bp.renesas.com> wrote:
> The RZ/G3E SoC integrates a Temperature Sensor Unit (TSU) block designed
> to monitor the chip's junction temperature. This sensor is connected to
> channel 1 of the APB port clock/reset and provides temperature measurements.
>
> It also requires calibration values stored in the system controller registers
> for accurate temperature measurement. Add a driver for the Renesas RZ/G3E TSU.
>
> Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>

> v7: Refactored driver structure:
>   - removes splinlock usage
>   - updates polling timeout as per the datasheet
>   - uses average mode to be more accurate
>   - uses polling (faster than irq mode) for get_temp() while keeping IRQ for hw
>   trip-point cross detection.
>   - adds both runtime and sleep PM support

Thanks for the update!

I only looked at the code to obtain the trim register offsets.

> --- /dev/null
> +++ b/drivers/thermal/renesas/rzg3e_thermal.c

> +static int rzg3e_thermal_parse_dt(struct rzg3e_thermal_priv *priv)
> +{
> +       struct device_node *np = priv->dev->of_node;
> +       struct of_phandle_args args;
> +       int ret;
> +
> +       ret = of_parse_phandle_with_args(np, "renesas,tsu-trim",
> +                                        "#address-cells", 0, &args);

of_parse_phandle_with_fixed_args(np, "renesas,tsu-trim", 1, 0, &args)

> +       if (ret)
> +               return dev_err_probe(priv->dev, ret,
> +                                    "Failed to parse renesas,tsu-trim\n");
> +
> +       if (args.args_count < 1) {

"!= 1", however, I think this test is no longer needed after moving
to of_parse_phandle_with_fixed_args().

> +               dev_err(priv->dev, "Invalid renesas,tsu-trim property\n");
> +               of_node_put(args.np);
> +               return -EINVAL;
> +       }
> +
> +       priv->trim_offset = args.args[0];
> +
> +       priv->syscon = syscon_node_to_regmap(args.np);
> +       of_node_put(args.np);
> +
> +       if (IS_ERR(priv->syscon))
> +               return dev_err_probe(priv->dev, PTR_ERR(priv->syscon),
> +                                    "Failed to get syscon regmap\n");
> +
> +       return 0;
> +}
Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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

  reply	other threads:[~2025-08-19  7:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 16:28 [PATCH v7 0/6] thermal: renesas: Add support for RZ/G3E John Madieu
2025-08-18 16:28 ` [PATCH v7 1/6] soc: renesas: rz-sysc: Add syscon/regmap support John Madieu
2025-08-19  5:07   ` claudiu beznea
2025-08-19  7:54   ` Geert Uytterhoeven
2025-08-18 16:28 ` [PATCH v7 2/6] dt-bindings: thermal: r9a09g047-tsu: Document the TSU unit John Madieu
2025-08-21  0:05   ` Rob Herring
2025-08-18 16:28 ` [PATCH v7 3/6] thermal: renesas: rzg3e: Add thermal driver for the Renesas RZ/G3E SoC John Madieu
2025-08-19  7:49   ` Geert Uytterhoeven [this message]
2025-08-19  8:23     ` John Madieu
2025-08-18 16:28 ` [PATCH v7 4/6] arm64: dts: renesas: r9a09g047: Add #address-cells property in sys node John Madieu
2025-08-19  7:44   ` Geert Uytterhoeven
2025-08-19  8:25     ` John Madieu
2025-08-18 16:28 ` [PATCH v7 5/6] arm64: dts: renesas: r9a09g047: Add TSU node John Madieu
2025-08-18 16:28 ` [PATCH v7 6/6] arm64: defconfig: Enable the Renesas RZ/G3E thermal driver John Madieu
2025-08-18 18:24 ` [PATCH v7 0/6] thermal: renesas: Add support for RZ/G3E Rob Herring (Arm)
2025-08-19  8:49   ` John Madieu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMuHMdUGmbn1H2JV17+9gTYBbnEOmoR9vUevWVx5BTX973MfoQ@mail.gmail.com \
    --to=geert@linux-m68k.org \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=john.madieu.xa@bp.renesas.com \
    --cc=john.madieu@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=magnus.damm@gmail.com \
    --cc=mturquette@baylibre.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=sboyd@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).