Thread (39 messages) 39 messages, 8 authors, 2025-02-05

Re: [PATCH 4/6] thermal: renesas: rzg3s: Add thermal driver for the Renesas RZ/G3S SoC

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2025-01-27 08:54:57
Also in: linux-clk, linux-devicetree, linux-iio, linux-pm, linux-renesas-soc, lkml

Hi Claudiu,

On Mon, 27 Jan 2025 at 09:33, Claudiu Beznea [off-list ref] wrote:
On 25.01.2025 14:18, Jonathan Cameron wrote:
quoted
On Wed, 22 Jan 2025 11:29:19 +0100
Geert Uytterhoeven [off-list ref] wrote:
quoted
On Fri, Jan 3, 2025 at 5:38 PM Claudiu [off-list ref] wrote:
quoted
From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>

The Renesas RZ/G3S SoC features a Thermal Sensor Unit (TSU) that reports
the junction temperature. The temperature is reported through a dedicated
ADC channel. Add a driver for the Renesas RZ/G3S TSU.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Thanks for your patch!
quoted
--- /dev/null
+++ b/drivers/thermal/renesas/rzg3s_thermal.c
quoted
+static int rzg3s_thermal_probe(struct platform_device *pdev)
+{
+       struct rzg3s_thermal_priv *priv;
+       struct device *dev = &pdev->dev;
+       int ret;
+
+       priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
+       if (!priv)
+               return -ENOMEM;
+
+       priv->base = devm_platform_ioremap_resource(pdev, 0);
+       if (IS_ERR(priv->base))
+               return PTR_ERR(priv->base);
+
+       priv->channel = devm_iio_channel_get(dev, "tsu");
Given there's only a single IIO channel, you could pass NULL instead
of the name, and drop "io-channel-names" from the DT bindings.
I don't know what's the IIO policy w.r.t. unnamed channels, though.
It's supported, so fine as long as no future additional names show up.
Will just fallback to index 0 I think.
If everyone agrees, I would keep the name, too, to avoid complications in
case this IP variant will be extended on future SoCs.
Fine for me.

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help