Commit 8de82280 authored by Jason Gerecke's avatar Jason Gerecke Committed by Jiri Kosina

HID: wacom: Update vendor-defined usage names to better match standards

Our loose use of "pen" and "digitizer" in the naming of several of our
vendor-defined usages may be a source of confusion given that the terms
have specific meaning within the HID specification. "Pen" specifically
refers to "an integrated display that allows the use of a stylus" (e.g.
something like a tablet PC or Cintiq) wheras "Digitizer" is a better
fit for opaque tablets like an Intuos.

While we're at it, go ahead and rename the definitions to make them more
distinct and better match up with the convention used by HID (e.g. the use
of '_UP_' for usage pages) and make them more distinct.
Signed-off-by: default avatarJason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 8a1e377e
...@@ -159,18 +159,18 @@ static void wacom_feature_mapping(struct hid_device *hdev, ...@@ -159,18 +159,18 @@ static void wacom_feature_mapping(struct hid_device *hdev,
case HID_UP_DIGITIZER: case HID_UP_DIGITIZER:
if (field->report->id == 0x0B && if (field->report->id == 0x0B &&
(field->application == WACOM_G9_DIGITIZER || (field->application == WACOM_HID_G9_PEN ||
field->application == WACOM_G11_DIGITIZER)) { field->application == WACOM_HID_G11_PEN)) {
wacom->wacom_wac.mode_report = field->report->id; wacom->wacom_wac.mode_report = field->report->id;
wacom->wacom_wac.mode_value = 0; wacom->wacom_wac.mode_value = 0;
} }
break; break;
case WACOM_G9_PAGE: case WACOM_HID_UP_G9:
case WACOM_G11_PAGE: case WACOM_HID_UP_G11:
if (field->report->id == 0x03 && if (field->report->id == 0x03 &&
(field->application == WACOM_G9_TOUCHSCREEN || (field->application == WACOM_HID_G9_TOUCHSCREEN ||
field->application == WACOM_G11_TOUCHSCREEN)) { field->application == WACOM_HID_G11_TOUCHSCREEN)) {
wacom->wacom_wac.mode_report = field->report->id; wacom->wacom_wac.mode_report = field->report->id;
wacom->wacom_wac.mode_value = 0; wacom->wacom_wac.mode_value = 0;
} }
......
...@@ -2448,7 +2448,7 @@ void wacom_setup_device_quirks(struct wacom *wacom) ...@@ -2448,7 +2448,7 @@ void wacom_setup_device_quirks(struct wacom *wacom)
/* /*
* Raw Wacom-mode pen and touch events both come from interface * Raw Wacom-mode pen and touch events both come from interface
* 0, whose HID descriptor has an application usage of 0xFF0D * 0, whose HID descriptor has an application usage of 0xFF0D
* (i.e., WACOM_VENDORDEFINED_PEN). We route pen packets back * (i.e., WACOM_HID_WD_DIGITIZER). We route pen packets back
* out through the HID_GENERIC device created for interface 1, * out through the HID_GENERIC device created for interface 1,
* so rewrite this one to be of type WACOM_DEVICETYPE_TOUCH. * so rewrite this one to be of type WACOM_DEVICETYPE_TOUCH.
*/ */
......
...@@ -84,20 +84,21 @@ ...@@ -84,20 +84,21 @@
#define WACOM_DEVICETYPE_WL_MONITOR 0x0008 #define WACOM_DEVICETYPE_WL_MONITOR 0x0008
#define WACOM_DEVICETYPE_DIRECT 0x0010 #define WACOM_DEVICETYPE_DIRECT 0x0010
#define WACOM_VENDORDEFINED_PEN 0xff0d0001 #define WACOM_HID_UP_WACOMDIGITIZER 0xff0d0000
#define WACOM_G9_PAGE 0xff090000 #define WACOM_HID_WD_DIGITIZER (WACOM_HID_UP_WACOMDIGITIZER | 0x01)
#define WACOM_G9_DIGITIZER (WACOM_G9_PAGE | 0x02) #define WACOM_HID_UP_G9 0xff090000
#define WACOM_G9_TOUCHSCREEN (WACOM_G9_PAGE | 0x11) #define WACOM_HID_G9_PEN (WACOM_HID_UP_G9 | 0x02)
#define WACOM_G11_PAGE 0xff110000 #define WACOM_HID_G9_TOUCHSCREEN (WACOM_HID_UP_G9 | 0x11)
#define WACOM_G11_DIGITIZER (WACOM_G11_PAGE | 0x02) #define WACOM_HID_UP_G11 0xff110000
#define WACOM_G11_TOUCHSCREEN (WACOM_G11_PAGE | 0x11) #define WACOM_HID_G11_PEN (WACOM_HID_UP_G11 | 0x02)
#define WACOM_HID_G11_TOUCHSCREEN (WACOM_HID_UP_G11 | 0x11)
#define WACOM_PEN_FIELD(f) (((f)->logical == HID_DG_STYLUS) || \ #define WACOM_PEN_FIELD(f) (((f)->logical == HID_DG_STYLUS) || \
((f)->physical == HID_DG_STYLUS) || \ ((f)->physical == HID_DG_STYLUS) || \
((f)->physical == HID_DG_PEN) || \ ((f)->physical == HID_DG_PEN) || \
((f)->application == HID_DG_PEN) || \ ((f)->application == HID_DG_PEN) || \
((f)->application == HID_DG_DIGITIZER) || \ ((f)->application == HID_DG_DIGITIZER) || \
((f)->application == WACOM_VENDORDEFINED_PEN)) ((f)->application == WACOM_HID_WD_DIGITIZER))
#define WACOM_FINGER_FIELD(f) (((f)->logical == HID_DG_FINGER) || \ #define WACOM_FINGER_FIELD(f) (((f)->logical == HID_DG_FINGER) || \
((f)->physical == HID_DG_FINGER) || \ ((f)->physical == HID_DG_FINGER) || \
((f)->application == HID_DG_TOUCHSCREEN)) ((f)->application == HID_DG_TOUCHSCREEN))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment