summaryrefslogtreecommitdiffstats
path: root/drivers/misc/thinkpad_acpi.c
Commit message (Collapse)AuthorAgeFilesLines
* ACPI: thinkpad-acpi: fix hotkey_get_tablet_modeHenrique de Moraes Holschuh2008-03-041-1/+2
| | | | | | | | | | | | | | | | I used the wrong return convention on hotkey_get_tablet_mode(), breaking a lot of stuff. Bad Henrique! Fix it to return the status in the parameter-by-reference, and IO status on the function return value. Duh. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Zdenek Kabelac <zdenek.kabelac@gmail.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ACPI: thinkpad-acpi: add tablet-mode reportingHenrique de Moraes Holschuh2008-02-161-11/+68
| | | | | | | | | | | | | | | A quick study of the 0x5009/0x500A HKEY event on the X61t DSDT revealed the existence of the EC HTAB register (EC 0x0f, bit 7), and a compare with the X41t DSDT shows that HKEY.MHKG can be used to verify if the ThinkPad is tablet-capable (MHKG present), and in tablet mode (bit 3 of MHKG return is set). Add an attribute to report this information, "hotkey_tablet_mode". This attribute has poll()/select() support, and can be used along with EV_SW SW_TABLET_MODE to hook userspace to tablet events. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: minor hotkey_radio_sw fixesHenrique de Moraes Holschuh2008-02-161-4/+4
| | | | | | | Fixes some minor points in the radio switch code and docs. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: issue input events for tablet swivel eventsHenrique de Moraes Holschuh2008-02-161-2/+20
| | | | | | | | | Issue EV_SW SW_TABLET_MODE events for HKEY events 0x5009 and 0x500A on the X41t/X60t/X61t. As usual, we suppress the HKEY events on the netlink interface to avoid sending duplicate events to userspace. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: make the video output feature optionalHenrique de Moraes Holschuh2008-02-161-7/+13
| | | | | | | | | | The video output port control feature is not very useful on many ThinkPads (especially when a X server is running), and lately userspace is getting better and better at it, so it makes sense to allow users to stripe out the thinkpad-acpi video feature from their kernels and save at least 2KB. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: synchronize input device switchesHenrique de Moraes Holschuh2008-02-161-0/+1
| | | | | | | | Issue EV_SW events at module init time to synchronize the input device with the current state of the switch, otherwise we might lose the first event. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: always track input device open/closeHenrique de Moraes Holschuh2008-02-161-5/+8
| | | | | | | | | The open() and close() hooks for the input device are useful even when hotkey NVRAM polling support is not in use, so it is better to always have them around. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: trivial fix to module_desc typoHenrique de Moraes Holschuh2008-02-161-1/+1
| | | | | | | Thanks to Damjan <gdamjan@mail.net.mk> for noticing this one. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* thinkpad_acpi: staticAdrian Bunk2008-02-141-2/+2
| | | | | | Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: second TP_EC_FAN_FULLSPEED should be TP_EC_FAN_AUTORoel Kluin2008-02-071-1/+1
| | | | | | | | | fix bug in safety net for TPEC fan control mode eaa7571b2d1a08873e4bdd8e6db3431df61cd9ad Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: bump up version to 0.19Henrique de Moraes Holschuh2008-02-011-1/+1
| | | | | | | | The major code reorganization and cleanups, and new HKEY events, plus poll()/select() support are good reasons to checkpoint a new version... Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: update copyright dates to 2008Henrique de Moraes Holschuh2008-02-011-1/+1
| | | | | | | Update the copyright headers to include 2008. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: add poll() support to some sysfs attributesHenrique de Moraes Holschuh2008-02-011-4/+32
| | | | | | | | | | | | | Implement poll()/select() support through sysfs_notify() for some key attributes which userspace might want to poll() or select() on. In order to let userspace know poll()/select() support is available for an attribute, the thinkpad-acpi sysfs interface version is also bumped up. Further changes that add poll()/select() capabilities to any pre-existing attributes will also increment the sysfs interface version. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: silence _sta warningHenrique de Moraes Holschuh2008-02-011-0/+2
| | | | | | | | | | | | | When both CONFIG_THINKPAD_ACPI_DOCK and CONFIG_THINKPAD_ACPI_BAY are undefined, _sta is not used and that causes a gcc warning. Fix it (and I think this is a regression, I am pretty sure I fixed this once before, sorry about that). Issue reported by: Pritt Laes. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Pritt Laes <plaes@plaes.org> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: add X61t HKEY eventsHenrique de Moraes Holschuh2008-02-011-3/+6
| | | | | | | | | | Tomas Carnecky reports that events 0x5009 and 0x500a are swivel events, and that 0x500b/0x500c are tablet pen storage bay events. Document these events, and avoid nasty messages when they happen. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: wakeup on hotunplug reportingHenrique de Moraes Holschuh2008-02-011-7/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle some HKEY events that the firmware uses to report the reason for a wake up, and to also notify that the system could go back to sleep (if it woke up just to eject something from the bay, or to undock). The driver will report the reason of the last wake up in the sysfs attribute "wakeup_reason": 0 for "none, unknown, or standard ACPI wake up event", 1 for "bay ejection request" and 2 for "undock request". The firmware will also report if the operation that triggered the wake up has been completed, by issuing an HKEY 0x3003 or 0x4003 event. If the operation fails, no event is sent. When such a hotunplug sucessfull notification is issued, the driver sets the attribute "wakeup_hotunplug_complete" to 1. While the firmware does tell us whether we are waking from a suspend or hibernation scenario, the Linux way of hibernating makes this information not reliable, and therefore it is not reported. The idea is that if any of these attributes are non-zero, userspace might want to do something at the end of the "wake up from sleep" procedures, such as offering to send the machine back into sleep as soon as it is safe to do so. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: cleanup hotkey_notify and HKEY log messagesHenrique de Moraes Holschuh2008-02-011-15/+20
| | | | | | | | | | | | Use a generic message on hotkey_notify to log unknown and unhandled events, and cleanup hotkey_notify a little. Also, document event 0x5010 (brightness changed notification) and do not log it as an unknown event (even if we do not use it for anything right now). Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: add suspend handlerHenrique de Moraes Holschuh2008-02-011-0/+17
| | | | | | | Add a handler for suspend events. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: some checkpatch.pl fluffHenrique de Moraes Holschuh2008-02-011-116/+175
| | | | | | | Fix some of the crap reported by checkpatch.pl. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: rename IBM in definesHenrique de Moraes Holschuh2008-02-011-162/+162
| | | | | | | | | Rename defines with IBM in their name that are related to the older driver name (ibm-acpi) to TPACPI, unless they are specific to IBM ThinkPads. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: module glue cleanupsHenrique de Moraes Holschuh2008-02-011-33/+50
| | | | | | | | General cleanup of module glue: Do some code reordering, and add missing parameter help text. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: spring cleanup part 4Henrique de Moraes Holschuh2008-02-011-51/+4
| | | | | | | | Remove dead code, and anything in the old changelog that is not a thank you credit, or a key point to track down history. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: spring cleanup part 3Henrique de Moraes Holschuh2008-02-011-759/+734
| | | | | | | | Reorder code in the file to get rid of more of the forward declarations, and to make things cleaner and more organized. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: spring cleanup part 2Henrique de Moraes Holschuh2008-02-011-428/+185
| | | | | | | | Move most subdriver-related stuff imported from the header file closer to their subdriver code. Also, delete unneeded forward declarations. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: spring cleanup part 1Henrique de Moraes Holschuh2008-02-011-1/+631
| | | | | | | | Remove the header file. Private header files used by a single .c file are in bad taste, and I know better now. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: bump up version to 0.18Henrique de Moraes Holschuh2008-02-011-1/+1
| | | | | | | | The NVRAM polling support for hot keys is reason enough to bump up the version string. Do it. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keys (v9)Henrique de Moraes Holschuh2008-02-011-13/+492
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Older ThinkPad models do not export some of the hot keys over the event-based ACPI hot key interface. For these models, one has to poll the CMOS NVRAM to check the key state at a rate faster than the expected rate at which the user might repeatedly press the same hot key. This patch implements this functionality for many of the hotkeys in a transparent way: hot keys will now Just Work, and the driver knows the best approach (events or NVRAM polling) to employ, based on the HKEY.MHKA ACPI method. Also, the driver can turn off the polling when there are no users for the hot keys that need such polling. The NVRAM-based hot keys of the A3x series that have never been implemented by later models are not supported, to avoid changes in the keymap of the input devices that could cause headaches in the future. There is a Kconfig option to avoid compiling the NVRAM polling code, as it is not very small, and unlikely to be useful on any ThinkPad newer than a T40, X31 or R52. This feature is based on a previous effort by Richard Hughes. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Richard Hughes <hughsient@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: prepare for NVRAM polling supportHenrique de Moraes Holschuh2008-02-011-40/+42
| | | | | | | | Make some small internal thinkpad-acpi changes to the hotkey subdriver code that will make it easier to add NVRAM polling support. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: refactor hotkey_get and hotkey_set (v2)Henrique de Moraes Holschuh2008-02-011-75/+109
| | | | | | | | | | | | | | | | | Refactor and organize the code a bit for the NVRAM polling support: 1. Split hotkey_get/set into hotkey_status_get/set and hotkey_mask_get/set; 2. Cache the status of hot key mask for later driver use; 3. Make sure the cache of hot key mask is refreshed when needed; 4. log a printk notice when the firmware doesn't set the hot key mask to exactly what we asked it to; 5. Add proper locking to the data structures. Only (4) should be user-noticeable, but there is a chance (5) fixes some unknown/unreported race conditions. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: document keymap gotcha's (v2)Henrique de Moraes Holschuh2008-02-011-5/+63
| | | | | | | | | | | | | | | | | | Publish the requirements for keymap changes. This is a documentation change, only. Currently, people look at the thinkpad-acpi default keymaps, and think: "modifying this is a trivial thing, it can't break systems, and there are keys defined for foo and bar, but the driver has them as KEY_RESERVED. Must have been an oversight, let me change it." And since they never get to see the bug reports, because they are not really a part of the Linux ThinkPad users community (linux-thinkpad mailinglist, thinkwiki wiki, thinkpad forums) and laptop users are slow to complain to distros about any breakages... Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: fix lenovo keymap for brightnessHenrique de Moraes Holschuh2007-12-131-2/+2
| | | | | | | | | | | | | | | | | | Starting in 2.6.23... Several reports from X60 users complained that the default Lenovo keymap issuing EV_KEY KEY_BRIGHTNESS_UP/DOWN input events caused major issues when the proper brightness support through ACPI video.c was loaded. Therefore, remove the generation of these events by default, which is the right thing for T60, X60, R60, T61, X61 and R61 with their latest BIOSes. Distros that want to misuse these events into OSD reporting (which requires an ugly hack from hell in HAL) are welcome to set up the key map they need through HAL. That way, we don't break everyone else's systems. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: fix oops when a module parameter has no valueHenrique de Moraes Holschuh2007-11-191-1/+7
| | | | | | | | | | | | | | | | set_ibm_param() could OOPS with a NULL pointer derreference if one did not give any values for a module parameter it handles. This would, of course, cause all sort of trouble for future modprobing and require a reboot to clean up properly. Fix it by returning -EINVAL if no values are given for the parameter, and also avoid any nastyness from BUG_ON while at it. How to reproduce: modprobe thinkpad-acpi brightness Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Tested-by: Mike Kershaw <dragorn@kismetwireless.net> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: fix brightness_set error pathsHenrique de Moraes Holschuh2007-11-051-13/+21
| | | | | | | | | | The code calling brightness_set() can't handle EINTR/ERESTARTSYS well, nor is it checking brightness_set() return status properly. Fix it. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: allow for syscall restart in sysfs handlersHenrique de Moraes Holschuh2007-11-051-24/+16
| | | | | | | | | | | | | | | | | | Map an mutex_lock_interruptible() error return into ERESTARTSYS, as the only possible error from mutex_lock_interruptible is EINTR, and that will only happen if signal_pending() causes the mutex lock attempt to abort. This still allows signals to be delivered ASAP, which is much nicer than just doing mutex_lock, and still shadows userspace from EINTR when SA_RESTART is active. Problem reported by Peter Jordan. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Jean Delvare <khali@linux-fr.org> Cc: Peter Jordan <usernetwork@gmx.info> Cc: Richard Neill <rn214@hermes.cam.ac.uk> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: bump up version to 0.17Henrique de Moraes Holschuh2007-11-051-1/+1
| | | | | | | | The lm-sensors 3.0.0/libsensors4 compatibility changes are reason enough to bump up the version string. Do it. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: prefer standard ACPI backlight level controlHenrique de Moraes Holschuh2007-11-051-0/+39
| | | | | | | | | | | | | | | | | | Newer Lenovo BIOSes support the standard ACPI backlight brightness interface (_BCM, _BQC, _BCL). It should be used instead of the native thinkpad backlight brightness control interface when possible. This patch disables the native brightness support in the driver by default when we detect that the standard ACPI interface is available. The local admin can still enable it using the module parameter "brightness_enable". Note that we need to detect the standard ACPI backlight interface only in boxes for which we would load the native backlight interface in the first place, and that no ThinkPad BIOS has _BCL but misses the other methods, so the detection routines can be really simple. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: add brightness_force parameterHenrique de Moraes Holschuh2007-11-051-0/+9
| | | | | | | | | | | | Add a "brightness_enable" module parameter that allows the local admin to force the backlight support to not be enabled. It can also be used to force the backlight support to be enabled, but that is currently a no-op as the backlight support is enabled by default when available. This will be changed by a different patch. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: support 16 levels of brightness (v3)Henrique de Moraes Holschuh2007-11-051-10/+81
| | | | | | | | | | | | | | | | | | | | | | | Lenovo ThinkPads often have 16 brightness levels in EC, and not just eight levels like older ThinkPads. They also have standard ACPI backlight brightness control. We detect the number of brightness levels by the presence of a BCLL package with 16 entries. If BCLL is not there, we assume eight levels (Z6*). If it is there, but it doesn't have 16 entries, we assume eight levels (T60). Otherwise we assume sixteen levels (T61, X61, etc). We don't use _BCL because it can have side-effects in thinkpads. Thanks to Thomas Renninger <trenn@suse.de> for notifying me of this potential problem. Using the standard ACPI backlight brightness control *instead* of the native thinkpad backlight control is a better idea, though. A different patch will take care of this. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
* ACPI: thinkpad-acpi: revert keymap changesHenrique de Moraes Holschuh2007-11-051-8/+8
| | | | | | | | | | | | | | | | | | | | | Revert commit fba956c46a72f9e7503fd464ffee43c632307e31, "Map volume and brightness events on thinkpads". That commit made some modifications to the default keymaps that cause bad behaviour on all IBM ThinkPads if HAL doesn't know to change them into passive (on-screen-display only) events. The proper solution for IBM ThinkPads is to use the _NOTIFY version of the key codes for the IBM default map (which are not available in mainline yet), and for the Lenovo keymap, it will take some studying of the various DSDTs and testing to know the best path (which I will do shortly). For more data, refer to: http://thread.gmane.org/gmane.linux.kernel/591037/focus=591045 Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Jeremy Katz <katzj@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
* Merge branch 'release' of ↵Linus Torvalds2007-10-191-37/+170
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfsHenrique de Moraes Holschuh2007-10-091-0/+2
| | | | | | | | | | | | | | Skip blanks not just at the tail of sysfs writes, but also at the head. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: thinkpad-acpi: duplicate driver attributes to new hwmon pdrvHenrique de Moraes Holschuh2007-09-251-1/+7
| | | | | | | | | | | | | | | | | | Thinkpad-acpi has some driver attributes (debug level, sysfs interface version, etc) that also belong to the new hwmon driver. Duplicate them there. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: thinkpad-acpi: use a separate platform device for hwmon and name it (v2)Henrique de Moraes Holschuh2007-09-251-12/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a separate platform device and driver ("thinkpad_hwmon") to attach hwmon attributes and class, and add a name attribute of "thinkpad" to it, which defines the hwmon device name for libsensors4. This makes thinkpad-acpi compatible with libsensors4 from lm-sensors, and the platform driver and device split will make it much easier to separate hwmon functionality into its own module later on. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: thinkpad-acpi: fix regression on HKEY LID event handlingHenrique de Moraes Holschuh2007-09-231-2/+7
| | | | | | | | | | | | | | | | | | We were letting ThinkPad-specific LID events through to userspace again, instead of dropping them. Fix it. We don't want to give userspace the option of not using generic LID handling. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: thinkpad-acpi: dequeue all pending hot key events at once (v2.2)Henrique de Moraes Holschuh2007-09-231-17/+34
| | | | | | | | | | | | | | | | Receive all pending HKEY events at once from a single notification, and don't complain if the queue is empty. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: thinkpad-acpi: check version of hot key firmwareHenrique de Moraes Holschuh2007-09-231-5/+23
| | | | | | | | | | | | | | | | | | Check the HKEY firmware version (HKEY.MHKV handler), and refuse to load if it is unknown. Use this instead of the presence of HKEY.DHKV to detect hot key mask capability. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: thinkpad-acpi: keep track of module stateHenrique de Moraes Holschuh2007-09-231-1/+19
| | | | | | | | | | | | | | | | | | Keep track of module state (init, running, exit). This makes it trivially easy to avoid running any interrupt handlers, threads, or any other async activity before we are ready, or when we want to go away. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: thinkpad-acpi: add mutex-based locking to input device event send pathHenrique de Moraes Holschuh2007-09-231-0/+10
| | | | | | | | | | | | | | | | | | Protect the input device event sending path with a mutex, since hot key input events are not atomic and require an cohesive event block to be sent together. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
| * ACPI: thinkpad-acpi: issue EV_SYNC after EV_SWITCHHenrique de Moraes Holschuh2007-09-231-1/+3
| | | | | | | | | | | | | | We were missing a input_sync on the radio switch event report path. Add it. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
* | Map volume and brightness events on thinkpadsJeremy Katz2007-10-151-8/+8
| | | | | | | | | | | | | | | | There are standard keycodes for brightness and volume; map the events to emit them so that things work properly Signed-off-by: Jeremy Katz <katzj@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
OpenPOWER on IntegriCloud