RE: [PATCH v7 3/6] thermal: renesas: rzg3e: Add thermal driver for the Renesas RZ/G3E SoC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

Thanks for your feedback!

> -----Original Message-----
> From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Sent: Tuesday, August 19, 2025 9:50 AM
> To: John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> Subject: Re: [PATCH v7 3/6] thermal: renesas: rzg3e: Add thermal driver for
> the Renesas RZ/G3E SoC
> 
> Hi John,
> 
> On Mon, 18 Aug 2025 at 18:29, John Madieu <john.madieu.xa@xxxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxxx>
> 
> > 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().

Thanks! Will use this fixed_args() variant in next series and remove
adapt the code accordingly.

> 
> > +               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,

Regards,
John

> 
>                         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




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux