summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
AgeCommit message (Collapse)Author
2009-12-16Merge branch 'misc-2.6.33' into releaseLen Brown
2009-12-16thermal: Fix test of unsigned in thermal_cooling_device_cur_state_store()Roel Kluin
state is unsigned long so the test did not work. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-11-05thermal: disable polling if passive_delay and polling_delay are both unsetFrans Pop
Otherwise polling will continue for the thermal zone even when it is no longer needed, for example because forced passive cooling was disabled. Signed-off-by: Frans Pop <elendil@planet.nl> Acked-by: Matthew Garrett <mjg@redhat.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2009-11-05thermal: Only set passive_delay for forced_passive coolingFrans Pop
Setting polling_delay is useless as passive_delay has priority, so the value shown in proc isn't the actual polling delay. It also gives the impression to the user that he can change the polling interval through proc, while in fact he can't. Also, unset passive_delay when the forced passive trip point is unbound to allow polling to be disabled. Signed-off-by: Frans Pop <elendil@planet.nl> Acked-by: Matthew Garrett <mjg@redhat.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2009-11-05thermal: add sanity check for the passive attributeFrans Pop
Values below 1000 milli-celsius don't make sense and can cause the system to go into a thermal heart attack: the actual temperature will always be lower and thus the system will be throttled down to its lowest setting. An additional problem is that values below 1000 will show as 0 in /proc/acpi/thermal/TZx/trip_points:passive. cat passive 0 echo -n 90 >passive bash: echo: write error: Invalid argument echo -n 90000 >passive cat passive 90000 Signed-off-by: Frans Pop <elendil@planet.nl> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2009-11-05acpi: thermal: Add EOL to the trip_point_N_type stringsAmit Kucheria
Make the trip_point_N_type sysfs files return a string ending in EOL for consistency with other sysfs files. Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2009-09-19thermal: add missing Kconfig dependencyJan Beulich
Otherwise THERMAL_HWMON can be selected when HWMON=n and THERMAL=n, which fails to build. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-26thermal_sys: check get_temp return valueMichael Brunner
The return value of the get_temp function is not checked when doing a thermal zone update. This may lead to a critical shutdown if get_temp fails and the content of the temp variable is incorrectly set higher than the critical trip point. This has been observed on a system with incorrect ACPI implementation where the corresponding methods were not serialized and therefore sometimes triggered ACPI errors (AE_ALREADY_EXISTS). The following critical shutdowns indicated a temperature of 2097 C, which was obviously wrong. The patch adds a return value check that jumps over all trip point evaluations printing a warning if get_temp fails. The trip points are evaluated again on the next polling interval with successful get_temp execution. Signed-off-by: Michael Brunner <mibru@gmx.de> Acked-by: Zhang Rui <rui.zhang@intel.com> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-15thermal: remove driver_data direct access of struct deviceGreg Kroah-Hartman
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-05-14thermal: fix off-by-1 error in trip point trigger conditionVladimir Zajac
This patch fixes a regression caused by commit b1569e99c795bf83b4ddf41c4f1c42761ab7f75e "ACPI: move thermal trip handling to generic thermal layer" which accidentally changed trip point trigger condition to temp > trip_temp This patch changes the trigger condition back to temp >= trip_temp Signed-off-by: Vladimir Zajac <eightgraph@gmail.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-27thermal: support forcing support for passive coolingMatthew Garrett
Due to poor thermal design or Linux driving hardware outside its thermal envelope, some systems will reach critical temperature and shut down under high load. This patch adds support for forcing a polling-based passive trip point if the firmware doesn't provide one. The assumption is made that the processor is the most practical means to reduce the dynamic heat generation, so hitting the passive thermal limit will cause the CPU to be throttled until the temperature stabalises around the defined value. UI is provided via a "passive" sysfs entry in the thermal zone directory. It accepts a decimal value in millidegrees celsius, or "0" to disable the functionality. Default behaviour is for this functionality to be disabled. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-02-20ACPI: move thermal trip handling to generic thermal layerMatthew Garrett
The ACPI code currently carries its own thermal trip handling, meaning that any other thermal implementation will need to reimplement it. Move the code to the generic thermal layer. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-02-20thermal: use integers rather than strings for thermal valuesMatthew Garrett
The thermal API currently uses strings to pass values to userspace. This makes it difficult to use from within the kernel. Change the interface to use integers and fix up the consumers. Signed-off-by: Matthew Garrett <mjg@redhat.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-06thermal: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-06-25thermal: Create CONFIG_THERMAL_HWMON=nRene Herman
A bug in libsensors <= 2.10.6 is exposed when this new hwmon I/F is enabled. Create CONFIG_THERMAL_HWMON=n until some time after libsensors 2.10.7 ships so those users can run the latest kernel. libsensors 3.x is already fixed -- those users can use CONFIG_THERMAL_HWMON=y now. Signed-off-by: Rene Herman <rene.herman@gmail.com> Acked-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29thermal: re-name thermal.c to thermal_sys.cLen Brown
thermal_sys was already the name of the resulting module, and it is built from this one source file. Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29thermal: add hwmon sysfs I/FZhang Rui
Add hwmon sys I/F for generic thermal driver. Note: we have one hwmon class device for EACH TYPE of the thermal zone device. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-29thermal: add the support for building the generic thermal as a moduleZhang Rui
Build the generic thermal driver as module "thermal_sys". Make ACPI thermal, video, processor and fan SELECT the generic thermal driver, as these drivers rely on it to build the sysfs I/F. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-15acpi thermal trip points increased to 12Krzysztof Helt
The THERMAL_MAX_TRIPS value is set to 10. It is too few for the Compaq AP550 machine which has 12 trip points. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: Len Brown <lenb@kernel.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-18thermal: delete "default y"Len Brown
The generic thermal I/F gets selected by ACPI_THERMAL -- its only current customer. it doesn't need to clutter other configs by default. Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-18Revert "thermal: fix generic thermal I/F for hwmon"Len Brown
This reverts commit 3152fb9f11cdd2fd8688c2c5cb805e5c09b53dd9. This broke libsensors. Acked-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-13thermal: fix generic thermal I/F for hwmonZhang, Rui
Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-15thermal: use ERR_PTR for returning errorThomas Sujith
Need to return using ERR_PTR instead of NULL in case of errors. Signed-off-by: Thomas Sujith <sujith.thomas@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-15thermal: validate input parametersThomas Sujith
Added sanity check to make sure that thermal zone and cooling device exists. Signed-off-by: Thomas Sujith <sujith.thomas@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07ACPI: thermal: syntax, spelling, kernel-docLen Brown
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01the generic thermal sysfs driverZhang Rui
The Generic Thermal sysfs driver for thermal management. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Thomas Sujith <sujith.thomas@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>