devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] thermal: rockchip: improve the warning log
@ 2016-10-11  2:07 Shawn Lin
  2016-10-11  2:07 ` [PATCH v2 2/2] dt-bindings: rockchip-thermal: fix the misleading description Shawn Lin
       [not found] ` <1476151655-18415-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Shawn Lin @ 2016-10-11  2:07 UTC (permalink / raw)
  To: Zhang Rui, Eduardo Valentin
  Cc: Heiko Stuebner, linux-pm, linux-rockchip, devicetree, Rob Herring,
	Caesar Wang, Shawn Lin

It is no necessary to print warning agian and again if we don't
add rockchip,grf for dt, otherwise I saw the following log when
doing suspend-2-resume. We only need to print it once when parsing
dt. It looks quite trivial but the log is apparently verbose.

[   26.615415] PM: early resume of devices complete after 1.539 msecs
[   26.622002] rk_tsadcv2_initialize: Missing rockchip,grf property
[   26.629359] rk_gmac-dwmac ff290000.ethernet: init for RGMII
[   26.639794] PM: resume of devices complete after 18.109 msecs
[   26.646925] Restarting tasks ... done.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Reviewed-by: Caesar Wang <wxt@rock-chips.com>
---

Changes in v2:
- fix typos(Heiko)

 drivers/thermal/rockchip_thermal.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index e227a9f..b811b0f 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -524,11 +524,6 @@ static void rk_tsadcv2_initialize(struct regmap *grf, void __iomem *regs,
 		       regs + TSADCV2_AUTO_PERIOD_HT);
 	writel_relaxed(TSADCV2_HIGHT_TSHUT_DEBOUNCE_COUNT,
 		       regs + TSADCV2_HIGHT_TSHUT_DEBOUNCE);
-
-	if (IS_ERR(grf)) {
-		pr_warn("%s: Missing rockchip,grf property\n", __func__);
-		return;
-	}
 }
 
 /**
@@ -971,6 +966,8 @@ static int rockchip_configure_from_dt(struct device *dev,
 	 * need this property.
 	 */
 	thermal->grf = syscon_regmap_lookup_by_phandle(np, "rockchip,grf");
+	if (IS_ERR(thermal->grf))
+		dev_warn(dev, "Missing rockchip,grf property\n");
 
 	return 0;
 }
-- 
2.3.7



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2 2/2] dt-bindings: rockchip-thermal: fix the misleading description
  2016-10-11  2:07 [PATCH v2 1/2] thermal: rockchip: improve the warning log Shawn Lin
