]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: thinkpad_acpi: Implement tablet mode using GMMS method
authorBenjamin Berg <bberg@redhat.com>
Fri, 15 Sep 2017 13:20:49 +0000 (15:20 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sun, 1 Oct 2017 14:33:13 +0000 (17:33 +0300)
commit0a48dab9b0aa02aff38ef960edbfe09ed2ee343a
tree408b55248f110694ba4e62e0c4796c0f180df539
parentafaf8c254cf1ba1df9ec0e8e6ca2b44625ecb52f
platform/x86: thinkpad_acpi: Implement tablet mode using GMMS method

Many thinkpad laptops and convertibles provide the GMMS method to
resolve how far the laptop has been opened and whether it has been
converted into tablet mode. This allows reporting a more precise tablet
mode state to userspace.

The current implementation only reports a summarized tablet mode state
which is triggered as soon as the input devices become unusable as they
are folded away from the display.

This will work on all models where the CMMD method was used previously and
it may also work in other cases.

Thanks to Peter Zhang of Lenovo for providing information on how to use the
GMMS method to query the tablet mode.

Signed-off-by: Benjamin Berg <bberg@redhat.com>
Cc: Peter FP1 Zhang <zhangfp1@lenovo.com>
Cc: Lyude Paul <lyude@redhat.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/thinkpad_acpi.c