• Lyude's avatar
    platform/x86: thinkpad_acpi: Move tablet detection into separate function · b3180028
    Lyude authored
    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>
    b3180028
thinkpad_acpi.c 247 KB