[ibm-acpi-devel] [PATCH 1/3] thinkpad_acpi: Move tablet detection into separate function

2016-10-31 Thread Lyude
Suggested by Daniel Martin Lenovo's having a bit of fun randomly changing what hotkey events and acpi handles they use for reporting tablet mode, 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

[ibm-acpi-devel] [PATCH 0/3] Add support for X1 Yoga (2016) Tablet Mode + refactors

2016-10-31 Thread Lyude
Updated patchset for adding support for detecting tablet mode on the X1 Yoga 2016 model, along with some refactoring suggested by Daniel. Important: I realized I never actually tried testing this on any of the older Thinkpad tablets. If someone has one who is willing to test let me know, otherwise

[ibm-acpi-devel] [PATCH 3/3 v3] thinkpad_acpi: Add support for X1 Yoga (2016) Tablet Mode

2016-10-31 Thread Lyude
For whatever reason, the X1 Yoga doesn't support the normal method of querying for tablet mode. Instead of providing the MHKG method under the hotkey handle, we're instead given the CMMD method under the EC handle. Values on this handle are either 0x1, laptop mode, or 0x6, tablet mode. Changes sin

[ibm-acpi-devel] [PATCH 2/3] thinkpad_acpi: Don't repeat ourselves in hotkey_init_tablet_mode()

2016-10-31 Thread Lyude
There's no need to have multiple copies of the logic we use for checking whether or not we're in tablet mode, so just use hotkey_get_tablet_mode() when checking the initial state in hotkey_init_tablet_mode(). Cc: Daniel Martin Signed-off-by: Lyude --- drivers/platform/x86/thinkpad_acpi.c | 5 ++

[ibm-acpi-devel] [PATCH v2 1/3] thinkpad_acpi: Move tablet detection into separate function

2016-10-31 Thread Lyude
Suggested by Daniel Martin Lenovo's having a bit of fun randomly changing what hotkey events and acpi handles they use for reporting tablet mode, 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