summaryrefslogtreecommitdiffstats
path: root/drivers/hid/wacom.h
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2022-07-16 01:05:19 +0200
committerJiri Kosina <jkosina@suse.cz>2022-07-21 13:49:32 +0200
commit94b179052f95c294d83e9c9c34f7833cf3cd4305 (patch)
treee959d72bf1a008d282674043788656fa822e8208 /drivers/hid/wacom.h
parentHID: nintendo: Add missing array termination (diff)
downloadlinux-94b179052f95c294d83e9c9c34f7833cf3cd4305.tar.xz
linux-94b179052f95c294d83e9c9c34f7833cf3cd4305.zip
HID: wacom: Force pen out of prox if no events have been received in a while
Prox-out events may not be reliably sent by some AES firmware. This can cause problems for users, particularly due to arbitration logic disabling touch input while the pen is in prox. This commit adds a timer which is reset every time a new prox event is received. When the timer expires we check to see if the pen is still in prox and force it out if necessary. This is patterend off of the same solution used by 'hid-letsketch' driver which has a similar problem. Link: https://github.com/linuxwacom/input-wacom/issues/310 Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom.h')
-rw-r--r--drivers/hid/wacom.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h
index 203d27d198b8..3f8b24a57014 100644
--- a/drivers/hid/wacom.h
+++ b/drivers/hid/wacom.h
@@ -91,6 +91,7 @@
#include <linux/leds.h>
#include <linux/usb/input.h>
#include <linux/power_supply.h>
+#include <linux/timer.h>
#include <asm/unaligned.h>
/*
@@ -167,6 +168,7 @@ struct wacom {
struct delayed_work init_work;
struct wacom_remote *remote;
struct work_struct mode_change_work;
+ struct timer_list idleprox_timer;
bool generic_has_leds;
struct wacom_leds {
struct wacom_group_leds *groups;
@@ -239,4 +241,5 @@ struct wacom_led *wacom_led_find(struct wacom *wacom, unsigned int group,
struct wacom_led *wacom_led_next(struct wacom *wacom, struct wacom_led *cur);
int wacom_equivalent_usage(int usage);
int wacom_initialize_leds(struct wacom *wacom);
+void wacom_idleprox_timeout(struct timer_list *list);
#endif