aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc
AgeCommit message (Collapse)AuthorFilesLines
2008-07-16eeepc-laptop: staticAdrian Bunk1-2/+2
make the needlessly global cm_{g,s}etv[] static. Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Len Brown <[email protected]> Signed-off-by: Andi Kleen <[email protected]>
2008-07-16compal-laptop: remove unnecessary lcd_level attributeCezary Jackiewicz1-35/+2
Signed-off-by: Cezary Jackiewicz <[email protected]> Signed-off-by: Len Brown <[email protected]> Signed-off-by: Andi Kleen <[email protected]>
2008-07-16Fujitsu-laptop updateJonathan Woithe2-52/+786
Add additional capabilities to the Fujitsu-laptop driver. * Brightness hotkey actions are sent to userspace. This can be disabled using a module parameter if it causes issues with models which handle these keys transparently in the BIOS. * Actions of additional hotkeys found on some Fujitsu models (eg: the suspend key and the dedicated "power on passphrase" keys) are broadcast to userspace. * An alternative brightness control method used by some Fujitsu models (for example, the S6410) is now supported, enabling software brightness controls on models using this method. * DMI-based module aliases are configured for the S6410 and S7020. * The current LCD brightness after booting should now be reflected in the standard backlight interface sysfs file (previously it was always set to 0). The platform brightness sysfs interface has always been fine. Thanks go to Peter Gruber who provided a significant portion of this code and tested various iterations of the patch on his S6410. Signed-off-by: Peter Gruber <[email protected]> Signed-off-by: Jonathan Woithe <[email protected]> Signed-off-by: Len Brown <[email protected]> Signed-off-by: Andi Kleen <[email protected]>
2008-07-16misc,acpi,backlight: compal Laptop ExtrasCezary Jackiewicz3-2/+457
This is driver for Compal Laptop: FL90/IFL90, based on MSI driver. This driver exports a few files in /sys/devices/platform/compal-laptop/: lcd_level - screen brightness: contains a single integer in the range 0..7 (rw) wlan - wlan subsystem state: contains 0 or 1 (rw) bluetooth - bluetooth subsystem state: contains 0 or 1 (rw) raw - raw value taken from embedded controller register (ro) In addition to these platform device attributes the driver registers itself in the Linux backlight control subsystem and is available to userspace under /sys/class/backlight/compal-laptop/. Signed-off-by: Cezary Jackiewicz <[email protected]> Signed-off-by: Andi Kleen <[email protected]> Cc: Richard Purdie <[email protected]> Cc: Henrique de Moraes Holschuh <[email protected]> Cc: Len Brown <[email protected]> Cc: Alexey Starikovskiy <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-07-14Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6Linus Torvalds3-3/+18
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits) IB/umad: BKL is not needed for ib_umad_open() IB/uverbs: BKL is not needed for ib_uverbs_open() bf561-coreb: BKL unneeded for open() Call fasync() functions without the BKL snd/PCM: fasync BKL pushdown ipmi: fasync BKL pushdown ecryptfs: fasync BKL pushdown Bluetooth VHCI: fasync BKL pushdown tty_io: fasync BKL pushdown tun: fasync BKL pushdown i2o: fasync BKL pushdown mpt: fasync BKL pushdown Remove BKL from remote_llseek v2 Make FAT users happier by not deadlocking x86-mce: BKL pushdown vmwatchdog: BKL pushdown vmcp: BKL pushdown via-pmu: BKL pushdown uml-random: BKL pushdown uml-mmapper: BKL pushdown ...
2008-07-14Merge commit 'v2.6.26' into bkl-removalJonathan Corbet3-243/+292
2008-07-02sony-laptop: BKL pushdownArnd Bergmann1-0/+3
Signed-off-by: Arnd Bergmann <[email protected]>
2008-06-27atmel_pwm: Rename the "mck" clock to "pwm_clk"Sedji Gaouaou1-1/+1
The name "mck" causes a conflict on AT91. Call it "pwm_clk" instead. Signed-off-by: Sedji Gaouaou <[email protected]> Signed-off-by: Haavard Skinnemoen <[email protected]>
2008-06-20hdpu_cpustate: BKL pushdownArnd Bergmann1-1/+8
Signed-off-by: Arnd Bergmann <[email protected]>
2008-06-20phantom: BKL pushdownJonathan Corbet1-2/+7
Add explicit lock_kernel calls to phantom_open(). Signed-off-by: Jonathan Corbet <[email protected]>
2008-06-11thinkpad-acpi: fix LED handling on older ThinkPadsHenrique de Moraes Holschuh1-27/+28
The less tested codepaths for LED handling, used on ThinkPads 570, 600e/x, 770e, 770x, A21e, A2xm/p, T20-22, X20 and maybe a few others, would write data to kernel memory it had no business touching, for leds number 3 and above. If one is lucky, that illegal write would cause an OOPS, but chances are it would silently corrupt a byte. The problem was introduced in commit af116101, "ACPI: thinkpad-acpi: add sysfs led class support to thinkpad leds (v3.2)". Fix the bug by refactoring the entire code to be far more obvious on what it wants to do. Also do some defensive "constification". Issue reported by Karol Lewandowski <[email protected]> (he's an lucky guy and got an OOPS instead of silent corruption :-) ). Root cause of the OOPS identified by Adrian Bunk <[email protected]>. Thanks, Adrian! Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Tested-by: Karol Lewandowski <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-06-11thinkpad-acpi: fix initialization error pathsHenrique de Moraes Holschuh1-207/+230
Rework some subdriver init and exit handlers, in order to fix some initialization error paths that were missing, or broken. Hitting those bugs should be extremely rare in the real world, but should that happen, thinkpad-acpi would fail to dealocate some resources and a reboot might well be needed to be able to load the driver again. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-06-11thinkpad-acpi: SW_RADIO to SW_RFKILL_ALL renameHenrique de Moraes Holschuh1-2/+2
Rename SW_RADIO to SW_RFKILL_ALL in thinkpad-acpi code and docs, following 5adad0133907790c50283bf03271d920d6897043 "Input: rename SW_RADIO to SW_RFKILL_ALL". Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-06-06fujitsu-laptop: autoload module on Lifebook P1510DDan Williams1-0/+6
Signed-off-by: Dan Williams <[email protected]> Cc: Jonathan Woithe <[email protected]> Cc: Len Brown <[email protected]> Cc: Greg KH <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-06-04Merge branch 'for_linus' of ↵Linus Torvalds1-7/+26
git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb: kgdbts: Use HW breakpoints with CONFIG_DEBUG_RODATA kgdb: use common ascii helpers and put_unaligned_be32 helper
2008-05-30acpi: fix sparse const errorsHarvey Harrison1-5/+5
In this case we want a constant pointer to constant chars: drivers/misc/thinkpad_acpi.c:3824:19: error: Just how const do you want this type to be? Like the error says. drivers/misc/thinkpad_acpi.c:3863:19: error: Just how const do you want this type to be? drivers/misc/thinkpad_acpi.c:3864:19: error: Just how const do you want this type to be? drivers/misc/thinkpad_acpi.c:3865:19: error: Just how const do you want this type to be? drivers/misc/thinkpad_acpi.c:3866:19: error: Just how const do you want this type to be? Signed-off-by: Harvey Harrison <[email protected]> Acked-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-28kgdbts: Use HW breakpoints with CONFIG_DEBUG_RODATAJason Wessel1-4/+24
Whenever CONFIG_DEBUG_RODATA is set in the kernel config many kernel text sections become read-only, and the use of software breakpoints in the kgdb tests will cause the kernel to fail to complete the start up. Until such time that there is an official API for modifying read-only text sections hardware breakpoints must be used to run the do_fork or sys_open tests or the tests get skipped. Also fix the duplicated include reported by: Huang Weiyi <[email protected]> Signed-off-by: Jason Wessel <[email protected]>
2008-05-28kgdb: use common ascii helpers and put_unaligned_be32 helperHarvey Harrison1-3/+2
Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jason Wessel <[email protected]>
2008-05-13drivers/misc/sgi-xp: replace partid_t with a shortDean Nelson7-69/+69
In preparation for supporting greater than 64 partitions replace partid_t by short in drivers/misc/sgi-xp. Signed-off-by: Dean Nelson <[email protected]> Acked-by: Robin Holt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-13drivers/misc/sgi-xp: clean up return valuesDean Nelson7-401/+291
Make XP return values more generic to XP and not so tied to XPC by changing enum xpc_retval to xp_retval, along with changing return value prefixes from xpc to xp. Also, cleanup a comment block that referenced some of these return values as well as the handling of BTE related return values. Signed-off-by: Dean Nelson <[email protected]> Acked-by: Robin Holt <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-05-05kgdb: 1000 loops for the single step test in kgdbtsJason Wessel1-2/+13
The single step test is not terribly costly and it should be able to pass at 1000 loops successfully in under 1 second. A non-kgdb timing regression was found using this test, but it did not occur frequently because by default the test was only executed a single time. This patch changes the default for the single step test to 1000 iterations and allows for individual configuration of the single step test to further exercise the kgdb subsystem when needed. Signed-off-by: Jason Wessel <[email protected]>
2008-05-05kgdb: trivial sparse fixes in kgdb test-suiteHarvey Harrison1-30/+30
Shadowed variable and integer as NULL pointer fixes: drivers/misc/kgdbts.c:877:6: warning: symbol 'sys_open_test' shadows an earlier one drivers/misc/kgdbts.c:537:27: originally declared here drivers/misc/kgdbts.c:378:22: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:386:22: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:468:30: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:472:15: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:502:30: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:506:30: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:509:30: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:523:20: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:527:20: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:530:15: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:541:21: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:545:21: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:548:15: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:559:30: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:563:15: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:573:16: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:574:19: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:578:15: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:588:16: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:589:19: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:593:15: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:602:16: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:604:15: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:925:3: warning: Using plain integer as NULL pointer drivers/misc/kgdbts.c:938:3: warning: Using plain integer as NULL pointer Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: Jason Wessel <[email protected]>
2008-04-30Merge branch 'release' of ↵Linus Torvalds4-195/+1260
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-30Merge branches 'release', 'acpica', 'bugzilla-10224', 'bugzilla-9772', ↵Len Brown17-290/+10088
'bugzilla-9916', 'ec', 'eeepc', 'idle', 'misc', 'pm-legacy', 'sysfs-links-2.6.26', 'thermal', 'thinkpad' and 'video' into release
2008-04-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds1-1/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc64: remove duplicated include sparc: Add kgdb support. kgdbts: Sparc needs sstep emulation. sparc32: Kill smp_message_pass() and related code. sparc64: Kill PIL_RESERVED, unused. sparc64: Split entry.S up into seperate files.
2008-04-29[IA64] allocate multiple contiguous pages via uncached allocatorDean Nelson1-2/+2
Enable the uncached allocator to allocate multiple pages of contiguous uncached memory. Signed-off-by: Dean Nelson <[email protected]> Signed-off-by: Tony Luck <[email protected]>
2008-04-29intel_menlo: fix build warningLen Brown1-5/+0
drivers/misc/intel_menlow.c:191: warning: label ‘unregister’ defined but not used Signed-off-by: Len Brown <[email protected]>
2008-04-29drivers: use non-racy method for proc entries creation (2)Denis V. Lunev2-13/+5
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Signed-off-by: Denis V. Lunev <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Alexey Dobriyan <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Peter Osterlund <[email protected]> Cc: Bartlomiej Zolnierkiewicz <[email protected]> Cc: Dmitry Torokhov <[email protected]> Cc: Neil Brown <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-29proc: remove proc_root from driversAlexey Dobriyan2-7/+7
Remove proc_root export. Creation and removal works well if parent PDE is supplied as NULL -- it worked always that way. So, one useless export removed and consistency added, some drivers created PDEs with &proc_root as parent but removed them as NULL and so on. Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-29drivers/misc: elide a non-zero test on a result that is never 0Julia Lawall1-13/+11
The function thermal_cooling_device_register always returns either a valid pointer or a value made with ERR_PTR, so a test for non-zero on the result will always succeed. The problem was found using the following semantic match. (http://www.emn.fr/x-info/coccinelle/) //<smpl> @a@ expression E, E1; statement S,S1; position p; @@ E = thermal_cooling_device_register(...) ... when != E = E1 if@p (E) S else S1 @n@ position a.p; expression E,E1; statement S,S1; @@ E = NULL ... when != E = E1 if@p (E) S else S1 @depends on !n@ expression E; statement S,S1; position a.p; @@ * if@p (E) S else S1 //</smpl> Signed-off-by: Julia Lawall <[email protected]> Cc: Thomas Sujith <[email protected]> Cc: Len Brown <[email protected]> Cc: Zhang Rui <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-29drivers/misc: replace remaining __FUNCTION__ occurrencesHarvey Harrison4-18/+18
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-29Misc, phantom, fix pollJiri Slaby1-4/+6
Return ERR even if there are pending data, but hw is not running. Do not decrement count in poll, do it in ioctl, where data are actually read. Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-29Misc: phantom, add compat ioctlJiri Slaby1-4/+20
Openhaptics uses pointers in _IOC() macros, implement compat for them. Also add _IOC alternatives which are not 32/64 bit dependent (structures passed through aren't yet) -- libphantom will use them. [[email protected]: coding-style fixes] Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-04-29ACER_WMI/ASUS_LAPTOP: fix build bugIngo Molnar1-0/+2
randconfig testing in x86.git found the following upstream build bug: drivers/built-in.o: In function `acer_led_exit': acer-wmi.c:(.text+0xdc76e): undefined reference to `led_classdev_unregister' drivers/built-in.o: In function `acer_platform_probe': acer-wmi.c:(.devinit.text+0x63e6): undefined reference to `led_classdev_register' which was due to acer-wmi.o only depending on CONFIG_LEDS_CLASS, while also using a symbol offered by CONFIG_NEW_LEDS. Also fix a similar bug in CONFIG_ASUS_LAPTOP. Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failedCyrill Gorcunov1-1/+1
Signed-off-by: Cyrill Gorcunov <[email protected]> Acked-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29eeepc-laptop: add hwmon fan controlCorentin Chary2-0/+148
Adds an hwmon interface to control the fan. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29eeepc-laptop: add backlightCorentin Chary2-0/+78
Add backlight class support to the eeepc-laptop driver. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29eeepc-laptop: add base driverEric Cooper3-1/+455
This patch is based on Eric Cooper's work to clean the original asus_acpi given by Asus. It's a platform driver (/sys/devices/platform/eeepc/) wich support: - hotkeys - wlan on/off - camera on/off - cardr on/off Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: bump up version to 0.20Henrique de Moraes Holschuh1-1/+1
Full LED sysfs support, and the rest of the assorted minor fixes and enhancements are a good reason to checkpoint a new version... Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: fix selects in KconfigHenrique de Moraes Holschuh1-1/+2
Add missing select for BACKLIGHT_LCD_SUPPORT, as select doesn't select the dependencies of a symbol for us. Also, "select INPUT" in Kconfig. We are not an Input device, nor are we anywhere close to the input subsystem in the Kconfig tree, so using "depends on INPUT" is not user-friendly at all. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: use a private workqueueHenrique de Moraes Holschuh1-7/+19
Switch all task workers to a private thinkpad-acpi workqueue. This way, we don't risk causing trouble for other tasks scheduled to the default work queue, as our workers end up needing to access the ACPI EC, run ACPI AML code, trigger SMI traps... and none of those are exactly known to be fast, simple operations. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: fluff really minor fixHenrique de Moraes Holschuh1-1/+1
Fix a minor (nano?) thing that bothered me at exactly at the wrong time. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: add sysfs led class support to thinkpad leds (v3.2)Henrique de Moraes Holschuh1-1/+135
Add a sysfs led class interface to the led subdriver. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: add sysfs led class support for thinklight (v3.1)Henrique de Moraes Holschuh1-1/+56
Add a sysfs led class interface to the thinklight (light subdriver). Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Cc: Richard Purdie <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: prepare light and LED for sysfs supportHenrique de Moraes Holschuh2-55/+138
Do some preparatory work to add sysfs support to the thinklight and thinkpad leds driver. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: claim tpacpi as an official short handle (v1.1)Henrique de Moraes Holschuh1-2/+6
Unfortunately, a lot of stuff in the kernel has size limitations, so "thinkpad-acpi" ends up eating up too much real estate. We were using "tpacpi" in symbols already, but this shorthand was not visible to userland. Document that the driver will use tpacpi as a short hand where necessary, and use it to name the kernel thread for NVRAM polling (now named "ktpacpi_nvramd"). Also, register a module alias with the shorthand. One can refer to the module using the shorthand name. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: fix brightness dimming control bugHenrique de Moraes Holschuh1-15/+49
ibm-acpi and thinkpad-acpi did not know about bit 5 of the EC backlight level control register (EC 0x31), so it was always forced to zero on any writes. This would disable the BIOS option to *not* use a dimmer backlight level scale while on battery, and who knows what else (there are two other control bits of unknown function). Bit 5 controls the "reduce backlight levels when on battery" optional functionality (active low). Bits 6 and 7 are better left alone as well, instead of being forced to zero. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: rate-limit CMOS/EC unsynced error messagesHenrique de Moraes Holschuh1-7/+15
If userspace applications mess with the CMOS NVRAM, or something causes both the ACPI firmware and thinkpad-acpi to try to change the brightness at the same time, it is possible to have the CMOS and EC registers for the current brightness go out of sync. Should that happen, thinkpad-acpi could be really obnoxious when using a brightness_mode of 3 (both EC and CMOS). Instead of complaining a massive number of times, make sure to complain only once until EC and CMOS are back in sync. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Cc: Joerg Platte <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: enhance box identification output (v2)Henrique de Moraes Holschuh1-3/+9
During initialization, thinkpad-acpi outputs some messages to make sure releavant box identification information is easily available in-line with the rest of the driver messages. Enhance those messages to output the alfanumeric model number as well. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>
2008-04-29ACPI: thinkpad-acpi: warn once about weird hotkey masksHenrique de Moraes Holschuh1-0/+17
thinkpad-acpi knows for a while now how to best program the hotkeys by default, and always enable them by default. Unfortunately, this information has not filtered down everywhere it needs to, yet. Notably, old ibm-acpi documentation and most "thinkpad setup guides" will have wrong information on this area. Warn the local admin once whenever any of the following patterns are met: 1. Attempts to set hotkey mask to 0xffff (artifact from docs and config for the old ibm-acpi driver and behaviour). This mask makes no real-world sense; 2. Attempts to set hotkey mask to 0xffffffff, which means the user is trying to just have "everything work" without even reading the documentation, or that we need to get a bug report, because there is a new thinkpad out there with new exciting hot keys :-) 3. Attempts to set hotkey mask to 0xffffff, which is almost never the correct way to set up volume and brightness event reporting (and with the current state-of-the-art, it is known to never be right way to do it). The driver will perform any and all requested operations, though, regardless of any warnings. I hope these warnings can be removed one or two years from now. Signed-off-by: Henrique de Moraes Holschuh <[email protected]> Signed-off-by: Len Brown <[email protected]>