diff options
author | Punit Agrawal <punit.agrawal@arm.com> | 2015-02-26 19:00:32 +0000 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2015-05-04 21:27:52 -0700 |
commit | 647f99255d604aa98f919b89c74567bb4e8fe52c (patch) | |
tree | be4c02c950d3a92b27086996fcee8df0b4dda5f7 /drivers/thermal/of-thermal.c | |
parent | 6828a4711f994bbd9d3fd27b7a541217fc37b341 (diff) |
of: thermal: Introduce sustainable power for a thermal zone
Introduce an optional property called, sustainable-power, which
represents the power (in mW) which the thermal zone can safely
dissipate.
If provided the property is parsed and associated with the thermal
zone via the thermal zone parameters.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers/thermal/of-thermal.c')
-rw-r--r-- | drivers/thermal/of-thermal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thermal/of-thermal.c b/drivers/thermal/of-thermal.c index c606b85ea9f4..705b21d01f1c 100644 --- a/drivers/thermal/of-thermal.c +++ b/drivers/thermal/of-thermal.c @@ -866,6 +866,7 @@ int __init of_parse_thermal_zones(void) for_each_child_of_node(np, child) { struct thermal_zone_device *zone; struct thermal_zone_params *tzp; + u32 prop; /* Check whether child is enabled or not */ if (!of_device_is_available(child)) @@ -892,6 +893,9 @@ int __init of_parse_thermal_zones(void) /* No hwmon because there might be hwmon drivers registering */ tzp->no_hwmon = true; + if (!of_property_read_u32(child, "sustainable-power", &prop)) + tzp->sustainable_power = prop; + zone = thermal_zone_device_register(child->name, tz->ntrips, 0, tz, ops, tzp, |