]> git.itanic.dy.fi Git - linux-stable/commit
HID: wacom: insert timestamp to packed Bluetooth (BT) events
authorPing Cheng <pinglinux@gmail.com>
Fri, 24 Feb 2023 16:26:43 +0000 (08:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:50:26 +0000 (11:50 +0200)
commit5047a228d4c8e2b5d1b856f21a00ecf717945a9c
treeedd8a07994dce10aaa40a77ff3b4969e3b001fd7
parentdb587340a0045ec2d2023521042fb58d51941e8d
HID: wacom: insert timestamp to packed Bluetooth (BT) events

commit 17d793f3ed53080dab6bbeabfc82de890c901001 upstream.

To fully utilize the BT polling/refresh rate, a few input events
are sent together to reduce event delay. This causes issue to the
timestamp generated by input_sync since all the events in the same
packet would pretty much have the same timestamp. This patch inserts
time interval to the events by averaging the total time used for
sending the packet.

This decision was mainly based on observing the actual time interval
between each BT polling. The interval doesn't seem to be constant,
due to the network and system environment. So, using solutions other
than averaging doesn't end up with valid timestamps.

Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h