public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Thermal: undo throttling at exit of forced passive mode
@ 2012-06-18 21:29 Jacob Pan
  2012-06-19  1:14 ` Zhang Rui
  0 siblings, 1 reply; 2+ messages in thread
From: Jacob Pan @ 2012-06-18 21:29 UTC (permalink / raw)
  To: Zhang Rui; +Cc: Len Brown, ACPI, Jacob Pan

When a thermal zone is in forced passive mode and temperature is above
passive trip point, processors are throttled to various states. However,
when user disables forced passive throttling, the processors could be
left in throttling state even when temperature is below passive trip
points.

This patch fixes the issue by always undo processor throttling when user
exits force passive mode. It is safe in that any subsequent thermal conditions
will still be handled according to trip point settings

Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
---
 drivers/thermal/thermal_sys.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 022bacb..ea867ff 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -250,10 +250,12 @@ passive_store(struct device *dev, struct device_attribute *attr,
 		mutex_lock(&thermal_list_lock);
 		list_for_each_entry(cdev, &thermal_cdev_list, node) {
 			if (!strncmp("Processor", cdev->type,
-				     sizeof("Processor")))
+					sizeof("Processor"))) {
 				thermal_zone_unbind_cooling_device(tz,
 								   THERMAL_TRIPS_NONE,
 								   cdev);
+				cdev->ops->set_cur_state(cdev, 0);
+			}
 		}
 		mutex_unlock(&thermal_list_lock);
 		tz->passive_delay = 0;
-- 
1.7.5.4


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

end of thread, other threads:[~2012-06-19  1:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-18 21:29 [PATCH] Thermal: undo throttling at exit of forced passive mode Jacob Pan
2012-06-19  1:14 ` Zhang Rui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox