* [PATCH v3 0/5] Fix a trivial typo and support rk3228/rk3399 SoCs for thermal driver.
@ 2015-12-03 8:48 Caesar Wang
[not found] ` <1449132523-18817-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Caesar Wang @ 2015-12-03 8:48 UTC (permalink / raw)
To: Eduardo Valentin
Cc: huangtao-TNX95d0MmH7DzftRWevZcw,
devicetree-u79uwXL29TY76Z2rM5mHXA, Ian Campbell, Jiri Kosina,
Heiko Stuebner, Pawel Moll, linux-pm-u79uwXL29TY76Z2rM5mHXA,
Mark Rutland, dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
dianders-F7+t8E8rja9g9hUCZPvPmw,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Kumar Gala,
Zhang Rui, computersforpeace-Re5JQEeQqe8AvxtiuMwx3w,
Dan Carpenter, Caesar Wang
This series pacthes to support the next soc for this thermal driver.
I don't add the dts thermal data since these SoCs have *_not_* land
in this mainline. I believe these SoCs dts will land in this mainline
lately,
then I will add the thermal data for Heiko.
This series patches can apply into Eduardo branch.
https://git.kernel.org/cgit/linux/kernel/git/evalenti/linux-soc-thermal.git
Also, this series pacthes have built on github branch.
https://github.com/rockchip-linux/kernel/commits/develop4.4
PATCH[1/5]:
That's bit ugly typo, sorry for sending again :(.
PATCH[2/5]:
To fix a build warning came from Dan Carpenter report smatch check,
Thanks. :)
PATCH[3/5]:
Add the rk3228/rk3399 SoCs compatible for dt-bindings.
PATCH[4/5]:
Add the rk3228 SoCs for thermal driver.
PATCH[5/5]:
Add the rk3399 SoCs for thermal driver based on PATCH[4/5].
I'd appreciate if someone have free time to review that. :)
Changes in v3:
- As Brian comments on https://patchwork.kernel.org/patch/7580661/,
let's remove the impossible condition.
Changes in v2:
- As Heiko comments, move to documenting the fields in the header
instead of inside the table.
Changes in v1:
- Search more trivial typo for me.
- As Heiko comments, fix a copy incorrect name.
- Add a Acked from Rob.
- fix a irq ack is similar with RK3228 SoCs.
Caesar Wang (5):
thermal: rockchip: fix a trivial typo
thermal: rockchip: fix a impossible condition caused by the warning
dt-bindings: rockchip-thermal: Support the RK3228/RK3399 SoCs
compatible
thermal: rockchip: Support the RK3228 SoCs in thermal driver
thermal: rockchip: Support the RK3399 SoCs in thermal driver
.../bindings/thermal/rockchip-thermal.txt | 2 +
drivers/thermal/rockchip_thermal.c | 178 ++++++++++++++++++---
2 files changed, 162 insertions(+), 18 deletions(-)
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1449132523-18817-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* [PATCH v3 3/5] dt-bindings: rockchip-thermal: Support the RK3228/RK3399 SoCs compatible
[not found] ` <1449132523-18817-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2015-12-03 8:48 ` Caesar Wang
0 siblings, 0 replies; 5+ messages in thread
From: Caesar Wang @ 2015-12-03 8:48 UTC (permalink / raw)
To: Eduardo Valentin
Cc: huangtao-TNX95d0MmH7DzftRWevZcw,
devicetree-u79uwXL29TY76Z2rM5mHXA, Ian Campbell, Heiko Stuebner,
Pawel Moll, linux-pm-u79uwXL29TY76Z2rM5mHXA, Mark Rutland,
dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
dianders-F7+t8E8rja9g9hUCZPvPmw,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Kumar Gala,
Zhang Rui, computersforpeace-Re5JQEeQqe8AvxtiuMwx3w,
Dan Carpenter, Caesar Wang
This patchset attempts to new compatible for thermal founding
on RK3228/RK3399 SoCs.
Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
Changes in v3: None
Changes in v2: None
Changes in v1:
- As Heiko comments, fix a copy incorrect name.
- Add a Acked from Rob.
Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
index 0dfa60d..08efe6b 100644
--- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
@@ -2,8 +2,10 @@
Required properties:
- compatible : should be "rockchip,<name>-tsadc"
+ "rockchip,rk3228-tsadc": found on RK3228 SoCs
"rockchip,rk3288-tsadc": found on RK3288 SoCs
"rockchip,rk3368-tsadc": found on RK3368 SoCs
+ "rockchip,rk3399-tsadc": found on RK3399 SoCs
- reg : physical base address of the controller and length of memory mapped
region.
- interrupts : The interrupt number to the cpu. The interrupt specifier format
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3 0/5] Fix a trivial typo and support rk3228/rk3399 SoCs for thermal driver.
2015-12-03 8:48 [PATCH v3 0/5] Fix a trivial typo and support rk3228/rk3399 SoCs for thermal driver Caesar Wang
[not found] ` <1449132523-18817-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2015-12-17 20:09 ` Eduardo Valentin
[not found] ` <20151217200927.GC7999-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2015-12-20 9:06 ` [PATCH v4 2/5] thermal: rockchip: fix a impossible condition caused by the warning Caesar Wang
2 siblings, 1 reply; 5+ messages in thread
From: Eduardo Valentin @ 2015-12-17 20:09 UTC (permalink / raw)
To: Caesar Wang
Cc: huangtao, Heiko Stuebner, dmitry.torokhov, dianders,
linux-rockchip, computersforpeace, Dan Carpenter, devicetree,
linux-pm, linux-kernel, Kumar Gala, Ian Campbell, Jiri Kosina,
Pawel Moll, Zhang Rui, Mark Rutland, Rob Herring,
linux-arm-kernel
Hello,
On Thu, Dec 03, 2015 at 04:48:38PM +0800, Caesar Wang wrote:
> This series pacthes to support the next soc for this thermal driver.
> I don't add the dts thermal data since these SoCs have *_not_* land
> in this mainline. I believe these SoCs dts will land in this mainline
> lately,
> then I will add the thermal data for Heiko.
>
> This series patches can apply into Eduardo branch.
> https://git.kernel.org/cgit/linux/kernel/git/evalenti/linux-soc-thermal.git
>
> Also, this series pacthes have built on github branch.
> https://github.com/rockchip-linux/kernel/commits/develop4.4
>
> PATCH[1/5]:
> That's bit ugly typo, sorry for sending again :(.
>
> PATCH[2/5]:
> To fix a build warning came from Dan Carpenter report smatch check,
> Thanks. :)
>
> PATCH[3/5]:
> Add the rk3228/rk3399 SoCs compatible for dt-bindings.
>
> PATCH[4/5]:
> Add the rk3228 SoCs for thermal driver.
>
> PATCH[5/5]:
> Add the rk3399 SoCs for thermal driver based on PATCH[4/5].
I applied all but 2/5.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v4 2/5] thermal: rockchip: fix a impossible condition caused by the warning
2015-12-03 8:48 [PATCH v3 0/5] Fix a trivial typo and support rk3228/rk3399 SoCs for thermal driver Caesar Wang
[not found] ` <1449132523-18817-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-17 20:09 ` [PATCH v3 0/5] Fix a trivial typo and support rk3228/rk3399 SoCs for thermal driver Eduardo Valentin
@ 2015-12-20 9:06 ` Caesar Wang
2 siblings, 0 replies; 5+ messages in thread
From: Caesar Wang @ 2015-12-20 9:06 UTC (permalink / raw)
To: edubezval
Cc: heiko, dmitry.torokhov, computersforpeace, linux-kernel,
linux-rockchip, devicetree, linux-pm, rui.zhang, Caesar Wang
As the Dan report the smatch check the thermal driver warning:
drivers/thermal/rockchip_thermal.c:551 rockchip_configure_from_dt()
warn: impossible condition '(thermal->tshut_temp > ((~0 >> 1))) =>
(s32min-s32max > s32max)'
Although The shut_temp read from DT is u32,the temperature is currently
represented as int not long in the thermal driver.
Let's change to make shut_temp instead of the thermal->tshut_temp for
the condition.
Fixes: commit 437df2172e8d
("thermal: rockchip: consistently use int for temperatures")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
Changes in v4:
- As the Dmitry and Brain comments, let's change to make.sh
tshut_temp instead of thermal->tshut_temp.
Changes in v3:
- As Brian comments on https://patchwork.kernel.org/patch/7580661/,
let's remove the impossible condition.
Changes in v2:
- None
Changes in v1:
- None
drivers/thermal/rockchip_thermal.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index e845841..7106288 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -545,15 +545,14 @@ static int rockchip_configure_from_dt(struct device *dev,
thermal->chip->tshut_temp);
thermal->tshut_temp = thermal->chip->tshut_temp;
} else {
+ if (shut_temp > INT_MAX) {
+ dev_err(dev, "Invalid tshut temperature specified: %d\n",
+ shut_temp);
+ return -ERANGE;
+ }
thermal->tshut_temp = shut_temp;
}
- if (thermal->tshut_temp > INT_MAX) {
- dev_err(dev, "Invalid tshut temperature specified: %d\n",
- thermal->tshut_temp);
- return -ERANGE;
- }
-
if (of_property_read_u32(np, "rockchip,hw-tshut-mode", &tshut_mode)) {
dev_warn(dev,
"Missing tshut mode property, using default (%s)\n",
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-12-20 9:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-03 8:48 [PATCH v3 0/5] Fix a trivial typo and support rk3228/rk3399 SoCs for thermal driver Caesar Wang
[not found] ` <1449132523-18817-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-03 8:48 ` [PATCH v3 3/5] dt-bindings: rockchip-thermal: Support the RK3228/RK3399 SoCs compatible Caesar Wang
2015-12-17 20:09 ` [PATCH v3 0/5] Fix a trivial typo and support rk3228/rk3399 SoCs for thermal driver Eduardo Valentin
[not found] ` <20151217200927.GC7999-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2015-12-20 9:15 ` Caesar Wang
2015-12-20 9:06 ` [PATCH v4 2/5] thermal: rockchip: fix a impossible condition caused by the warning Caesar Wang
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).