summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2017-11-14 17:14:14 +0100
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-12-21 14:56:27 +0200
commit26befef00eb2ae37939a189a5d03c4c7b600e6f9 (patch)
treec1f2774ed201598430e539f3a76c626ae3fb1819 /drivers/platform
parent064cbc4f6a1e910771e6c29cb819b6ee9eb881fc (diff)
platform/x86: thinkpad_acpi: Accept flat mode for type 4 multi mode status
On the X1 Yoga 2nd Generation and most likely other notebooks the FLAT mode is reported. Decode it correctly rather than warning about an unexpected multi mode status to be reported. Signed-off-by: Benjamin Berg <bberg@redhat.com> Cc: Peter FP1 Zhang <zhangfp1@lenovo.com Cc: Lyude <lyude@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 117be48ff4de..7dcbd97710a9 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2113,12 +2113,10 @@ static int hotkey_gmms_get_tablet_mode(int s, int *has_tablet_mode)
TP_ACPI_MULTI_MODE_FLAT;
break;
case 4:
- valid_modes = TP_ACPI_MULTI_MODE_LAPTOP |
- TP_ACPI_MULTI_MODE_TABLET |
- TP_ACPI_MULTI_MODE_STAND |
- TP_ACPI_MULTI_MODE_TENT;
- break;
case 5:
+ /* In mode 4, FLAT is not specified as a valid mode. However,
+ * it can be seen at least on the X1 Yoga 2nd Generation.
+ */
valid_modes = TP_ACPI_MULTI_MODE_LAPTOP |
TP_ACPI_MULTI_MODE_FLAT |
TP_ACPI_MULTI_MODE_TABLET |