* [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen @ 2009-05-18 22:10 Stéphane Chatty 2009-05-19 20:16 ` Rafi Rubin 0 siblings, 1 reply; 6+ messages in thread From: Stéphane Chatty @ 2009-05-18 22:10 UTC (permalink / raw) To: linux-input, jkosina, Henrik Rydberg Cc: Mohamed Ikbel Boulabiar, Sebastien Hamdani Added constants to hid.h for all digitizer usages (including the new multitouch ones), and updated hid-debug.c to support the new MT input constants such as ABS_MT_POSITION_X. Signed-off-by: Stephane Chatty <chatty@enac.fr> diff -uprN a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c --- a/drivers/hid/hid-debug.c 2009-05-09 02:14:14.000000000 +0200 +++ b/drivers/hid/hid-debug.c 2009-05-16 16:06:56.000000000 +0200 @@ -137,6 +137,14 @@ static const struct hid_usage_entry hid_ {0, 0x44, "BarrelSwitch"}, {0, 0x45, "Eraser"}, {0, 0x46, "TabletPick"}, + {0, 0x47, "Confidence"}, + {0, 0x48, "Width"}, + {0, 0x49, "Height"}, + {0, 0x51, "ContactID"}, + {0, 0x52, "InputMode"}, + {0, 0x53, "DeviceIndex"}, + {0, 0x54, "ContactCount"}, + {0, 0x55, "ContactMaximumNumber"}, { 15, 0, "PhysicalInterfaceDevice" }, {0, 0x00, "Undefined"}, {0, 0x01, "Physical_Interface_Device"}, @@ -514,9 +522,11 @@ static const char *events[EV_MAX + 1] = [EV_FF_STATUS] = "ForceFeedbackStatus", }; -static const char *syncs[2] = { +static const char *syncs[3] = { [SYN_REPORT] = "Report", [SYN_CONFIG] = "Config", + [SYN_MT_REPORT] = "MT Report" }; + static const char *keys[KEY_MAX + 1] = { [KEY_RESERVED] = "Reserved", [KEY_ESC] = "Esc", [KEY_1] = "1", [KEY_2] = "2", @@ -734,8 +744,17 @@ static const char *absolutes[ABS_MAX + 1 [ABS_HAT2Y] = "Hat2Y", [ABS_HAT3X] = "Hat3X", [ABS_HAT3Y] = "Hat 3Y", [ABS_PRESSURE] = "Pressure", [ABS_DISTANCE] = "Distance", [ABS_TILT_X] = "XTilt", - [ABS_TILT_Y] = "YTilt", [ABS_TOOL_WIDTH] = "Tool Width", + [ABS_TILT_Y] = "YTilt", [ABS_TOOL_WIDTH] = "ToolWidth", [ABS_VOLUME] = "Volume", [ABS_MISC] = "Misc", + [ABS_MT_TOUCH_MAJOR] = "MTMajor", + [ABS_MT_TOUCH_MINOR] = "MTMinor", + [ABS_MT_WIDTH_MAJOR] = "MTMajorW", + [ABS_MT_WIDTH_MINOR] = "MTMinorW", + [ABS_MT_ORIENTATION] = "MTOrientation", + [ABS_MT_POSITION_X] = "MTPositionX", + [ABS_MT_POSITION_Y] = "MTPositionY", + [ABS_MT_TOOL_TYPE] = "MTToolType", + [ABS_MT_BLOB_ID] = "MTBlobID", }; static const char *misc[MSC_MAX + 1] = { diff -uprN a/include/linux/hid.h b/include/linux/hid.h --- a/include/linux/hid.h 2009-05-09 02:14:14.000000000 +0200 +++ b/include/linux/hid.h 2009-05-16 16:44:24.000000000 +0200 @@ -238,6 +238,37 @@ struct hid_item { #define HID_GD_RIGHT 0x00010092 #define HID_GD_LEFT 0x00010093 +#define HID_DG_DIGITIZER 0x000d0001 +#define HID_DG_PEN 0x000d0002 +#define HID_DG_LIGHTPEN 0x000d0003 +#define HID_DG_TOUCHSCREEN 0x000d0004 +#define HID_DG_TOUCHPAD 0x000d0005 +#define HID_DG_STYLUS 0x000d0020 +#define HID_DG_PUCK 0x000d0021 +#define HID_DG_FINGER 0x000d0022 +#define HID_DG_TIPPRESSURE 0x000d0030 +#define HID_DG_BARRELPRESSURE 0x000d0031 +#define HID_DG_INRANGE 0x000d0032 +#define HID_DG_TOUCH 0x000d0033 +#define HID_DG_UNTOUCH 0x000d0034 +#define HID_DG_TAP 0x000d0035 +#define HID_DG_TABLETFUNCTIONKEY 0x000d0039 +#define HID_DG_PROGRAMCHANGEKEY 0x000d003a +#define HID_DG_INVERT 0x000d003c +#define HID_DG_TIPSWITCH 0x000d0042 +#define HID_DG_TIPSWITCH2 0x000d0043 +#define HID_DG_BARRELSWITCH 0x000d0044 +#define HID_DG_ERASER 0x000d0045 +#define HID_DG_TABLETPICK 0x000d0046 +#define HID_DG_CONFIDENCE 0x000d0047 +#define HID_DG_WIDTH 0x000d0048 +#define HID_DG_HEIGHT 0x000d0049 +#define HID_DG_CONTACTID 0x000d0051 +#define HID_DG_INPUTMODE 0x000d0052 +#define HID_DG_DEVICEINDEX 0x000d0053 +#define HID_DG_CONTACTCOUNT 0x000d0054 +#define HID_DG_CONTACTMAX 0x000d0055 + /* * HID report types --- Ouch! HID spec says 1 2 3! */ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen 2009-05-18 22:10 [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen Stéphane Chatty @ 2009-05-19 20:16 ` Rafi Rubin [not found] ` <1F279E42-BCE3-48DE-AFF3-1108BA000843@enac.fr> 0 siblings, 1 reply; 6+ messages in thread From: Rafi Rubin @ 2009-05-19 20:16 UTC (permalink / raw) To: Stéphane Chatty Cc: linux-input, jkosina, Henrik Rydberg, Mohamed Ikbel Boulabiar, Sebastien Hamdani I suggest adding a comment that these usages are tentative or at least not yet mentioned in the official docs: http://www.usb.org/developers/hidpage#HID_Usage Anyway, very cool that you figured out all those fields. I haven't even seen any of those codes in the 50's. Rafi > + {0, 0x47, "Confidence"}, > + {0, 0x48, "Width"}, > + {0, 0x49, "Height"}, > + {0, 0x51, "ContactID"}, > + {0, 0x52, "InputMode"}, > + {0, 0x53, "DeviceIndex"}, > + {0, 0x54, "ContactCount"}, > + {0, 0x55, "ContactMaximumNumber"}, > +#define HID_DG_CONFIDENCE 0x000d0047 > +#define HID_DG_WIDTH 0x000d0048 > +#define HID_DG_HEIGHT 0x000d0049 > +#define HID_DG_CONTACTID 0x000d0051 > +#define HID_DG_INPUTMODE 0x000d0052 > +#define HID_DG_DEVICEINDEX 0x000d0053 > +#define HID_DG_CONTACTCOUNT 0x000d0054 > +#define HID_DG_CONTACTMAX 0x000d0055 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <1F279E42-BCE3-48DE-AFF3-1108BA000843@enac.fr>]
* Re: [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen [not found] ` <1F279E42-BCE3-48DE-AFF3-1108BA000843@enac.fr> @ 2009-05-19 21:03 ` Rafi Rubin 2009-05-20 9:42 ` [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen [v2] Stéphane Chatty 0 siblings, 1 reply; 6+ messages in thread From: Rafi Rubin @ 2009-05-19 21:03 UTC (permalink / raw) To: Stéphane Chatty Cc: linux-input, jkosina, Henrik Rydberg, Mohamed Ikbel Boulabiar, Sebastien Hamdani I suppose that constitutes good reason to expect them to be standardized. On another note, you should add a comma to your changes in hid-debug: + [SYN_MT_REPORT] = "MT Report" Stéphane Chatty wrote: > > Le 19 mai 09 à 22:16, Rafi Rubin a écrit : > >> I suggest adding a comment that these usages are tentative or at least >> not yet mentioned in the official docs: >> http://www.usb.org/developers/hidpage#HID_Usage >> >> Anyway, very cool that you figured out all those fields. I haven't >> even seen any of those codes in the 50's. >> > > Actually, these usages are documented by Microsoft as being (soon, I > guess) in the HID spec. See page 6 of > http://download.*microsoft*.com/download/a/d/f/adf1347d-08dc-41a4-9084- > 623b1194d4b2/*Digitizer*Drvs_touch.docx > > Sorry to disappoint you about my skills :-) > > About the comment, it's true that the usages are not yet in the official > doc so we have two options: > - trust Microsoft that they will appear soon > - or be careful but we must think later about removing them > > What do you think? > > St. > -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen [v2] 2009-05-19 21:03 ` Rafi Rubin @ 2009-05-20 9:42 ` Stéphane Chatty 2009-05-20 11:01 ` Jiri Kosina 0 siblings, 1 reply; 6+ messages in thread From: Stéphane Chatty @ 2009-05-20 9:42 UTC (permalink / raw) To: linux-input Cc: jkosina, Henrik Rydberg, Mohamed Ikbel Boulabiar, Sebastien Hamdani, Rafi Rubin Added constants to hid.h for all digitizer usages (including the new multitouch ones), and updated hid-debug.c to support the new MT input constants such as ABS_MT_POSITION_X. Signed-off-by: Stephane Chatty <chatty@enac.fr> diff -rupN a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c --- a/drivers/hid/hid-debug.c 2009-05-09 02:14:14.000000000 +0200 +++ b/drivers/hid/hid-debug.c 2009-05-20 09:20:20.000000000 +0200 @@ -137,6 +137,14 @@ static const struct hid_usage_entry hid_ {0, 0x44, "BarrelSwitch"}, {0, 0x45, "Eraser"}, {0, 0x46, "TabletPick"}, + {0, 0x47, "Confidence"}, + {0, 0x48, "Width"}, + {0, 0x49, "Height"}, + {0, 0x51, "ContactID"}, + {0, 0x52, "InputMode"}, + {0, 0x53, "DeviceIndex"}, + {0, 0x54, "ContactCount"}, + {0, 0x55, "ContactMaximumNumber"}, { 15, 0, "PhysicalInterfaceDevice" }, {0, 0x00, "Undefined"}, {0, 0x01, "Physical_Interface_Device"}, @@ -514,9 +522,11 @@ static const char *events[EV_MAX + 1] = [EV_FF_STATUS] = "ForceFeedbackStatus", }; -static const char *syncs[2] = { +static const char *syncs[3] = { [SYN_REPORT] = "Report", [SYN_CONFIG] = "Config", + [SYN_MT_REPORT] = "MT Report", }; + static const char *keys[KEY_MAX + 1] = { [KEY_RESERVED] = "Reserved", [KEY_ESC] = "Esc", [KEY_1] = "1", [KEY_2] = "2", @@ -734,8 +744,17 @@ static const char *absolutes[ABS_MAX + 1 [ABS_HAT2Y] = "Hat2Y", [ABS_HAT3X] = "Hat3X", [ABS_HAT3Y] = "Hat 3Y", [ABS_PRESSURE] = "Pressure", [ABS_DISTANCE] = "Distance", [ABS_TILT_X] = "XTilt", - [ABS_TILT_Y] = "YTilt", [ABS_TOOL_WIDTH] = "Tool Width", + [ABS_TILT_Y] = "YTilt", [ABS_TOOL_WIDTH] = "ToolWidth", [ABS_VOLUME] = "Volume", [ABS_MISC] = "Misc", + [ABS_MT_TOUCH_MAJOR] = "MTMajor", + [ABS_MT_TOUCH_MINOR] = "MTMinor", + [ABS_MT_WIDTH_MAJOR] = "MTMajorW", + [ABS_MT_WIDTH_MINOR] = "MTMinorW", + [ABS_MT_ORIENTATION] = "MTOrientation", + [ABS_MT_POSITION_X] = "MTPositionX", + [ABS_MT_POSITION_Y] = "MTPositionY", + [ABS_MT_TOOL_TYPE] = "MTToolType", + [ABS_MT_BLOB_ID] = "MTBlobID", }; static const char *misc[MSC_MAX + 1] = { diff -rupN a/include/linux/hid.h b/include/linux/hid.h --- a/include/linux/hid.h 2009-05-09 02:14:14.000000000 +0200 +++ b/include/linux/hid.h 2009-05-16 16:44:24.000000000 +0200 @@ -238,6 +238,37 @@ struct hid_item { #define HID_GD_RIGHT 0x00010092 #define HID_GD_LEFT 0x00010093 +#define HID_DG_DIGITIZER 0x000d0001 +#define HID_DG_PEN 0x000d0002 +#define HID_DG_LIGHTPEN 0x000d0003 +#define HID_DG_TOUCHSCREEN 0x000d0004 +#define HID_DG_TOUCHPAD 0x000d0005 +#define HID_DG_STYLUS 0x000d0020 +#define HID_DG_PUCK 0x000d0021 +#define HID_DG_FINGER 0x000d0022 +#define HID_DG_TIPPRESSURE 0x000d0030 +#define HID_DG_BARRELPRESSURE 0x000d0031 +#define HID_DG_INRANGE 0x000d0032 +#define HID_DG_TOUCH 0x000d0033 +#define HID_DG_UNTOUCH 0x000d0034 +#define HID_DG_TAP 0x000d0035 +#define HID_DG_TABLETFUNCTIONKEY 0x000d0039 +#define HID_DG_PROGRAMCHANGEKEY 0x000d003a +#define HID_DG_INVERT 0x000d003c +#define HID_DG_TIPSWITCH 0x000d0042 +#define HID_DG_TIPSWITCH2 0x000d0043 +#define HID_DG_BARRELSWITCH 0x000d0044 +#define HID_DG_ERASER 0x000d0045 +#define HID_DG_TABLETPICK 0x000d0046 +#define HID_DG_CONFIDENCE 0x000d0047 +#define HID_DG_WIDTH 0x000d0048 +#define HID_DG_HEIGHT 0x000d0049 +#define HID_DG_CONTACTID 0x000d0051 +#define HID_DG_INPUTMODE 0x000d0052 +#define HID_DG_DEVICEINDEX 0x000d0053 +#define HID_DG_CONTACTCOUNT 0x000d0054 +#define HID_DG_CONTACTMAX 0x000d0055 + /* * HID report types --- Ouch! HID spec says 1 2 3! */ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen [v2] 2009-05-20 9:42 ` [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen [v2] Stéphane Chatty @ 2009-05-20 11:01 ` Jiri Kosina 2009-05-20 12:19 ` [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen [v3] Stéphane Chatty 0 siblings, 1 reply; 6+ messages in thread From: Jiri Kosina @ 2009-05-20 11:01 UTC (permalink / raw) To: Stéphane Chatty Cc: linux-input, Henrik Rydberg, Mohamed Ikbel Boulabiar, Sebastien Hamdani, Rafi Rubin [-- Attachment #1: Type: TEXT/PLAIN, Size: 593 bytes --] On Wed, 20 May 2009, Stéphane Chatty wrote: > Added constants to hid.h for all digitizer usages (including the new > multitouch ones), and updated hid-debug.c to support the new MT input > constants such as ABS_MT_POSITION_X. Could you please also shortly describe in the changelog and in the hid.h as a comment, that these constants have not yet propagated into official HID standard (which is unfortunately quite outdated), but it is on it's way being pushed by Microsoft (and preferably reference the document). Besides that, I think it is fine. Thanks, -- Jiri Kosina SUSE Labs ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen [v3] 2009-05-20 11:01 ` Jiri Kosina @ 2009-05-20 12:19 ` Stéphane Chatty 0 siblings, 0 replies; 6+ messages in thread From: Stéphane Chatty @ 2009-05-20 12:19 UTC (permalink / raw) To: linux-input Cc: Henrik Rydberg, Mohamed Ikbel Boulabiar, Sebastien Hamdani, Rafi Rubin, Jiri Kosina Added constants to hid.h for all digitizer usages (including the new multitouch ones that are not yet in the official USB spec but are being pushed by Microsft as described in their paper "Digitizer Drivers for Windows Touch and Pen-Based Computers"). Updated hid- debug.c to support the new MT input constants such as ABS_MT_POSITION_X. Signed-off-by: Stephane Chatty <chatty@enac.fr> diff -rupN a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c --- a/drivers/hid/hid-debug.c 2009-05-09 02:14:14.000000000 +0200 +++ b/drivers/hid/hid-debug.c 2009-05-20 09:20:20.000000000 +0200 @@ -137,6 +137,14 @@ static const struct hid_usage_entry hid_ {0, 0x44, "BarrelSwitch"}, {0, 0x45, "Eraser"}, {0, 0x46, "TabletPick"}, + {0, 0x47, "Confidence"}, + {0, 0x48, "Width"}, + {0, 0x49, "Height"}, + {0, 0x51, "ContactID"}, + {0, 0x52, "InputMode"}, + {0, 0x53, "DeviceIndex"}, + {0, 0x54, "ContactCount"}, + {0, 0x55, "ContactMaximumNumber"}, { 15, 0, "PhysicalInterfaceDevice" }, {0, 0x00, "Undefined"}, {0, 0x01, "Physical_Interface_Device"}, @@ -514,9 +522,11 @@ static const char *events[EV_MAX + 1] = [EV_FF_STATUS] = "ForceFeedbackStatus", }; -static const char *syncs[2] = { +static const char *syncs[3] = { [SYN_REPORT] = "Report", [SYN_CONFIG] = "Config", + [SYN_MT_REPORT] = "MT Report", }; + static const char *keys[KEY_MAX + 1] = { [KEY_RESERVED] = "Reserved", [KEY_ESC] = "Esc", [KEY_1] = "1", [KEY_2] = "2", @@ -734,8 +744,17 @@ static const char *absolutes[ABS_MAX + 1 [ABS_HAT2Y] = "Hat2Y", [ABS_HAT3X] = "Hat3X", [ABS_HAT3Y] = "Hat 3Y", [ABS_PRESSURE] = "Pressure", [ABS_DISTANCE] = "Distance", [ABS_TILT_X] = "XTilt", - [ABS_TILT_Y] = "YTilt", [ABS_TOOL_WIDTH] = "Tool Width", + [ABS_TILT_Y] = "YTilt", [ABS_TOOL_WIDTH] = "ToolWidth", [ABS_VOLUME] = "Volume", [ABS_MISC] = "Misc", + [ABS_MT_TOUCH_MAJOR] = "MTMajor", + [ABS_MT_TOUCH_MINOR] = "MTMinor", + [ABS_MT_WIDTH_MAJOR] = "MTMajorW", + [ABS_MT_WIDTH_MINOR] = "MTMinorW", + [ABS_MT_ORIENTATION] = "MTOrientation", + [ABS_MT_POSITION_X] = "MTPositionX", + [ABS_MT_POSITION_Y] = "MTPositionY", + [ABS_MT_TOOL_TYPE] = "MTToolType", + [ABS_MT_BLOB_ID] = "MTBlobID", }; static const char *misc[MSC_MAX + 1] = { diff -rupN a/include/linux/hid.h b/include/linux/hid.h --- a/include/linux/hid.h 2009-05-09 02:14:14.000000000 +0200 +++ b/include/linux/hid.h 2009-05-20 14:13:51.000000000 +0200 @@ -238,6 +238,42 @@ struct hid_item { #define HID_GD_RIGHT 0x00010092 #define HID_GD_LEFT 0x00010093 +#define HID_DG_DIGITIZER 0x000d0001 +#define HID_DG_PEN 0x000d0002 +#define HID_DG_LIGHTPEN 0x000d0003 +#define HID_DG_TOUCHSCREEN 0x000d0004 +#define HID_DG_TOUCHPAD 0x000d0005 +#define HID_DG_STYLUS 0x000d0020 +#define HID_DG_PUCK 0x000d0021 +#define HID_DG_FINGER 0x000d0022 +#define HID_DG_TIPPRESSURE 0x000d0030 +#define HID_DG_BARRELPRESSURE 0x000d0031 +#define HID_DG_INRANGE 0x000d0032 +#define HID_DG_TOUCH 0x000d0033 +#define HID_DG_UNTOUCH 0x000d0034 +#define HID_DG_TAP 0x000d0035 +#define HID_DG_TABLETFUNCTIONKEY 0x000d0039 +#define HID_DG_PROGRAMCHANGEKEY 0x000d003a +#define HID_DG_INVERT 0x000d003c +#define HID_DG_TIPSWITCH 0x000d0042 +#define HID_DG_TIPSWITCH2 0x000d0043 +#define HID_DG_BARRELSWITCH 0x000d0044 +#define HID_DG_ERASER 0x000d0045 +#define HID_DG_TABLETPICK 0x000d0046 +/* + * as of May 20, 2009 the usages below are not yet in the official USB spec + * but are being pushed by Microsft as described in their paper "Digitizer + * Drivers for Windows Touch and Pen-Based Computers" + */ +#define HID_DG_CONFIDENCE 0x000d0047 +#define HID_DG_WIDTH 0x000d0048 +#define HID_DG_HEIGHT 0x000d0049 +#define HID_DG_CONTACTID 0x000d0051 +#define HID_DG_INPUTMODE 0x000d0052 +#define HID_DG_DEVICEINDEX 0x000d0053 +#define HID_DG_CONTACTCOUNT 0x000d0054 +#define HID_DG_CONTACTMAX 0x000d0055 + /* * HID report types --- Ouch! HID spec says 1 2 3! */ ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-05-20 12:19 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-05-18 22:10 [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen Stéphane Chatty 2009-05-19 20:16 ` Rafi Rubin [not found] ` <1F279E42-BCE3-48DE-AFF3-1108BA000843@enac.fr> 2009-05-19 21:03 ` Rafi Rubin 2009-05-20 9:42 ` [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen [v2] Stéphane Chatty 2009-05-20 11:01 ` Jiri Kosina 2009-05-20 12:19 ` [PATCH 1/3 ] hid: Multitouch support for the N-Trig touchscreen [v3] Stéphane Chatty
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).