]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: thinkpad_acpi: Move tablet detection into separate function
authorLyude <lyude@redhat.com>
Fri, 11 Nov 2016 20:15:02 +0000 (15:15 -0500)
committerDarren Hart <dvhart@linux.intel.com>
Tue, 13 Dec 2016 17:29:05 +0000 (09:29 -0800)
commit5ad4afd21102484db3af578a4d2cd84f3d203f71
treedc7ee209d4b5929e8ed57ce6a73f8f6289bbd495
parenta2d812fb8e86a7bc7d55d52b8f8c075d968fd4ba
platform/x86: thinkpad_acpi: Move tablet detection into separate function

The hotkey events and ACPI handles used for detecting tablet mode on a
few of the newer thinkpad models (Yoga X1 and the Yoga 260 specifically)
have been changed around, so unfortunately this means we're definitely
going to need to probe for multiple types of tablet mode support. Since
the hotkey_init() is already a lot larger than it should be, let's split
up this detection into its own function to make things a little easier
to read.

As well, since we're going to have multiple types of tablet modes, make
hotkey_tablet into an enum so we can also use it to indicate the type of
tablet mode reporting the machine supports.

Suggested by Daniel Martin <consume.noise@gmail.com>
Signed-off-by: Lyude <lyude@redhat.com>
Cc: Daniel Martin <consume.noise@gmail.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/thinkpad_acpi.c