aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/thermal.c
AgeCommit message (Collapse)Author
2008-07-24Merge branch 'release-2.6.27' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6 * 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6: acpi: fix crash in core ACPI code, triggered by CONFIG_ACPI_PCI_SLOT=y ACPI: thinkpad-acpi: don't misdetect in get_thinkpad_model_data() on -ENOMEM ACPI: thinkpad-acpi: bump up version to 0.21 ACPI: thinkpad-acpi: add bluetooth and WWAN rfkill support ACPI: thinkpad-acpi: WLSW overrides other rfkill switches ACPI: thinkpad-acpi: prepare for bluetooth and wwan rfkill support ACPI: thinkpad-acpi: consolidate wlsw notification function ACPI: thinkpad-acpi: minor refactor on radio switch init Revert "ACPI: don't walk tables if ACPI was disabled" Revert "dock: bay: Don't call acpi_walk_namespace() when ACPI is disabled." Revert "Fix FADT parsing" ACPI : Set FAN device to correct state in boot phase ACPI: Ignore _BQC object when registering backlight device ACPI: stop complaints about interrupt link End Tags and blank IRQ descriptors
2008-07-21driver core: fix a lot of printk usages of bus_idGreg Kroah-Hartman
We have the dev_printk() variants for this kind of thing, use them instead of directly trying to access the bus_id field of struct device. This is done in order to remove bus_id entirely. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-18ACPI : Set FAN device to correct state in boot phaseZhao Yakui
Subject:ACPI: Set FAN device to correct state in boot phase From: Zhao Yakui <yakui.zhao@intel.com> On some laptops when ACPI FAN driver is loaded, maybe the FAN device will be turned on. But if the temperature is below the threshold, the corresponding FAN device should be turned off in the course of loading thermal driver. So it is necessary to set the FAN device to the correct state in course of loading the thermal driver. http://bugzilla.kernel.org/show_bug.cgi?id=8049 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
2008-06-11ACPI: Reject below-freezing temperatures as invalid critical temperaturesArjan van de Ven
My laptop thinks that it's a good idea to give -73C as the critical CPU temperature.... which isn't the best thing since it causes a shutdown right at bootup. Temperatures below freezing are clearly invalid critical thresholds so just reject these as such. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-30Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (179 commits) ACPI: Fix acpi_processor_idle and idle= boot parameters interaction acpi: fix section mismatch warning in pnpacpi intel_menlo: fix build warning ACPI: Cleanup: Remove unneeded, multiple local dummy variables ACPI: video - fix permissions on some proc entries ACPI: video - properly handle errors when registering proc elements ACPI: video - do not store invalid entries in attached_array list ACPI: re-name acpi_pm_ops to acpi_suspend_ops ACER_WMI/ASUS_LAPTOP: fix build bug thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failed ACPI: check a return value correctly in acpi_power_get_context() #if 0 acpi/bay.c:eject_removable_drive() eeepc-laptop: add hwmon fan control eeepc-laptop: add backlight eeepc-laptop: add base driver ACPI: thinkpad-acpi: bump up version to 0.20 ACPI: thinkpad-acpi: fix selects in Kconfig ACPI: thinkpad-acpi: use a private workqueue ACPI: thinkpad-acpi: fluff really minor fix ACPI: thinkpad-acpi: use uppercase for "LED" on user documentation ... Fixed conflicts in drivers/acpi/video.c and drivers/misc/intel_menlow.c manually.
2008-04-29acpi: use non-racy method for proc entries creationDenis V. Lunev
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Len Brown <lenb@kernel.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29ACPI: update thermal temperatureZhang, Rui
Fix the problem that thermal_get_temp returns the cached value, which causes the temperature in generic thermal never updates. 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: update the documentationZhang Rui
Update the documentation for the thermal driver hwmon sys I/F. Change the ACPI thermal zone type to be consistent with hwmon. 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 new get_crit_temp callbackZhang, Rui
Add a new callback so that the generic thermal can get the critical trip point info of a thermal zone, which is needed for building the tempX_crit hwmon sysfs attribute. 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-28drivers/acpi/thermal.c: fix build with CONFIG_DMI=nAndrew Morton
drivers/acpi/thermal.c: In function 'acpi_thermal_init': drivers/acpi/thermal.c:1794: error: 'thermal_dmi_table' undeclared (first use in this function) drivers/acpi/thermal.c:1794: error: (Each undeclared identifier is reported only once drivers/acpi/thermal.c:1794: error: for each function it appears in.) Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-08acpi thermal: fix result checkKrzysztof Helt
thermal_zone_device_register() uses the ERR_PTR macro on its return values. A correct check is to use the IS_ERR() macro. The 2.6.25 kernels panic on Compaq AP550 without this patch as it has more then 10 (THERMAL_MAX_TRIPS) trip points (there are 12). Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Len Brown <lenb@kernel.org> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-13ACPI: thermal: show temperature in millidegree CelsiusZhang, Rui
as now required by the generic thermal 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-02-07Merge branches 'release' and 'menlo' into releaseLen Brown
Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01ACPI: thermal fixupZhang Rui
The alias name may be used in _PSL, _ALx and _TZD, so we bind the cooling device only if the acpi_device node matches. 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>
2008-02-01ACPI: CELSIUS_TO_KELVIN fixupZhang Rui
Fix an imprecision in CELSIUS_TO_KELVIN and move these two macroes to a proper place. 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>
2008-02-01ACPI: attach thermal zone infoZhang Rui
Intel menlow driver needs to get the pointer of themal_zone_device structure of an ACPI thermal zone. Attach this to each ACPI thermal zone device object. 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>
2008-02-01ACPI: ACPI thermal zone handle notification correctlyZhang Rui
Change the ACPI thermal action upon notification 0x81 and 0x82. According to the ACPI spec, we should: re-evaluate _PSV and _ACx methods upon notification 0x81 re-evaluate _PSL and _ALx and _TZD upon notificaiton 0x82. But the current code re-evaluates all the trip points for 0x81 while only re-evaluates _TZD for 0x82. Fix this violation of ACPI spec. TODO: devices in _PSL, _ALx and _TZD may change after a notification 0x82. At this time, we need to re-bind the cooling devices with the thermal zone. 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>
2008-02-01ACPI: register ACPI thermal zone as generic thermal zone devicesZhang Rui
Register ACPI thermal zone as thermal zone device. the new sys I/F for ACPI thermal zone will be like this: /sys/class/thermal: |thermal_zone1: |-----type: "ACPI thermal zone". RO |-----temp: the current temperature. RO |-----mode: the current working mode. RW. the default value is "kernel" which means thermal management is done by ACPI thermal driver. "echo user > mode" prevents all the ACPI thermal driver actions upon any trip points. |-----trip_point_0_temp: the threshold of trip point 0. RO. |-----trip_point_0_type: "critical". RO. the type of trip point 0 This may be one of critical/hot/passive/active[x] for an ACPI thermal zone. ... |-----trip_point_3_temp: |-----trip_point_3_type: "active[1]" 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>
2007-12-06export thermal notification to userspace when nocrt is setZhang Rui
module parameter is used to prevent the thermal_zone action upon critical trip points. But exporting this notification to userspace is still useful. By setting nocrt with this patch applied, ACPI will take no action but exporting the events to userspace upon critical/hot trip points. http://bugzilla.kernel.org/show_bug.cgi?id=9139 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-10-19Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (41 commits) ACPICA: hw: Don't carry spinlock over suspend ACPICA: hw: remove use_lock flag from acpi_hw_register_{read, write} ACPI: cpuidle: port idle timer suspend/resume workaround to cpuidle ACPI: clean up acpi_enter_sleep_state_prep Hibernation: Make sure that ACPI is enabled in acpi_hibernation_finish ACPI: suppress uninitialized var warning cpuidle: consolidate 2.6.22 cpuidle branch into one patch ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfs ACPI: AC: Add sysfs interface ACPI: SBS: Add sysfs alarm ACPI: SBS: Add ACPI_PROCFS around procfs handling code. ACPI: SBS: Add support for power_supply class (and sysfs) ACPI: SBS: Make SBS reads table-driven. ACPI: SBS: Simplify data structures in SBS ACPI: SBS: Split host controller (ACPI0001) from SBS driver (ACPI0002) ACPI: EC: Add new query handler to list head. ACPI: Add acpi_bus_generate_event4() function ACPI: Battery: add sysfs alarm ACPI: Battery: Add sysfs support ACPI: Battery: Misc clean-ups, no functional changes ... Fix up conflicts in drivers/misc/thinkpad_acpi.[ch] manually
2007-10-09drivers/firmware: const-ify DMI API and internalsJeff Garzik
Three main sets of changes: 1) dmi_get_system_info() return value should have been marked const, since callers should not be changing that data. 2) const-ify DMI internals, since DMI firmware tables should, whenever possible, be marked const to ensure we never ever write to that data area. 3) const-ify DMI API, to enable marking tables const where possible in low-level drivers. And if we're really lucky, this might enable some additional optimizations on the part of the compiler. The bulk of the changes are #2 and #3, which are interrelated. #1 could have been a separate patch, but it was so small compared to the others, it was easier to roll it into this changeset. Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-09-05ACPI: Thermal: Drop concurrent thermal checksAlexey Starikovskiy
Fix for #3686, where get_temperature() may cause thermal notify, which causes one more get_temperature(). Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-09-04ACPI: thermal: use round_jiffies when thermal zone polling is enabledLen Brown
Properly functioning systems do not use thermal zone polling, they use event-based notification. However, some users enable periodic thermal zone polling to work around bugs on their platforms, and at least one platform exists with a real _TZP that requests polling. While thermal zone polling (_TZP) is specified in units to 0.1 seconds, it actually has a maximum granularity of 1 second. Thus, we can safely round up the _TZP timeout to occur on the next 1-second boundary. This will batch it with other 1-second-granularity timers in the system and thus potentially extend processor idle duration. Note that the same timer is used both for _TZP and for passive processor thermal throttling. We can not round up the timeout when it is used for passive thermal throttling. Also, we can not make this a deferrable timer, as temperature is just as relevant during idle as it is during non-idle. Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-25Pull events into release branchLen Brown
Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-24ACPI: /proc/acpi/thermal_zone trip points are now read-only, mark them as suchPavel Machek
Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-23ACPI: Schedule /proc/acpi/event for removalLen Brown
Schedule /proc/acpi/event for removal in 6 months. Re-name acpi_bus_generate_event() to acpi_bus_generate_proc_event() to make sure there is no confusion that it is for /proc/acpi/event only. Add CONFIG_ACPI_PROC_EVENT to allow removal of /proc/acpi/event. There is no functional change if CONFIG_ACPI_PROC_EVENT=y Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-23ACPI: don't duplicate input events on netlinkZhang Rui
The previous events patch added a netlink event for every user of the legacy /proc/acpi/event interface. However, some users of /proc/acpi/event are really input events, and they already report their events via the input layer. Introduce a new interface, acpi_bus_generate_netlink_event(), which is explicitly called by devices that want to repoprt events via netlink. This allows the input-like events to opt-out of generating netlink events. In summary: events that are sent via netlink: ac/battery/sbs thermal processor thinkpad_acpi dock/bay events that are sent via input layer: button video hotkey thinkpad_acpi hotkey asus_acpi/asus-laptop hotkey sonypi/sonylaptop Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-20ACPI: thermal: set "thermal.nocrt" via DMI on Gigabyte GA-7ZXLen Brown
This system BIOS sets a critical temperature to 65C, which is too low. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=155496 Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-14ACPI: thermal: create "thermal.crt=C" bootparamLen Brown
Some hardware will malfunction at a temperature below the BIOS provided critical shutdown threshold. This hook allows moving the critical trip points down to a temperature which provokes a graceful shutdown before the hardware malfunction. http://bugzilla.kernel.org/show_bug.cgi?id=8884 WARNING: A trip-point override will not get noticed until the system delivers a temperature change event, or unless thermal zone polling is enabled. eg. "thermal.tzp=10" Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-14ACPI: thermal: clean up MODULE_PARM_DESC newlinesLen Brown
Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: add DMI hooks to handle AOpen's broken Award BIOSLen Brown
Use DMI to: 1. enable polling (BIOS thermal events are broken) 2. disable active trip points (BIOS fan control is broken) 3. disable passive trip point (BIOS hard-codes it too low) The actual temperature reading does work, and with the aid of polling, the critical trip point should work too. http://bugzilla.kernel.org/show_bug.cgi?id=8842 Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: create "thermal.act=" to disable or override active trip pointLen Brown
thermal.act=-1 disables all active trip points in all ACPI thermal zones. thermal.act=C, where C > 0, overrides all lowest temperature active trip points in all thermal zones to C degrees Celsius. Raising this trip-point may allow you to keep your system silent up to a higher temperature. However, it will not allow you to raise the lowest temperature trip point above the next higher trip point (if there is one). Lowering this trip point may kick in the fan sooner. Note that overriding this trip-point will disable any BIOS attempts to implement hysteresis around the lowest temperature trip point. This may result in the fan starting and stopping frequently if temperature frequently crosses C. WARNING: raising trip points above the manufacturer's defaults may cause the system to run at higher temperature and shorten its life. Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: create "thermal.nocrt" to disable critical actionsLen Brown
thermal.nocrt=1 disables actions on _CRT and _HOT ACPI thermal zone trip-points. They will be marked as <disabled> in /proc/acpi/thermal_zone/*/trip_points. There are two cases where this option is used: 1. Debugging a hot system crossing valid trip point. If your system fan is spinning at full speed, be sure that the vent is not clogged with dust. Many laptops have very fine thermal fins that are easily blocked. Check that the processor fan-sink is properly seated, has the proper thermal grease, and is really spinning. Check for fan related options in BIOS SETUP. Sometimes there is a performance vs quiet option. Defaults are generally the most conservative. If your fan is not spinning, yet /proc/acpi/fan/ has files in it, please file a Linux/ACPI bug. WARNING: you risk shortening the lifetime of your hardware if you use this parameter on a hot system. Note that this refers to all system components, including the disk drive. 2. Working around a cool system crossing critical trip point due to erroneous temperature reading. Try again with CONFIG_HWMON=n There is known potential for conflict between the the hwmon sub-system and the ACPI BIOS. If this fixes it, notify lm-sensors@lm-sensors.org and linux-acpi@vger.kernel.org Otherwise, file a Linux/ACPI bug, or notify just linux-acpi@vger.kernel.org. Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: create "thermal.psv=" to override passive trip pointsLen Brown
"thermal.psv=-1" disables passive trip points for all ACPI thermal zones. "thermal.psv=C", where 'C' is degrees Celsius, overrides all existing passive trip points for all ACPI thermal zones. thermal.psv is checked at module load time, and in response to trip-point change events. Note that if the system does not deliver thermal zone temperature change events near the new trip-point, then it will not be noticed. To force your custom trip point to be noticed, you may need to enable polling: eg. thermal.tzp=3000 invokes polling every 5 minutes. Note that once passive thermal throttling is invoked, it has its own internal Thermal Sampling Period (_TSP), that is unrelated to _TZP. WARNING: disabling or raising a thermal trip point may result in increased running temperature and shorter hardware lifetime on some systems. Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: expose "thermal.tzp=" to set global polling frequencyLen Brown
Thermal Zone Polling frequency (_TZP) is an optional ACPI object recommending the rate that the OS should poll the associated thermal zone. If _TZP is 0, no polling should be used. If _TZP is non-zero, then the platform recommends that the OS poll the thermal zone at the specified rate. The minimum period is 30 seconds. The maximum period is 5 minutes. (note _TZP and thermal.tzp units are in deci-seconds, so _TZP = 300 corresponds to 30 seconds) If _TZP is not present, ACPI 3.0b recommends that the thermal zone be polled at an "OS provided default frequency". However, common industry practice is: 1. The BIOS never specifies any _TZP 2. High volume OS's from this century never poll any thermal zones Ie. The OS depends on the platform's ability to provoke thermal events when necessary, and the "OS provided default frequency" is "never":-) There is a proposal that ACPI 4.0 be updated to reflect common industry practice -- ie. no _TZP, no polling. The Linux kernel already follows this practice -- thermal zones are not polled unless _TZP is present and non-zero. But thermal zone polling is useful as a workaround for systems which have ACPI thermal control, but have an issue preventing thermal events. Indeed, some Linux distributions still set a non-zero thermal polling frequency for this reason. But rather than ask the user to write a polling frequency into all the /proc/acpi/thermal_zone/*/polling_frequency files, here we simply document and expose the already existing module parameter to do the same at system level, to simplify debugging those broken platforms. Note that thermal.tzp is a module-load time parameter only. Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-12ACPI: thermal: create "thermal.off=1" to disable ACPI thermal supportLen Brown
"thermal.off=1" disables all ACPI thermal support at boot time. CONFIG_ACPI_THERMAL=n can do this at build time. "# rmmod thermal" can do this at run time, as long as thermal is built as a module. WARNING: On some systems, disabling ACPI thermal support will cause the system to run hotter and reduce the lifetime of the hardware. Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-23ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI ↵Thomas Renninger
drivers modpost is going to use these to create e.g. acpi:ACPI0001 in modules.alias. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-18Add common orderly_poweroff()Jeremy Fitzhardinge
Various pieces of code around the kernel want to be able to trigger an orderly poweroff. This pulls them together into a single implementation. By default the poweroff command is /sbin/poweroff, but it can be set via sysctl: kernel/poweroff_cmd. This is split at whitespace, so it can include command-line arguments. This patch replaces four other instances of invoking either "poweroff" or "shutdown -h now": two sbus drivers, and acpi thermal management. sparc64 has its own "powerd"; still need to determine whether it should be replaced by orderly_poweroff(). Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Acked-by: Len Brown <lenb@kernel.org> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Andi Kleen <ak@suse.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: David S. Miller <davem@davemloft.net>
2007-06-18ACPI: gracefully print null trip-point deviceThomas Renninger
if acpi_bus_get_device() returns NULL, print nothing instead of "<NUL" in /proc/acpi/thermal_zone/*/trip_points Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-29ACPI: thermal: Replace pointer with name in trip_pointsThomas Renninger
For users with active thermal trip points, they need the fan's name, rather than its address, to understand where to look to observe and control fan state. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-30ACPI: delete un-reliable concept of cooling modeLen Brown
The scheme where the thermal driver displayed the cooling mode /proc/acpi/thermal_zone/*/cooling_mode was flawed in two ways. First, the success of _SCP doesn't actually mean that the BIOS moved any trip points. On many BIOS, _SCP is present, but does nothing. So displaying what _SCP executed actually was wrong more times than it was right. Second, examining the relative position of the trip points when the thermal_zone is added is insufficient -- as the BIOS reserves the right to change the trip points at run-time. The only reliable way for the user to determine if the thermal zone is in active, passive, or critical mode is to examine the relative position of the trip points. The user can do this without the kernel doing it for them by looking in /proc/acpi/thermal_zone/*/trip_points New contents for /proc/acpi/thermal_zone/*/cooling_mode: If _SCP available: "0 - Active; 1 - Passive\n" If _SCP unavailable: "<setting not supported>\n" Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-30ACPI: thermal trip points are read-onlyLen Brown
/proc/acpi/thermal_zone/*/trip_points displays what the kernel reads from the BIOS via ACPI. If you echo a string of ':' deliminted numbers to this file then it will change what it displays. But it shouldn't, since the kernel has no way to communicate these changes to ACPI thermal zones. ACPI thermal zone trip points are read-only. The kernel does have the opportunity to ask the BIOS to change the trip points with _SCP - Set Cooling Policy. Request Active Cooling Mode: # echo 0 > /proc/acpi/thermal_zone/*/cooling_policy Request Passive Cooling Mode: # echo 1 > /proc/acpi/thermal_zone/*/cooling_policy However, in practice it is quite rare for the BIOS to support the optional _SCP, and it is even more rare for the BIOS to export an _SCP that actually changes the trip points. Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-24acpi-thermal: fix mod_timer() intervalAndrew Morton
Use relative time, not absolute. Discovered by Jung-Ik (John) Lee <jilee@google.com>. Cc: Jung-Ik (John) Lee <jilee@google.com> Acked-by: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16Pull bugzilla-7570 into release branchLen Brown
2007-02-16Pull fluff into release branchLen Brown
Conflicts: arch/x86_64/pci/mmconfig.c drivers/acpi/bay.c Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16Pull misc-for-upstream into release branchLen Brown
Conflicts: drivers/usb/misc/appledisplay.c Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16ACPI: fix fan after resume from S3Konstantin Karasyov
http://bugzilla.kernel.org/show_bug.cgi?id=7570 Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16ACPI: thermal: fix units in debug outputSanjoy Mahajan
http://bugzilla.kernel.org/show_bug.cgi?id=4972 Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-14[PATCH] remove many unneeded #includes of sched.hTim Schmielau
After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown
Cosmetic only. Except in a single case, #define ACPI_*_DRIVER_NAME were invoked 0 or 1 times. Signed-off-by: Len Brown <len.brown@intel.com>