Skip to content
Commit b3180028 authored by Lyude's avatar Lyude Committed by Darren Hart
Browse files

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: default avatarLyude <lyude@redhat.com>
Cc: Daniel Martin <consume.noise@gmail.com>
Acked-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
parent e74e2599
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment