1. 11 Dec, 2018 6 commits
  2. 10 Dec, 2018 3 commits
  3. 07 Dec, 2018 1 commit
  4. 03 Dec, 2018 21 commits
  5. 29 Nov, 2018 1 commit
  6. 27 Nov, 2018 1 commit
  7. 10 Nov, 2018 3 commits
  8. 07 Nov, 2018 4 commits
    • João Paulo Rechi Vita's avatar
      platform/x86: asus-nb-wmi: Drop mapping of 0x33 and 0x34 scan codes · 71b12bea
      João Paulo Rechi Vita authored
      According to Asus firmware engineers, the meaning of these codes is only
      to notify the OS that the screen brightness has been turned on/off by
      the EC. This does not match the meaning of KEY_DISPLAYTOGGLE /
      KEY_DISPLAY_OFF, where userspace is expected to change the display
      brightness.
      Signed-off-by: default avatarJoão Paulo Rechi Vita <jprvita@endlessm.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      71b12bea
    • João Paulo Rechi Vita's avatar
      platform/x86: asus-nb-wmi: Map 0x35 to KEY_SCREENLOCK · b3f2f379
      João Paulo Rechi Vita authored
      When the OS registers to handle events from the display off hotkey the
      EC will send a notification with 0x35 for every key press, independent
      of the backlight state.
      
      The behavior of this key on Windows, with the ATKACPI driver from Asus
      installed, is turning off the backlight of all connected displays with a
      fading effect, and any cursor input or key press turning the backlight
      back on. The key press or cursor input that wakes up the display is also
      passed through to the application under the cursor or under focus.
      
      The key that matches this behavior the closest is KEY_SCREENLOCK.
      Signed-off-by: default avatarJoão Paulo Rechi Vita <jprvita@endlessm.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      b3f2f379
    • João Paulo Rechi Vita's avatar
      platform/x86: asus-wmi: Tell the EC the OS will handle the display off hotkey · 78f3ac76
      João Paulo Rechi Vita authored
      In the past, Asus firmwares would change the panel backlight directly
      through the EC when the display off hotkey (Fn+F7) was pressed, and
      only notify the OS of such change, with 0x33 when the LCD was ON and
      0x34 when the LCD was OFF. These are currently mapped to
      KEY_DISPLAYTOGGLE and KEY_DISPLAY_OFF, respectively.
      
      Most recently the EC on Asus most machines lost ability to toggle the
      LCD backlight directly, but unless the OS informs the firmware it is
      going to handle the display toggle hotkey events, the firmware still
      tries change the brightness through the EC, to no effect. The end result
      is a long list (at Endless we counted 11) of Asus laptop models where
      the display toggle hotkey does not perform any action. Our firmware
      engineers contacts at Asus were surprised that there were still machines
      out there with the old behavior.
      
      Calling WMNB(ASUS_WMI_DEVID_BACKLIGHT==0x00050011, 2) on the _WDG device
      tells the firmware that it should let the OS handle the display toggle
      event, in which case it will simply notify the OS of a key press with
      0x35, as shown by the DSDT excerpts bellow.
      
       Scope (_SB)
       {
           (...)
      
           Device (ATKD)
           {
               (...)
      
               Name (_WDG, Buffer (0x28)
               {
                   /* 0000 */  0xD0, 0x5E, 0x84, 0x97, 0x6D, 0x4E, 0xDE, 0x11,
                   /* 0008 */  0x8A, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66,
                   /* 0010 */  0x4E, 0x42, 0x01, 0x02, 0x35, 0xBB, 0x3C, 0x0B,
                   /* 0018 */  0xC2, 0xE3, 0xED, 0x45, 0x91, 0xC2, 0x4C, 0x5A,
                   /* 0020 */  0x6D, 0x19, 0x5D, 0x1C, 0xFF, 0x00, 0x01, 0x08
               })
               Method (WMNB, 3, Serialized)
               {
                   CreateDWordField (Arg2, Zero, IIA0)
                   CreateDWordField (Arg2, 0x04, IIA1)
                   Local0 = (Arg1 & 0xFFFFFFFF)
      
                   (...)
      
                   If ((Local0 == 0x53564544))
                   {
                       (...)
      
                       If ((IIA0 == 0x00050011))
                       {
                           If ((IIA1 == 0x02))
                           {
                               ^^PCI0.SBRG.EC0.SPIN (0x72, One)
                               ^^PCI0.SBRG.EC0.BLCT = One
                           }
      
                           Return (One)
                       }
                   }
                   (...)
               }
               (...)
           }
           (...)
       }
       (...)
      
       Scope (_SB.PCI0.SBRG.EC0)
       {
           (...)
      
           Name (BLCT, Zero)
      
           (...)
      
           Method (_Q10, 0, NotSerialized)  // _Qxx: EC Query
           {
               If ((BLCT == Zero))
               {
                   Local0 = One
                   Local0 = RPIN (0x72)
                   Local0 ^= One
                   SPIN (0x72, Local0)
                   If (ATKP)
                   {
                       Local0 = (0x34 - Local0)
                       ^^^^ATKD.IANE (Local0)
                   }
               }
               ElseIf ((BLCT == One))
               {
                   If (ATKP)
                   {
                       ^^^^ATKD.IANE (0x35)
                   }
               }
           }
           (...)
       }
      Signed-off-by: default avatarJoão Paulo Rechi Vita <jprvita@endlessm.com>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      78f3ac76
    • Zhang Xianwei's avatar
      platform/x86: thinkpad_acpi: Change the keymap for Favorites hotkey · 8055db3a
      Zhang Xianwei authored
      The keycode KEY_FAVORITES(0x16c) used in thinkpad_acpi driver is too
      big (out of range > 255) for xorg to handle.
      xkeyboard-config has already mapped KEY_BOOKMARKS(156) to
      XF86Favorites:
      
      keycodes/evdev:
          <I164> = 164;   // #define KEY_BOOKMARKS           156
      
      symbols/inet:
          key <I164>   {      [ XF86Favorites         ]       };
      
      So change the keymap to KEY_BOOKMARKS for Favorites hotkey.
      Signed-off-by: default avatarZhang Xianwei <zhang.xianwei8@zte.com.cn>
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      8055db3a