summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/thermal.c
Commit message (Collapse)AuthorAgeFilesLines
* Add common orderly_poweroff()Jeremy Fitzhardinge2007-07-181-22/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ACPI: gracefully print null trip-point deviceThomas Renninger2007-06-181-4/+11
| | | | | | | | 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>
* ACPI: thermal: Replace pointer with name in trip_pointsThomas Renninger2007-05-291-6/+7
| | | | | | | | | 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>
* ACPI: delete un-reliable concept of cooling modeLen Brown2007-04-301-37/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ACPI: thermal trip points are read-onlyLen Brown2007-04-301-65/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | /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>
* acpi-thermal: fix mod_timer() intervalAndrew Morton2007-04-241-1/+2
| | | | | | | | | | 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>
* Pull bugzilla-7570 into release branchLen Brown2007-02-161-12/+16
|\
| * ACPI: fix fan after resume from S3Konstantin Karasyov2007-02-161-12/+16
| | | | | | | | | | | | | | 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>
* | Pull fluff into release branchLen Brown2007-02-161-4/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: arch/x86_64/pci/mmconfig.c drivers/acpi/bay.c Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: delete extra #defines in /drivers/acpi/ driversLen Brown2007-02-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ACPI: fix acpi_driver.name usageLen Brown2007-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was erroneously used as a description rather than a name. ie. turn this: lenb@se7525gp2:/sys> ls bus/acpi/drivers ACPI AC Adapter Driver ACPI Embedded Controller Driver ACPI Power Resource Driver ACPI Battery Driver ACPI Fan Driver ACPI Processor Driver ACPI Button Driver ACPI PCI Interrupt Link Driver ACPI Thermal Zone Driver ACPI container driver ACPI PCI Root Bridge Driver hpet into this: lenb@se7525gp2:~> ls /sys/bus/acpi/drivers ac battery button container ec fan hpet pci_link pci_root power processor thermal Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: clean up ACPI_MODULE_NAME() useLen Brown2007-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cosmetic only Make "module name" actually match the file name. Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care. Fix indentation where Lindent did get confused. Signed-off-by: Len Brown <len.brown@intel.com>
* | | Pull misc-for-upstream into release branchLen Brown2007-02-161-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | Conflicts: drivers/usb/misc/appledisplay.c Signed-off-by: Len Brown <len.brown@intel.com>
| * | ACPI: thermal: fix units in debug outputSanjoy Mahajan2007-02-161-1/+1
| |/ | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=4972 Signed-off-by: Len Brown <len.brown@intel.com>
* | [PATCH] remove many unneeded #includes of sched.hTim Schmielau2007-02-141-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | 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>
* Pull sysfs into test branchLen Brown2007-02-031-2/+2
|\ | | | | | | | | | | | | | | | | Conflicts: Documentation/feature-removal-schedule.txt include/acpi/acpi_drivers.h Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: add ACPI bus_type for driver modelPatrick Mochel2006-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ACPI bus_type for Linux driver model. 1. .shutdown method is added into acpi_driver.ops needed by bus_type operations. 2. remove useless parameter 'int state' in .resume method. 3. change parameter 'int state' to 'pm_message_t state' in .suspend method. Note: The new .uevent method mark ACPI drivers by PNPID instead of by name. Udev script needs to look for "HWID=" or "COMPTID=" to load ACPI drivers as a result. Signed-off-by: Li Shaohua <shaohua.li@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: replace kmalloc+memset with kzallocBurman Yan2006-12-201-5/+2
| | | | | | | | | | Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: Remove unnecessary from/to-void* and to-void casts in drivers/acpiJan Engelhardt2006-10-141-15/+15
|/ | | | | Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Len Brown <len.brown@intel.com>
* Merge branch 'release' of ↵Linus Torvalds2006-07-101-5/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: ACPI: ACPI_DOCK: Initialize the atomic notifier list ACPI: acpi_os_allocate() fixes ACPI: SBS: fix initialization, sem2mutex ACPI: add 'const' to several ACPI file_operations ACPI: delete some defaults from ACPI Kconfig ACPI: "Device `[%s]' is not power manageable" make message debug only ACPI: ACPI_DOCK Kconfig Revert "Revert "ACPI: dock driver"" ACPI: acpi_os_get_thread_id() returns current ACPI: ACPICA 20060707
| * ACPI: add 'const' to several ACPI file_operationsArjan van de Ven2006-07-101-5/+5
| | | | | | | | | | Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | [PATCH] ACPI: fix fan/thermal resumeKonstantin Karasyov2006-07-101-1/+16
|/ | | | | | | | | | | | | | | | | | | | Daniel Ritz <daniel.ritz-ml@swissonline.ch> says: The acpi driver suspend/resume patches that went in recently caused a regression on my box (toshiba tecra 8000 laptop): after resume from swsusp the fan turns on keeping blowing cold air out of my notebook. before the patches, the fan was off and would only make noise when required. it's the same thing described in bugzilla.kernel.org #5000. the acpi suspend/resume patches or at least parts of them originate in this bug. now the last patch in the report (attach id 8438) actually fixes the problem - for me and the reporter. this is a trimmed down version of that patch. Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Cc: Len Brown <len.brown@intel.com> Cc: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk> Cc: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* ACPI: thermal: Remove unneeded acpi_handle from driver.Patrick Mochel2006-06-301-2/+0
| | | | | Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thermal: Use acpi_device's handle instead of driver'sPatrick Mochel2006-06-301-15/+15
| | | | | Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thermal: add struct acpi_device to struct acpi_thermal.Patrick Mochel2006-06-301-20/+5
| | | | | | | - Use it instead of acpi_bus_get_device() where we can.. Signed-off-by: Patrick Mochel <mochel@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: delete tracing macros from drivers/acpi/*.cPatrick Mochel2006-06-271-99/+71
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: un-export ACPI_ERROR() -- use printk(KERN_ERR...)Len Brown2006-06-271-1/+1
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: un-export ACPI_WARNING() -- use printk(KERN_WARNING...)Len Brown2006-06-271-9/+9
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: Enable ACPI error messages w/o CONFIG_ACPI_DEBUGThomas Renninger2006-06-261-39/+19
| | | | | Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* Pull bugzilla-5000 into release branchLen Brown2006-06-151-0/+16
|\
| * ACPI: create acpi_thermal_resume()Konstantin Karasyov2006-05-151-0/+16
| | | | | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=4364 Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull trivial2 into release branchLen Brown2006-06-151-1/+1
|\ \
| * | ACPI: fix memory leak in acpi_thermal_add() error pathVasily Averin2006-05-131-1/+1
| |/ | | | | | | | | | | Signed-off-by: Vasily Averin <vvs@sw.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
* | Pull trivial into release branchLen Brown2006-06-151-1/+3
|\ \
| * | [ACPI] fix possible acpi thermal leak in failure pathDave Jones2006-03-311-1/+3
| |/ | | | | | | | | | | | | Coverity: #601 Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
* | ACPI: execute Notify() handlers on new threadAlexey Starikovskiy2006-06-141-2/+1
|/ | | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=5534 Thanks to Peter Wainwright for isolating the issue. Thanks to Andi Kleen and Bob Moore for feedback. Thanks to Richard Mace and others for testing. Updates by Konstantin Karasyov. Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
* [ACPI] Allow return to active cooling mode once passive mode is enteredThomas Renninger2005-11-301-78/+85
| | | | | | | | | | | http://bugzilla.kernel.org/show_bug.cgi?id=3410 https://bugzilla.novell.com/show_bug.cgi?id=131543 Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Konstantin Karasyov <konstantin.a.karasyov@intel.com> Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Yu Luming <luming.yu@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
* [ACPI] Lindent all ACPI filesLen Brown2005-08-051-401/+400
| | | | Signed-off-by: Len Brown <len.brown@intel.com>
* Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds2005-04-161-0/+1445
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud