OSDN Git Service

platform/x86: thinkpad_acpi: Handle keyboard cover attach/detach events
authorAlexander Kobel <a-kobel@a-kobel.de>
Sat, 13 Feb 2021 15:13:36 +0000 (16:13 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 8 Mar 2021 10:33:38 +0000 (11:33 +0100)
commit0a053f01fe6d7f92d36b5db1bcdbfc4f71e2bce0
treee431d92f7a62a2d0bda658c82d1c3def4c24ab40
parent03ee318391707e822eb915f4f30fe42c78b9d89b
platform/x86: thinkpad_acpi: Handle keyboard cover attach/detach events

Those events occur when a keyboard cover is attached to a ThinkPad
X1 Tablet series device.  Typically, they are used to switch from normal
to tablet mode in userspace; e.g., to offer touch keyboard choices when
focus goes to a text box and no keyboard is attached, or to enable
autorotation of the display according to the builtin orientation sensor.

intel-vtbn already recognizes those events.  To avoid sending duplicate
events to userspace, they are simply ignored.  Thus, this patch only
avoids warnings about unknown and unhandled HKEYs 0x4012 and 0x4013.

For more information about the background and potential improvements for
different types of attachment options, such as the Pico cartridge dock
module, see
https://lore.kernel.org/platform-driver-x86/38cb8265-1e30-d547-9e12-b4ae290be737@a-kobel.de/

Signed-off-by: Alexander Kobel <a-kobel@a-kobel.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/83a0e45f-590d-0c7d-0afd-00a5a6322bd0@a-kobel.de
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/thinkpad_acpi.c