summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2007-04-29ACPI: thinkpad-acpi: fix a fan watchdog invocationHenrique de Moraes Holschuh1-2/+3
The fan control watchdog was being called in one place even when the fan control operation had failed. Fix it. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-29ACPI: thinkpad-acpi: do not arm fan watchdog if it would not workHenrique de Moraes Holschuh1-0/+3
Do not enable/rearm the fan control safety watchdog if we would not be able to do anything to the fan anyway. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-29ACPI: thinkpad-acpi: add a fan-control feature master toggleHenrique de Moraes Holschuh3-9/+38
Len Brown considers that an active by default fan control interface in laptops may be too close to giving users enough rope. There is a good chance he is quite correct on this, especially if someone decides to use that interface in applets and users are not aware of its risks. This patch adds a master switch to thinkpad-acpi that enables or disables the entire fan-control feature as a module parameter: "fan_control". It defaults to disabled. Set it to non-zero to enable fan control. Also, the patch removes the expermiental status from fan control, since it is stable enough to not be called experimental, and the master switch makes it safe enough to do so. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25ACPI: thinkpad-acpi: update brightness sysfs interface supportHenrique de Moraes Holschuh3-8/+51
Update the brightness sysfs interface (done through the backlight class) to be in line with the rest of the thinkpad-acpi driver. This renames the incorrect, un-obvious, and clash-prone name of "ibm" for the backlight device to a much more fitting and descriptive "thinkpad_screen". This is something I wanted to do for quite a while... Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25ACPI: thinkpad-acpi: add sysfs support to the cmos command subdriverHenrique de Moraes Holschuh2-12/+44
Add sysfs attributes to send ThinkPad CMOS commands. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25ACPI: thinkpad-acpi: add a safety net for TPEC fan control modeHenrique de Moraes Holschuh1-4/+12
The Linux ThinkPad community is not positive that all ThinkPads that do HFSP EC fan control do implement full-speed and auto modes, some of the earlier ones supporting HFSP might not. If the EC ignores the AUTO or FULL-SPEED bits, it will pay attention to the lower three bits that set the fan level. And as thinkpad-acpi was leaving these set to zero, it would stop(!) the fan, which is Not A Good Thing. So, as a safety net, we now make sure to also set the fan level part of the HFSP register to speed 7 for full-speed, and a minimum of speed 4 for auto mode. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25ACPI: thinkpad-acpi: add sysfs support to fan subdriverHenrique de Moraes Holschuh3-74/+415
Export sysfs attributes to monitor and control the internal thinkpad fan (some thinkpads have more than one fan, but thinkpad-acpi doesn't support the second fan yet). The sysfs interface follows the hwmon design guide for fan devices. Also, fix some stray "thermal" files in the fan procfs description that have been there forever, and officially support "full-speed" as the name for the PWM-disabled state of the fan controller to keep it in line with the hwmon interface. It is much better a name for that mode than the unobvious "disengaged" anyway. Change the procfs interface to also accept full-speed as a fan level, but still report it as disengaged for backwards compatibility. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25ACPI: thinkpad-acpi: add sysfs support to the thermal subdriverHenrique de Moraes Holschuh3-7/+143
Export thinkpad thermal sensors to sysfs, following the hwmon specification for thermal monitoring sensors. ThinkPad thermal monitoring is done by the EC. Sensors can show up or disappear at runtime when they are inside hotswappable hardware, such as batteries. Sensors that are not available return -ENXIO when accessed. Up to 16 thermal sensors are supported on new firmware (but nobody has reported a ThinkPad with more than 12 sensors so far), and 8 sensors are supported on older firmware. Thermal sensor mapping is model-specific. Precision varies, it is 1 degree Celcius on new ThinkPads, but higher on some older models. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25ACPI: thinkpad-acpi: protect fan and hotkey data structuresHenrique de Moraes Holschuh2-27/+92
Add proper mutex locking to some data structures access subject to races due to concurrent access of driver functions on the hotkey and fan subdrivers. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25ACPI: thinkpad-acpi: add infrastructure for the sysfs device attributesHenrique de Moraes Holschuh2-5/+102
Add infrastructure to deal with sysfs attributes and grouping, and helpers for common sysfs parsing. Switch driver attributes to use them. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25ACPI: thinkpad-acpi: driver sysfs conversionHenrique de Moraes Holschuh3-2/+133
Add the sysfs attributes for the platform driver. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25ACPI: thinkpad-acpi: register with the device modelHenrique de Moraes Holschuh4-6/+97
Register thinkpad-acpi platform driver and platform device for the device model. Also register the platform device with the hwmon class. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: improve fan watchdog messagesHenrique de Moraes Holschuh1-3/+7
Improve some of the fan watchdog error messages to be a little more helpful. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: cleanup thermal subdriver for sysfs conversionHenrique de Moraes Holschuh2-26/+61
Clean-up the thermal subdriver for sysfs conversion. Make thermal_get_* reentrancy-safe while at it, and add the missing thermal_read_mode variable to the header file. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: clean up CMOS commands subdriverHenrique de Moraes Holschuh2-20/+23
Some ThinkPad CMOS commands subdriver cleanups, and also rename/promote cmos_eval to a ACPI helper function, as it is used by many other subdrivers. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: cleanup video subdriverHenrique de Moraes Holschuh2-90/+197
Cleanup video subdriver for sysfs conversion, and properly check result status of acpi_evalf. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: cleanup bluetooth and wan for sysfs conversionHenrique de Moraes Holschuh2-42/+108
Prepare bluetooth and wan driver code to be more easily hooked into sysfs helpers, by separating the procfs logic from the device attribute handling. These changes also remove the entries from procfs on notebooks without the bluetooth/wan hardware installed. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: clean up hotkey subdriverHenrique de Moraes Holschuh1-17/+29
Cleanup hotkey subdriver code. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: mark acpi helper functions __must_checkHenrique de Moraes Holschuh1-4/+4
Mark acpi_evalf and friends __must_check. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: prepare for device model conversionHenrique de Moraes Holschuh2-118/+153
Prepare the thinkpad-acpi driver for the conversion to the device model, by renaming variables and doing other glue work that shall make the later patches much cleaner. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: use bitfields for module flagsHenrique de Moraes Holschuh2-92/+83
Use a bitfield to hold boolean module-wide flags, to conserve some memory. It is easy and it is clean, so we do it just for the heck of it even if it saves very little space. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: use bitfields to hold subdriver flagsHenrique de Moraes Holschuh2-22/+23
Save some memory by using bitfields to hold boolean flags for the subdrivers. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: improve thinkpad detectionHenrique de Moraes Holschuh3-0/+21
Improve the detection of ThinkPads, so as to reduce the chances of false positives. Since this could potentially add false negatives on the very old models, add a module parameter to force the detection of a thinkpad. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: uncouple subdriver init from ibms structHenrique de Moraes Holschuh2-175/+278
Move the .init method from ibms struct to another struct, and use a list head to control which subdrivers have been activated. This allows us to have the subdriver init methods marked __init, saving quite a lot of .text size, and even a bit of .data size as some data can now be made __initdata. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: add subdriver debug statementsHenrique de Moraes Holschuh3-0/+119
Add debug messages to the subdriver initialization and exit code. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: clean up probing and move init to subdriversHenrique de Moraes Holschuh2-84/+151
Move most of the probing code to its own function, and most of the subdriver-specific init code into subdriver init functions. This allows us to not define pci_handle unless the dock subdriver is enabled, as well. This patch causes a minor userland interface change: if a subdriver doesn't detect a capability, /proc entries for it are not created anymore (as opposed to a /proc entry that just returned "unsupported"). Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: add debug modeHenrique de Moraes Holschuh4-0/+39
Add a debug mode parameter and verbose debug mode Kconfig option. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: update fan firmware documentationHenrique de Moraes Holschuh1-15/+13
Update some stuff in the in-code text describing the ThinkPad fan firmware. This patch has no code changes. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: rename thinkpad constantsHenrique de Moraes Holschuh2-127/+125
Rename all IBMACPI_ constants, now that we are not called ibm-acpi anymore. Driver-specific constants are now prefixed TPACPI_, ThinkPad firmware specific ones are now prefixed TP_CMOS_, TP_ACPI_, or TP_EC_. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: rename module glueHenrique de Moraes Holschuh2-8/+8
Rename module init and exit functions, now that we are not called ibm-acpi anymore. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: rename one stray use of ibm-acpi in a commentHenrique de Moraes Holschuh1-1/+1
Rename a stray use of ibm-acpi on a comment, no functional changes. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-22ACPI: thinkpad-acpi: rename register_ibmacpi_subdriverHenrique de Moraes Holschuh2-3/+3
Rename register_ibmacpi_subdriver to register_tpacpi_subdriver, as we are not called ibmacpi anymore. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-30ACPI: thinkpad-acpi: update MAINTAINERSHenrique de Moraes Holschuh1-9/+9
Update MAINTAINERS file for the ibm-acpi -> thinkpad-acpi renaming. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-30ACPI: thinkpad-acpi: cleanup after renameHenrique de Moraes Holschuh3-36/+49
Cleanup documentation, driver strings and other misc stuff, now that the driver is named "thinkpad-acpi". Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-30ACPI: thinkpad-acpi: add compatibility MODULE_ALIAS entryHenrique de Moraes Holschuh1-0/+3
Add a ibm_acpi module alias for userpace, so that modprobe ibm_acpi will still load the correct driver. This alias can be removed in the future, probably two years from now if nothing warrants removing it sooner. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-30ACPI: thinkpad-acpi: cleanup Kconfig for thinkpad-acpiHenrique de Moraes Holschuh4-35/+38
Since ibm-acpi was renamed to thinkpad-acpi, rename and update its Kconfig entries and Kconfig-related symbols accordingly. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-30ACPI: ibm-acpi: rename driver to thinkpad-acpiHenrique de Moraes Holschuh4-2/+2
Rename the ibm-acpi driver to thinkpad-acpi. ThinkPads are not even made by IBM anymore, so it is high time to rename the driver... The name thinkpad-acpi was used sometime ago by a thinkpad-specific hotkey driver by Erik Rigtorp, around the 2.6.8-2.6.10 time frame. The driver apparently never got merged into mainline (it did make some trips through -mm). ibm-acpi was merged soon after, making its debut in 2.6.10. The reuse of the thinkpad-acpi name shouldn't be a problem as far as user confusion goes, as Erik's thinkpad-acpi apparently didn't get widespread use in the Linux ThinkPad community and most hits for thinkpad-acpi in google point to ibm-acpi anyway. Erik, if you read this, please consider the reuse of the thinkpad-acpi name as a compliment to your effort to make ThinkPads more useful to all of us. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-26ACPI: ibm-acpi: move driver to drivers/misc hierarchyHenrique de Moraes Holschuh6-38/+38
ibm-acpi is not an ACPICA driver, so move it to drivers/misc as per Len Brown's request. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-26ACPI: ibm-acpi: update documentationHenrique de Moraes Holschuh1-60/+25
Update documentation header, and relocate a hunk of text that was missplaced. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-26ACPI: ibm-acpi: update copyright noticeHenrique de Moraes Holschuh1-2/+3
Update copyright and license info on the source code comments. No functional changes. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-26ACPI: ibm-acpi: organize codeHenrique de Moraes Holschuh1-641/+757
Shuffle code around to better organize the driver code inside the ibm-acpi.c file. This patch adds no functional changes. It is pure fluff that will make me a bit more productive. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-26ACPI: ibm-acpi: add header fileHenrique de Moraes Holschuh2-138/+438
Add a (private) header file for ibm-acpi, and move type definitions and ThinkPad driver constants to the new header file. This patch has no functional changes. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-26ACPI: ibm-acpi: rename some identifiersHenrique de Moraes Holschuh1-19/+24
Rename some identifiers so that they are more in tune with the rest of the driver code, or less generic. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-26ACPI: ibm-acpi: kill trailing whitespaceHenrique de Moraes Holschuh2-6/+6
I shall protect the ibm-acpi city against the invasion of the barbarian blanks! To the unforgiving jaws of sed s/[[:blank:]]\+$// they go! Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-26Linux 2.6.21-rc5v2.6.21-rc5Linus Torvalds1-1/+1
.. hopefully most of the fallout of the timer changes is contained now. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-26[PATCH] clocksource: Fix thinko in watchdog selectionThomas Gleixner1-1/+2
The watchdog implementation excludes low res / non continuous clocksources from being selected as a watchdog reference unintentionally. Allow using jiffies/PIT as a watchdog reference as long as no better clocksource is available. This is necessary to detect TSC breakage on systems, which have no pmtimer/hpet. The main goal of the initial patch (preventing to switch to highres/nohz when no reliable fallback clocksource is available) is still guaranteed by the checks in clocksource_watchdog(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-26[PATCH] dynticks: fix hrtimer rounding error in next_timer_interruptThomas Gleixner1-3/+16
The rework of next_timer_interrupt() fixed the timer wheel bugs, but invented a rounding error versus the next hrtimer event. This is caused by the conversion of the hrtimer internal representation to relative jiffies. This causes bug #8100: http://bugzilla.kernel.org/show_bug.cgi?id=8100 next_timer_interrupt() returns "now" in such a case and causes the code in tick_nohz_stop_sched_tick() to trigger the timer softirq, which is bogus as no timer is due for expiry. This results in an endless context switching between idle and ksoftirqd until a timer is due for expiry. Modify the hrtimer evaluation so that, it returns now + 1, when the conversion results in a delta < 1 jiffie. It's confirmed to resolve bug #8100 Reported-by: Emil Karlson <jkarlson@cc.hut.fi> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-25Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds7-13/+68
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 4278/1: configure pxa27x I2C SCL as "input" [ARM] 4272/1: Missing symbol h1940_pm_return fix [ARM] 4235/1: ns9xxx: declare the clock functions as "const" [ARM] 4271/1: iop32x: fix ep80219 detection (support iq80219 platforms) [ARM] 4270/2: mach-s3c2443/irq.c off by one error in dma irqs
2007-03-25[PATCH] fix typos in net/ieee80211/KconfigPatrick Ringl1-3/+3
This is just a QA / cosmetic fix .. [ "a modules" => "a module" ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-25[PATCH] cx88-dvb: fix nxt200x rf input switchingMichael Krufky1-2/+2
After dvb tuner refactoring, the pllbuff has been altered such that the pll address is now stored in buf[0]. Instead of sending buf to set_pll_input, we should send buf+1. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Ivan Andrewjeski <ivan@fiero-gt.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>