Add support for Cintiq 27QHD and 27QHD touch
Subsystems (3)
PATCH 3/3 Add support for Cintiq 27QHD and 27QHD touch
These devices have accelerometers. To report accelerometer coordinates, a new property, INPUT_PROP_ACCELEROMETER, is added.
--- drivers/hid/wacom_sys.c | 3 ++ drivers/hid/wacom_wac.c | 87 ++++++++++++++++++++++++++++++++++++++-------- drivers/hid/wacom_wac.h | 7 +++- include/uapi/linux/input.h | 1 + 4 files changed, 83 insertions(+), 15 deletions(-)
drivers/hid/wacom_sys.c +3 -0
@@ -403,6 +403,9 @@ static int wacom_query_tablet_data(struct hid_device *hdev,else if (features->type ==WACOM_24HDT || features->type ==CINTIQ_HYBRID ) {return wacom_set_device_mode (hdev,18 ,3 ,2 ); } +else if (features->type ==WACOM_27QHDT ) { +return wacom_set_device_mode (hdev,131 ,3 ,2 ); + } }else if (features->device_type ==BTN_TOOL_PEN ) {if (features->type <=BAMBOO_PT && features->type !=WIRELESS ) {return wacom_set_device_mode (hdev,2 ,2 ,2 );
drivers/hid/wacom_wac.c +73 -14
171 lines not on this page · raw message
drivers/hid/wacom_wac.h +6 -1
@@ -13,7 +13,7 @@#include <linux/hid.h> /* maximum packet length for USB devices */ -#define WACOM_PKGLEN_MAX 68 +#define WACOM_PKGLEN_MAX 192#define WACOM_NAME_MAX 64
@@ -37,6 +37,7 @@/* wacom data size per MT contact */ #define WACOM_BYTES_PER_MT_PACKET 11#define WACOM_BYTES_PER_24HDT_PACKET 14 +#define WACOM_BYTES_PER_QHDTHID_PACKET 6/* device IDs */ #define STYLUS_DEVICE_ID 0x02
@@ -58,6 +59,8 @@#define WACOM_REPORT_TPCMT 13#define WACOM_REPORT_TPCMT2 3#define WACOM_REPORT_TPCHID 15 +#define WACOM_REPORT_CINTIQ 16 +#define WACOM_REPORT_CINTIQPAD 17#define WACOM_REPORT_TPCST 16#define WACOM_REPORT_DTUS 17#define WACOM_REPORT_TPC1FGE 18
@@ -109,6 +112,7 @@ enum {WACOM_22HD ,DTK ,WACOM_24HD , +WACOM_27QHD ,CINTIQ_HYBRID ,CINTIQ , WACOM_BEE,
@@ -117,6 +121,7 @@ enum {WIRELESS ,BAMBOO_PT ,WACOM_24HDT , +WACOM_27QHDT ,TABLETPC ,/* add new TPC below */ TABLETPCE , TABLETPC2FG,
include/uapi/linux/input.h +1 -0
@@ -166,6 +166,7 @@ struct input_keymap_entry {#define INPUT_PROP_SEMI_MT 0x03/* touch rectangle only */ #define INPUT_PROP_TOPBUTTONPAD 0x04/* softbuttons at top of pad */ #define INPUT_PROP_POINTING_STICK 0x05/* is a pointing stick */ +#define INPUT_PROP_ACCELEROMETER 0x06/* has accelerometer */ #define INPUT_PROP_MAX 0x1f#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)
Signature · 1 line
1.9.1
Quoted 5 lines · Ping Cheng
These devices have accelerometers. To report accelerometer coordinates, a new property,
INPUT_PROP_ACCELEROMETER, is added.Signed-off-by Ping Cheng <[email protected]>---
[...]
Quoted 14 lines
include/uapi/linux/input.h +1
-0@@ -166,6 +166,7 @@ struct input_keymap_entry {#define INPUT_PROP_SEMI_MT 0x03/* touch rectangle only */ #define INPUT_PROP_TOPBUTTONPAD 0x04/* softbuttons at top of pad */ #define INPUT_PROP_POINTING_STICK 0x05/* is a pointing stick */ +#define INPUT_PROP_ACCELEROMETER 0x06/* has accelerometer */ #define INPUT_PROP_MAX 0x1f#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1)Signature · 1 line
1.9.1
I just ran into this and have a few questions:
what is the intended meaning of INPUT_PROP_ACCELEROMETER? For all the other props it's obvious what they mean but here there it is a bit more ambiguous.
Specifically, if a device is tagged as accelerometer, which axes have accelerometer data? just ABS_X/Y/Z and/or REL_X/Y/Z? or do we have a requirement that _all_ axes on that device must reflect accelerometer data (because realistically ABS_RX could be an accelerometer while x and y is a normal axis). Or is it up for grabs and you need other information to know which axes exported are accelerometers?
I know what it does on the 27QHD, but this is a generic tag so we need to define this for all devices.
Cheers,
Peter
Quoted 28 lines · Peter Hutterer
Quoted 5 lines · Ping Cheng
These devices have accelerometers. To report accelerometer coordinates, a new property,
INPUT_PROP_ACCELEROMETER, is added.Signed-off-by Ping Cheng <[email protected]>---
[...]
Quoted 13 lines
include/uapi/linux/input.h +1
-1@@ -166,6 +166,7 @@ struct input_keymap_entry {#define INPUT_PROP_SEMI_MT 0x03/* touch rectangle only */ #define INPUT_PROP_TOPBUTTONPAD 0x04/* softbuttons at top of pad */ #define INPUT_PROP_POINTING_STICK 0x05/* is a pointing stick */ +#define INPUT_PROP_ACCELEROMETER 0x06/* has accelerometer */ #define INPUT_PROP_MAX 0x1f#define INPUT_PROP_CNT (INPUT_PROP_MAX + 1) --Quoted 1 line
1.9.1
I just ran into this and have a few questions:
what is the intended meaning ofINPUT_PROP_ACCELEROMETER? For all the other props it's obvious what they mean but here there it is a bit more ambiguous.
Quoted 6 lines
Specifically, if a device is tagged as accelerometer, which axes have accelerometer data? just ABS_X/Y/Z and/or REL_X/Y/Z? or do we have a requirement that _all_ axes on that device must reflect accelerometer data (because realistically
ABS_RXcould be an accelerometer while x and y is a normal axis). Or is it up for grabs and you need other information to know which axes exported are accelerometers?
Good point!
Quoted 2 lines
I know what it does on the 27QHD, but this is a generic tag so we need to define this for all devices.
Since you know Cintiq 27QHD, I don't need to repeat Wacom specific here.
To answer your question, we'll need to see how other developers, especially user-land developers, would like to use the tag. How about you post a RFC patch for Documentation/input/event-codes.txt so we know how you'd like it to be defined?
Thanks,
Ping