From: Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Simon <horms@verge.net.au>, Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Magnus <magnus.damm@gmail.com>,
"linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Khiem Nguyen <khiem.nguyen.xt@rvc.renesas.com>,
"Hien Duy. Dang" <hien.dang.eb@rvc.renesas.com>,
Toru Oishi <toru.oishi.zj@rvc.renesas.com>
Subject: Re: [PATCH 6/8 v3] ARM: shmobile: r8a7790: enable to use thermal-zone
Date: Tue, 8 Dec 2015 10:06:45 +0700 [thread overview]
Message-ID: <56664945.9070707@rvc.renesas.com> (raw)
In-Reply-To: <87poyi66yt.wl%kuninori.morimoto.gx@renesas.com>
Hi Morimoto-san,
Thanks for your patch.
On 12/7/2015 2:44 PM, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> This patch enables to use thermal-zone on r8a7790.
> This thermal sensor can measure temperature from -40000 to 125000,
> but over 117000 can be critical on this chip.
> Thus, default critical temperature is now set as 115000 (this driver
> is using 5000 steps) (Current critical temperature is using it as
> 90000, but there is no big reason about it)
>
> And it doesn't check thermal zone periodically (same as current
> behavior). You can exchange it by modifing polling-delay[-passive]
modifing -> modifying
> property.
>
> You can set trip temp if your kernel has CONFIG_THERMAL_WRITABLE_TRIPS,
> but you need to take care to use it, since it will call
> orderly_poweroff() it it reached to the value.
if it reaches
> echo $temp > /sys/class/thermal/thermal_zone0/trip_point_0_temp
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> v2 -> v3
>
> - compatible "renesas,rcar-thermal-gen2" -> "renesas,rcar-gen2-thermal"
>
> arch/arm/boot/dts/r8a7790.dtsi | 26 ++++++++++++++++++++++++--
> 1 file changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
> index 6cfd0dc..49aaa67 100644
> --- a/arch/arm/boot/dts/r8a7790.dtsi
> +++ b/arch/arm/boot/dts/r8a7790.dtsi
> @@ -112,6 +112,25 @@
> };
> };
>
> + thermal-zones {
> + cpu_thermal: cpu-thermal {
> + polling-delay-passive = <0>;
> + polling-delay = <0>;
> +
> + thermal-sensors = <&thermal>;
> +
> + trips {
> + cpu-crit {
> + temperature = <1150000>;
One zero is redundant here. It should be 115000.
> + hysteresis = <0>;
> + type = "critical";
> + };
> + };
> + cooling-maps {
> + };
> + };
> + };
> +
> gic: interrupt-controller@f1001000 {
> compatible = "arm,gic-400";
> #interrupt-cells = <3>;
> @@ -202,12 +221,15 @@
> power-domains = <&cpg_clocks>;
> };
>
> - thermal@e61f0000 {
> - compatible = "renesas,thermal-r8a7790", "renesas,rcar-thermal";
> + thermal: thermal@e61f0000 {
> + compatible = "renesas,thermal-r8a7790",
> + "renesas,rcar-gen2-thermal",
> + "renesas,rcar-thermal";
> reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>;
> interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&mstp5_clks R8A7790_CLK_THERMAL>;
> power-domains = <&cpg_clocks>;
> + #thermal-sensor-cells = <0>;
> };
>
> timer {
>
next prev parent reply other threads:[~2015-12-08 3:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 7:42 [PATCH 0/8 v3] enable to use thermal-zone on r8a7790/1 Kuninori Morimoto
2015-12-07 7:42 ` [PATCH 1/8 v3] thermal: rcar: move rcar_thermal_dt_ids to upside Kuninori Morimoto
2015-12-07 7:43 ` [PATCH 2/8 v3] thermal: rcar: check every rcar_thermal_update_temp() return value Kuninori Morimoto
2015-12-07 7:43 ` [PATCH 3/8 v3] thermal: rcar: check irq possibility in rcar_thermal_irq_xxx() Kuninori Morimoto
2015-12-07 7:43 ` [PATCH 4/8 v3] thermal: rcar: retern error rcar_thermal_get_temp() if no ctemp update Kuninori Morimoto
2015-12-07 7:44 ` [PATCH 5/8 v3] thermal: rcar: enable to use thermal-zone on DT Kuninori Morimoto
2015-12-08 15:20 ` Rob Herring
2015-12-07 7:44 ` [PATCH 6/8 v3] ARM: shmobile: r8a7790: enable to use thermal-zone Kuninori Morimoto
2015-12-08 3:06 ` Khiem Nguyen [this message]
2015-12-07 7:44 ` [PATCH 7/8 v3] ARM: shmobile: r8a7791: " Kuninori Morimoto
2015-12-08 3:10 ` Khiem Nguyen
2015-12-08 5:03 ` Kuninori Morimoto
2015-12-07 7:45 ` [PATCH 8/8 v3] thermal: of-thermal: of_thermal_set_trip_temp() call thermal_zone_device_update() Kuninori Morimoto
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=56664945.9070707@rvc.renesas.com \
--to=khiem.nguyen.xt@rvc.renesas.com \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=geert@linux-m68k.org \
--cc=hien.dang.eb@rvc.renesas.com \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=rui.zhang@intel.com \
--cc=toru.oishi.zj@rvc.renesas.com \
/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).