mirror of https://gitee.com/openkylin/linux.git
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 d823346876
.
Link: https://lore.kernel.org/platform-driver-x86/s5hft71klxl.wl-tiwai@suse.de/
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
parent
938835aa90
commit
21d64817c7
|
@ -15,13 +15,9 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/suspend.h>
|
||||
|
||||
/* Returned when NOT in tablet mode on some HP Stream x360 11 models */
|
||||
#define VGBS_TABLET_MODE_FLAG_ALT 0x10
|
||||
/* When NOT in tablet mode, VGBS returns with the flag 0x40 */
|
||||
#define VGBS_TABLET_MODE_FLAG 0x40
|
||||
#define VGBS_DOCK_MODE_FLAG 0x80
|
||||
|
||||
#define VGBS_TABLET_MODE_FLAGS (VGBS_TABLET_MODE_FLAG | VGBS_TABLET_MODE_FLAG_ALT)
|
||||
#define TABLET_MODE_FLAG 0x40
|
||||
#define DOCK_MODE_FLAG 0x80
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("AceLan Kao");
|
||||
|
@ -76,9 +72,9 @@ static void detect_tablet_mode(struct platform_device *device)
|
|||
if (ACPI_FAILURE(status))
|
||||
return;
|
||||
|
||||
m = !(vgbs & VGBS_TABLET_MODE_FLAGS);
|
||||
m = !(vgbs & TABLET_MODE_FLAG);
|
||||
input_report_switch(priv->input_dev, SW_TABLET_MODE, m);
|
||||
m = (vgbs & VGBS_DOCK_MODE_FLAG) ? 1 : 0;
|
||||
m = (vgbs & DOCK_MODE_FLAG) ? 1 : 0;
|
||||
input_report_switch(priv->input_dev, SW_DOCK, m);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue