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:
Andy Shevchenko 2020-10-02 17:29:59 +03:00
Родитель 938835aa90
Коммит 21d64817c7
1 изменённых файлов: 4 добавлений и 8 удалений

Просмотреть файл

@ -15,13 +15,9 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/suspend.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 */ /* When NOT in tablet mode, VGBS returns with the flag 0x40 */
#define VGBS_TABLET_MODE_FLAG 0x40 #define TABLET_MODE_FLAG 0x40
#define VGBS_DOCK_MODE_FLAG 0x80 #define DOCK_MODE_FLAG 0x80
#define VGBS_TABLET_MODE_FLAGS (VGBS_TABLET_MODE_FLAG | VGBS_TABLET_MODE_FLAG_ALT)
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("AceLan Kao"); MODULE_AUTHOR("AceLan Kao");
@ -76,9 +72,9 @@ static void detect_tablet_mode(struct platform_device *device)
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
return; return;
m = !(vgbs & VGBS_TABLET_MODE_FLAGS); m = !(vgbs & TABLET_MODE_FLAG);
input_report_switch(priv->input_dev, SW_TABLET_MODE, m); 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); input_report_switch(priv->input_dev, SW_DOCK, m);
} }