@ 2016-10-11  2:07 ` Shawn Lin
       [not found]   ` <1476151655-18415-2-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
       [not found] ` <1476151655-18415-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Shawn Lin @ 2016-10-11  2:07 UTC (permalink / raw)
  To: Zhang Rui, Eduardo Valentin
  Cc: Heiko Stuebner, linux-pm, linux-rockchip, devicetree, Rob Herring,
	Caesar Wang, Shawn Lin

"rockchip,hw-tshut-temp", "rockchip,hw-tshut-mode" and
"rockchip,hw-tshut-polarity" are not a required properties
actually as the code could also work by loading the default
settings there. So it is apprently misleading, although we
prefer to get these from DT. And it seems we miss the 'rockchip,grf'
here which should also be an optional property.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

Changes in v2: None

 Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
index 08efe6b..43003ae 100644
--- a/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/rockchip-thermal.txt
@@ -22,10 +22,13 @@ Required properties:
 	      TSADC controller.
 - pinctrl-2 : The "sleep" pinctrl state, it will be in for suspend.
 - #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description.
+
+Optional properties:
 - rockchip,hw-tshut-temp : The hardware-controlled shutdown temperature value.
 - rockchip,hw-tshut-mode : The hardware-controlled shutdown mode 0:CRU 1:GPIO.
 - rockchip,hw-tshut-polarity : The hardware-controlled active polarity 0:LOW
 			       1:HIGH.
+- rockchip,grf : The phandle of the syscon node for the general register file.
 
 Exiample:
 tsadc: tsadc@ff280000 {
-- 
2.3.7



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/2] dt-bindings: rockchip-thermal: fix the misleading description
       [not found]   ` <1476151655-18415-2-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-10-11  7:01     ` Heiko Stuebner
  2016-10-18 12:41     ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2016-10-11  7:01 UTC (permalink / raw)
  To: Shawn Lin
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-pm-u79uwXL29TY76Z2rM5mHXA, Eduardo Valentin,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
	Zhang Rui, Caesar Wang

Am Dienstag, 11. Oktober 2016, 10:07:35 CEST schrieb Shawn Lin:
> "rockchip,hw-tshut-temp", "rockchip,hw-tshut-mode" and
> "rockchip,hw-tshut-polarity" are not a required properties
> actually as the code could also work by loading the default
> settings there. So it is apprently misleading, although we
> prefer to get these from DT. And it seems we miss the 'rockchip,grf'
> here which should also be an optional property.
> 
> Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

Reviewed-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 1/2] thermal: rockchip: improve the warning log
       [not found] ` <1476151655-18415-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-10-11  7:03   ` Heiko Stuebner
  0 siblings, 0 replies; 5+ messages in thread
From: Heiko Stuebner @ 2016-10-11  7:03 UTC (permalink / raw)
  To: Shawn Lin
  Cc: Zhang Rui, Eduardo Valentin, linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Caesar Wang

Am Dienstag, 11. Oktober 2016, 10:07:34 CEST schrieb Shawn Lin:
> It is no necessary to print warning agian and again if we don't
> add rockchip,grf for dt, otherwise I saw the following log when
> doing suspend-2-resume. We only need to print it once when parsing
> dt. It looks quite trivial but the log is apparently verbose.
> 
> [   26.615415] PM: early resume of devices complete after 1.539 msecs
> [   26.622002] rk_tsadcv2_initialize: Missing rockchip,grf property
> [   26.629359] rk_gmac-dwmac ff290000.ethernet: init for RGMII
> [   26.639794] PM: resume of devices complete after 18.109 msecs
> [   26.646925] Restarting tasks ... done.
> 
> Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> 
> Reviewed-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>

Reviewed-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2 2/2] dt-bindings: rockchip-thermal: fix the misleading description
       [not found]   ` <1476151655-18415-2-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
  2016-10-11  7:01     ` Heiko Stuebner
@ 2016-10-18 12:41     ` Rob Herring
  1 sibling, 0 replies; 5+ messages in thread
From: Rob Herring @ 2016-10-18 12:41 UTC (permalink / raw)
  To: Shawn Lin
  Cc: Zhang Rui, Eduardo Valentin, Heiko Stuebner,
	linux-pm-u79uwXL29TY76Z2rM5mHXA,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Caesar Wang

On Tue, Oct 11, 2016 at 10:07:35AM +0800, Shawn Lin wrote:
> "rockchip,hw-tshut-temp", "rockchip,hw-tshut-mode" and
> "rockchip,hw-tshut-polarity" are not a required properties
> actually as the code could also work by loading the default
> settings there. So it is apprently misleading, although we
> prefer to get these from DT. And it seems we miss the 'rockchip,grf'
> here which should also be an optional property.
> 
> Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
> 
> Changes in v2: None
> 
>  Documentation/devicetree/bindings/thermal/rockchip-thermal.txt | 3 +++
>  1 file changed, 3 insertions(+)

Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-18 12:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-11  2:07 [PATCH v2 1/2] thermal: rockchip: improve the warning log Shawn Lin
2016-10-11  2:07 ` [PATCH v2 2/2] dt-bindings: rockchip-thermal: fix the misleading description Shawn Lin
     [not found]   ` <1476151655-18415-2-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-10-11  7:01     ` Heiko Stuebner
2016-10-18 12:41     ` Rob Herring
     [not found] ` <1476151655-18415-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-10-11  7:03   ` [PATCH v2 1/2] thermal: rockchip: improve the warning log Heiko Stuebner

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