linux_dsm_epyc7002/drivers/platform
Hans de Goede dd950f16b1 platform/x86: intel-vbtn: Detect switch position before registering the input-device
Setting the initial state of input-device switches must be done before
registering the input-device.

Otherwise the initial state will get send out as an event as soon
as input_sync() gets called.

E.g. when undocking a tablet using intel-vbtn to report SW_TABLET_MODE
and SW_DOCK before this commit we would get (evemu-record output):

E: 0.000001 0005 0005 0001	# EV_SW / SW_DOCK              1
E: 0.000001 0000 0000 0000	# ------------ SYN_REPORT (0) ---------- +0ms
E: 0.000109 0005 0005 0000	# EV_SW / SW_DOCK              0
E: 0.000109 0000 0000 0000	# ------------ SYN_REPORT (0) ---------- +0ms
E: 0.000133 0005 0001 0001	# EV_SW / SW_TABLET_MODE       1
E: 0.000133 0000 0000 0000	# ------------ SYN_REPORT (0) ---------- +0ms

The first SW_DOCK=1 report is spurious, setting the initial switch
state before registering the input-device fixes this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2020-05-12 17:27:12 +03:00
..
chrome platform/chrome: cros_ec_sensorhub: Add missing '\n' in log messages 2020-04-13 16:31:33 +02:00
goldfish mm, tree-wide: rename put_user_page*() to unpin_user_page*() 2020-01-31 10:30:38 -08:00
mellanox platform/mellanox: mlxreg-hotplug: Add support for new capability register 2020-01-13 21:02:46 +02:00
mips MIPS: Kconfig: Use correct form for 'depends on' 2019-12-02 10:51:01 -08:00
olpc Platform: OLPC: add SPI MODULE_DEVICE_TABLE 2019-07-25 20:21:00 +03:00
x86 platform/x86: intel-vbtn: Detect switch position before registering the input-device 2020-05-12 17:27:12 +03:00
Kconfig
Makefile