Commit Graph

8 Commits (4be3bd7849165e7efa6b0b35a23d6a3598d97465)

Author SHA1 Message Date
Greg Kroah-Hartman 0e968a3b6d thermal: remove driver_data direct access of struct device
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-06-15 21:30:27 -07:00
Vladimir Zajac 29321357ac thermal: fix off-by-1 error in trip point trigger condition
This patch fixes a regression caused by commit
b1569e99c7
"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-05-14 13:40:53 -04:00
Matthew Garrett 03a971a289 thermal: support forcing support for passive cooling
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-03-27 16:58:22 -04:00
Matthew Garrett b1569e99c7 ACPI: move thermal trip handling to generic thermal layer
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-20 18:41:56 -05:00
Matthew Garrett 6503e5df08 thermal: use integers rather than strings for thermal values
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-02-20 10:52:37 -05:00
Kay Sievers 354655ea97 thermal: struct device - replace bus_id with dev_name(), dev_set_name()
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 10:44:37 -08:00
Rene Herman 16d7523973 thermal: Create CONFIG_THERMAL_HWMON=n
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-06-25 19:25:42 -04:00
Len Brown ff16cab69b thermal: re-name thermal.c to thermal_sys.c
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-29 03:12:17 -04:00