1. 02 Feb, 2008 4 commits
    • Henrique de Moraes Holschuh's avatar
      ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keys (v9) · 01e88f25
      Henrique de Moraes Holschuh authored
      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: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Cc: Richard Hughes <hughsient@gmail.com>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      01e88f25
    • Henrique de Moraes Holschuh's avatar
      ACPI: thinkpad-acpi: prepare for NVRAM polling support · b7c8c200
      Henrique de Moraes Holschuh authored
      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: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      b7c8c200
    • Henrique de Moraes Holschuh's avatar
      ACPI: thinkpad-acpi: refactor hotkey_get and hotkey_set (v2) · b2c985e7
      Henrique de Moraes Holschuh authored
      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: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      b2c985e7
    • Henrique de Moraes Holschuh's avatar
      ACPI: thinkpad-acpi: document keymap gotcha's (v2) · 0f089147
      Henrique de Moraes Holschuh authored
      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: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
      Signed-off-by: default avatarLen Brown <len.brown@intel.com>
      0f089147
  2. 01 Feb, 2008 36 commits