summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'misc-2.6.33' into releaseLen Brown2009-12-161-1/+1
|\
| * thermal: Fix test of unsigned in thermal_cooling_device_cur_state_store()Roel Kluin2009-12-161-1/+1
| | | | | | | | | | | | | | | | 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>
* | thermal: disable polling if passive_delay and polling_delay are both unsetFrans Pop2009-11-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | thermal: Only set passive_delay for forced_passive coolingFrans Pop2009-11-051-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | thermal: add sanity check for the passive attributeFrans Pop2009-11-051-0/+6
|/ | | | | | | | | | | | | | | | | | | | | | | 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>
* acpi: thermal: Add EOL to the trip_point_N_type stringsAmit Kucheria2009-11-051-5/+5
| | | | | | | | | | 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>
* thermal: add missing Kconfig dependencyJan Beulich2009-09-191-0/+1
| | | | | | | | | | | 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>
* thermal_sys: check get_temp return valueMichael Brunner2009-08-261-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* thermal: remove driver_data direct access of struct deviceGreg Kroah-Hartman2009-06-151-2/+2
| | | | | | | | | | | 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>
* thermal: fix off-by-1 error in trip point trigger conditionVladimir Zajac2009-05-141-4/+4
| | | | | | | | | | | | | | | | | 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>
* thermal: support forcing support for passive coolingMatthew Garrett2009-03-271-0/+77
| | | | | | | | | | | | | | | | | | | 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>
* ACPI: move thermal trip handling to generic thermal layerMatthew Garrett2009-02-201-2/+186
| | | | | | | | | 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>
* thermal: use integers rather than strings for thermal valuesMatthew Garrett2009-02-201-13/+78
| | | | | | | | | | | 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>
* thermal: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2009-01-061-3/+3
| | | | | Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* thermal: Create CONFIG_THERMAL_HWMON=nRene Herman2008-06-252-2/+11
| | | | | | | | | | | | | | | 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>
* thermal: re-name thermal.c to thermal_sys.cLen Brown2008-04-292-1/+0
| | | | | | | 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>
* thermal: add hwmon sysfs I/FZhang Rui2008-04-291-0/+163
| | | | | | | | | | 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>
* thermal: add the support for building the generic thermal as a moduleZhang Rui2008-04-293-4/+5
| | | | | | | | | | | 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>
* acpi thermal trip points increased to 12Krzysztof Helt2008-04-151-0/+4
| | | | | | | | | | | | 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>
* thermal: delete "default y"Len Brown2008-03-181-1/+0
| | | | | | | | 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>
* Revert "thermal: fix generic thermal I/F for hwmon"Len Brown2008-03-182-144/+26
| | | | | | | | | | 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>
* thermal: fix generic thermal I/F for hwmonZhang, Rui2008-03-132-26/+144
| | | | | Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* thermal: use ERR_PTR for returning errorThomas Sujith2008-02-151-13/+13
| | | | | | | | 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>
* thermal: validate input parametersThomas Sujith2008-02-151-1/+12
| | | | | | | | 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>
* ACPI: thermal: syntax, spelling, kernel-docLen Brown2008-02-072-23/+30
| | | | | Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Len Brown <len.brown@intel.com>
* the generic thermal sysfs driverZhang Rui2008-02-013-0/+734
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>
OpenPOWER on IntegriCloud