From: Biju Das <biju.das.jz@bp.renesas.com>
To: ALOK TIWARI <alok.a.tiwari@oracle.com>,
John Madieu <john.madieu.xa@bp.renesas.com>,
"geert+renesas@glider.be" <geert+renesas@glider.be>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"rafael@kernel.org" <rafael@kernel.org>,
"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>
Cc: "magnus.damm@gmail.com" <magnus.damm@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"john.madieu@gmail.com" <john.madieu@gmail.com>,
"rui.zhang@intel.com" <rui.zhang@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"sboyd@kernel.org" <sboyd@kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"lukasz.luba@arm.com" <lukasz.luba@arm.com>
Subject: RE: Re : [PATCH v5 3/5] thermal: renesas: rzg3e: Add thermal driver for the Renesas RZ/G3E SoC
Date: Mon, 31 Mar 2025 18:20:56 +0000 [thread overview]
Message-ID: <TY3PR01MB11346D38AB3F925DA2F46A5CA86AD2@TY3PR01MB11346.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <a380c593-a2a4-40d2-8b2f-e3e1a2cdbe9e@oracle.com>
Hi Alok,
> -----Original Message-----
> From: ALOK TIWARI <alok.a.tiwari@oracle.com>
> Sent: 31 March 2025 19:11
> Subject: Re : [PATCH v5 3/5] thermal: renesas: rzg3e: Add thermal driver for the Renesas RZ/G3E SoC
>
>
>
> On 31-03-2025 03:19, John Madieu 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>
> > ---
> > v1 -> v2: fixes IRQ names
> > v2 -> v3: no changes
> > v3 -> v4: no changes
> > v5: removes curly braces arround single-line protected scoped guards
> >
> > MAINTAINERS | 7 +
> > drivers/thermal/renesas/Kconfig | 7 +
> > drivers/thermal/renesas/Makefile | 1 +
> > drivers/thermal/renesas/rzg3e_thermal.c | 443 ++++++++++++++++++++++++
> > 4 files changed, 458 insertions(+)
> > create mode 100644 drivers/thermal/renesas/rzg3e_thermal.c
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS index
> > b9f7d2115b57..ba7c95146f01 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -20289,6 +20289,13 @@ S: Maintained
> > F: Documentation/devicetree/bindings/iio/potentiometer/renesas,x9250.yaml
> > F: drivers/iio/potentiometer/x9250.c
> >
> > +RENESAS RZ/G3E THERMAL SENSOR UNIT DRIVER
> > +M: John Madieu <john.madieu.xa@bp.renesas.com>
> > +L: linux-pm@vger.kernel.org
> > +S: Maintained
> > +F: Documentation/devicetree/bindings/thermal/renesas,r9a09g047-tsu.yaml
> > +F: drivers/thermal/renesas/rzg3e_thermal.c
> > +
> > RESET CONTROLLER FRAMEWORK
> > M: Philipp Zabel <p.zabel@pengutronix.de>
> > S: Maintained
> > diff --git a/drivers/thermal/renesas/Kconfig
> > b/drivers/thermal/renesas/Kconfig index dcf5fc5ae08e..10cf90fc4bfa
> > 100644
> > --- a/drivers/thermal/renesas/Kconfig
> > +++ b/drivers/thermal/renesas/Kconfig
> > @@ -26,3 +26,10 @@ config RZG2L_THERMAL
> > help
> > Enable this to plug the RZ/G2L thermal sensor driver into the Linux
> > thermal framework.
> > +
> > +config RZG3E_THERMAL
> > + tristate "Renesas RZ/G3E thermal driver"
> > + depends on ARCH_RENESAS || COMPILE_TEST
> > + help
> > + Enable this to plug the RZ/G3E thermal sensor driver into the Linux
> > + thermal framework.
> > diff --git a/drivers/thermal/renesas/Makefile
> > b/drivers/thermal/renesas/Makefile
> > index bf9cb3cb94d6..5a3eba0dedd0 100644
> > --- a/drivers/thermal/renesas/Makefile
> > +++ b/drivers/thermal/renesas/Makefile
> > @@ -3,3 +3,4 @@
> > obj-$(CONFIG_RCAR_GEN3_THERMAL) += rcar_gen3_thermal.o
> > obj-$(CONFIG_RCAR_THERMAL) += rcar_thermal.o
> > obj-$(CONFIG_RZG2L_THERMAL) += rzg2l_thermal.o
> > +obj-$(CONFIG_RZG3E_THERMAL) += rzg3e_thermal.o
> > diff --git a/drivers/thermal/renesas/rzg3e_thermal.c
> > b/drivers/thermal/renesas/rzg3e_thermal.c
> > new file mode 100644
> > index 000000000000..fe50df057b74
> > --- /dev/null
> > +++ b/drivers/thermal/renesas/rzg3e_thermal.c
> > @@ -0,0 +1,443 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Renesas RZ/G3E TSU Temperature Sensor Unit
> > + *
> > + * Copyright (C) 2025 Renesas Electronics Corporation */ #include
> > +<linux/clk.h> #include <linux/delay.h> #include <linux/err.h>
> > +#include <linux/interrupt.h> #include <linux/io.h> #include
> > +<linux/iopoll.h> #include <linux/kernel.h> #include
> > +<linux/mfd/syscon.h> #include <linux/module.h> #include
> > +<linux/of_device.h> #include <linux/platform_device.h> #include
> > +<linux/regmap.h> #include <linux/reset.h> #include <linux/thermal.h>
> > +#include <linux/units.h>
> > +
> > +#include "../thermal_hwmon.h"
<snip>
> > +static int rzg3e_thermal_change_mode(struct thermal_zone_device *tz,
> > + enum thermal_device_mode mode) {
> > + struct rzg3e_thermal_priv *priv = thermal_zone_device_priv(tz);
> > +
> > + if (mode == THERMAL_DEVICE_DISABLED)
> > + rzg3e_thermal_hw_disable(priv);
> > + else
> > + rzg3e_thermal_hw_enable(priv);
> > +
> > + priv->mode = mode;
> > + return 0;
> > +}
> > +
> always return 0 here ? what, if (!priv) return -EINVAL; ?
priv cannot be NULL as it is checked in probe().
Maybe replace static int rzg3e_thermal_change_mode->
static void rzg3e_thermal_change_mode().
Cheers,
Biju
Cheers,
Biju
>
next prev parent reply other threads:[~2025-03-31 18:21 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-30 21:49 [PATCH v5 0/5] thermal: renesas: Add support fot RZ/G3E John Madieu
2025-03-30 21:49 ` [PATCH v5 1/5] soc: renesas: rz-sysc: add syscon/regmap support John Madieu
2025-03-31 6:08 ` Biju Das
2025-04-02 20:58 ` John Madieu
2025-04-03 8:03 ` Claudiu Beznea
2025-04-03 13:22 ` John Madieu
2025-03-30 21:49 ` [PATCH v5 2/5] dt-bindings: thermal: r9a09g047-tsu: Document the TSU unit John Madieu
2025-03-30 21:49 ` [PATCH v5 3/5] thermal: renesas: rzg3e: Add thermal driver for the Renesas RZ/G3E SoC John Madieu
2025-03-31 18:10 ` Re : " ALOK TIWARI
2025-03-31 18:20 ` Biju Das [this message]
2025-04-01 12:05 ` John Madieu
2025-04-01 18:23 ` ALOK TIWARI
2025-04-02 19:22 ` John Madieu
2025-04-04 13:06 ` [External] : " ALOK TIWARI
2025-04-04 13:06 ` ALOK TIWARI
2025-03-30 21:49 ` [PATCH v5 4/5] arm64: dts: renesas: r9a09g047: Add TSU node John Madieu
2025-03-30 21:49 ` [PATCH v5 5/5] arm64: defconfig: Enable the Renesas RZ/G3E thermal driver 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=TY3PR01MB11346D38AB3F925DA2F46A5CA86AD2@TY3PR01MB11346.jpnprd01.prod.outlook.com \
--to=biju.das.jz@bp.renesas.com \
--cc=alok.a.tiwari@oracle.com \
--cc=conor+dt@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=john.madieu.xa@bp.renesas.com \
--cc=john.madieu@gmail.com \
--cc=krzk+dt@kernel.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=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=rui.zhang@intel.com \
--cc=sboyd@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
all inboxes | Powered by JetHome®