Skip to content

Commit 21d6481

Browse files
committed
platform/x86: intel-vbtn: Revert "Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360"
After discussion, see the Link tag, it appears that this is not good enough. So, revert it now and apply a better fix. This reverts commit d823346. Link: https://lore.kernel.org/platform-driver-x86/[email protected]/ Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 938835a commit 21d6481

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

drivers/platform/x86/intel-vbtn.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,9 @@
1515
#include <linux/platform_device.h>
1616
#include <linux/suspend.h>
1717

18-
/* Returned when NOT in tablet mode on some HP Stream x360 11 models */
19-
#define VGBS_TABLET_MODE_FLAG_ALT 0x10
2018
/* When NOT in tablet mode, VGBS returns with the flag 0x40 */
21-
#define VGBS_TABLET_MODE_FLAG 0x40
22-
#define VGBS_DOCK_MODE_FLAG 0x80
23-
24-
#define VGBS_TABLET_MODE_FLAGS (VGBS_TABLET_MODE_FLAG | VGBS_TABLET_MODE_FLAG_ALT)
19+
#define TABLET_MODE_FLAG 0x40
20+
#define DOCK_MODE_FLAG 0x80
2521

2622
MODULE_LICENSE("GPL");
2723
MODULE_AUTHOR("AceLan Kao");
@@ -76,9 +72,9 @@ static void detect_tablet_mode(struct platform_device *device)
7672
if (ACPI_FAILURE(status))
7773
return;
7874

79-
m = !(vgbs & VGBS_TABLET_MODE_FLAGS);
75+
m = !(vgbs & TABLET_MODE_FLAG);
8076
input_report_switch(priv->input_dev, SW_TABLET_MODE, m);
81-
m = (vgbs & VGBS_DOCK_MODE_FLAG) ? 1 : 0;
77+
m = (vgbs & DOCK_MODE_FLAG) ? 1 : 0;
8278
input_report_switch(priv->input_dev, SW_DOCK, m);
8379
}
8480

0 commit comments

Comments
 (0)