linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: thermal: Introduce "hwmon" optional property
@ 2017-07-10 11:51 Michael Tatarinov
  2017-07-12  7:49 ` Michael Tatarinov
  2017-08-31 15:08 ` Guenter Roeck
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Tatarinov @ 2017-07-10 11:51 UTC (permalink / raw)
  To: linux-pm; +Cc: Michael Tatarinov, Zhang Rui, Eduardo Valentin

Introduce an optional property called, hwmon, which enable
registration in hwmon subsystems.

Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Michael Tatarinov <kukabu@gmail.com>
---
 Documentation/devicetree/bindings/thermal/thermal.txt | 6 ++++++
 drivers/thermal/of-thermal.c                          | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/thermal/thermal.txt b/Documentation/devicetree/bindings/thermal/thermal.txt
index 88b6ea1ad290..4e51fbd4efa2 100644
--- a/Documentation/devicetree/bindings/thermal/thermal.txt
+++ b/Documentation/devicetree/bindings/thermal/thermal.txt
@@ -175,6 +175,10 @@ Optional property:
 			2000mW, while on a 10'' tablet is around
 			4500mW.
 
+- hwmon:		Register the thermal zone in hwmon subsystems
+  Type: boolean 	(requires CONFIG_THERMAL_HWMON).
+  Size: one cell
+
 Note: The delay properties are bound to the maximum dT/dt (temperature
 derivative over time) in two situations for a thermal zone:
 (i)  - when passive cooling is activated (polling-delay-passive); and
@@ -556,6 +560,8 @@ thermal-zones {
 
 		sustainable-power = <2500>;
 
+		hwmon;
+
 		trips {
 			/* Trips are based on resulting linear equation */
 			cpu_trip: cpu-trip {
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c
index d04ec3b9e5ff..ce580a57313b 100644
--- a/drivers/thermal/of-thermal.c
+++ b/drivers/thermal/of-thermal.c
@@ -994,8 +994,7 @@ int __init of_parse_thermal_zones(void)
 			goto exit_free;
 		}
 
-		/* No hwmon because there might be hwmon drivers registering */
-		tzp->no_hwmon = true;
+		tzp->no_hwmon = !of_property_read_bool(child, "hwmon");
 
 		if (!of_property_read_u32(child, "sustainable-power", &prop))
 			tzp->sustainable_power = prop;
-- 
2.9.4

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

end of thread, other threads:[~2017-12-05  1:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-10 11:51 [PATCH] of: thermal: Introduce "hwmon" optional property Michael Tatarinov
2017-07-12  7:49 ` Michael Tatarinov
2017-12-05  1:46   ` Eduardo Valentin
2017-08-31 15:08 ` Guenter Roeck
2017-09-02  5:53   ` Michael Tatarinov

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