diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2015-01-05 22:32:12 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-01-06 10:08:44 +0100 |
commit | d97a552210320d3bec8ee22b8ccdb1d6d189482a (patch) | |
tree | 8ceb48b81a56875c769dd276194f6c3c6c4fee1e /drivers/hid/wacom_wac.h | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jik... (diff) | |
download | linux-d97a552210320d3bec8ee22b8ccdb1d6d189482a.tar.xz linux-d97a552210320d3bec8ee22b8ccdb1d6d189482a.zip |
HID: wacom: use WACOM_*_FIELD macros in wacom_usage_mapping()
We introduced nice macros in wacom_wac.c to check whether a field is
a pen or a touch one.
wacom_usage_mapping() still uses it's own tests, which are not in sync with
the wacom_wac tests (.application is not checked).
That means that some legitimate fields might be filtered out from the
usage mapping, and thus will not be used properly while receiving the
events.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_wac.h')
-rw-r--r-- | drivers/hid/wacom_wac.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h index bfad815cda8a..7436f2be433d 100644 --- a/drivers/hid/wacom_wac.h +++ b/drivers/hid/wacom_wac.h @@ -10,6 +10,7 @@ #define WACOM_WAC_H #include <linux/types.h> +#include <linux/hid.h> /* maximum packet length for USB devices */ #define WACOM_PKGLEN_MAX 68 @@ -71,6 +72,13 @@ #define WACOM_QUIRK_MONITOR 0x0008 #define WACOM_QUIRK_BATTERY 0x0010 +#define WACOM_PEN_FIELD(f) (((f)->logical == HID_DG_STYLUS) || \ + ((f)->physical == HID_DG_STYLUS) || \ + ((f)->application == HID_DG_PEN)) +#define WACOM_FINGER_FIELD(f) (((f)->logical == HID_DG_FINGER) || \ + ((f)->physical == HID_DG_FINGER) || \ + ((f)->application == HID_DG_TOUCHSCREEN)) + enum { PENPARTNER = 0, GRAPHIRE, |