diff options
author | pingc <pingc> | 2007-01-30 00:10:49 +0000 |
---|---|---|
committer | pingc <pingc> | 2007-01-30 00:10:49 +0000 |
commit | 9023deacd1908809a52c09e5ac723be4bb338754 (patch) | |
tree | 0bd3ef72387b53e7f224b138a33b99a3d897423b | |
parent | 07c7565a93b92d166fc0b5a48f758ebf46cdf5b3 (diff) | |
download | xf86-input-wacom-9023deacd1908809a52c09e5ac723be4bb338754.tar.gz |
Support multiarea and ThinkPad X60trelease-0_7_7-3release-0.7.7-3
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/2.4.22/wacom.c | 32 | ||||
-rw-r--r-- | src/2.4.30x86-64/wacom.c | 30 | ||||
-rw-r--r-- | src/2.4/wacom.c | 32 | ||||
-rw-r--r-- | src/2.6.10/wacom.c | 26 | ||||
-rw-r--r-- | src/2.6.16/wacom_wac.c | 24 | ||||
-rw-r--r-- | src/2.6.16/wacom_wac.h | 1 | ||||
-rw-r--r-- | src/2.6.8/wacom.c | 24 | ||||
-rw-r--r-- | src/2.6.9/wacom.c | 24 | ||||
-rwxr-xr-x | src/include/Xwacom.h | 8 | ||||
-rwxr-xr-x | src/util/xsetwacom.c | 21 | ||||
-rwxr-xr-x | src/xdrv/wcmCommon.c | 4 | ||||
-rwxr-xr-x | src/xdrv/wcmConfig.c | 9 | ||||
-rwxr-xr-x | src/xdrv/wcmISDV4.c | 14 | ||||
-rwxr-xr-x | src/xdrv/wcmSerial.c | 22 | ||||
-rwxr-xr-x | src/xdrv/wcmUSB.c | 4 | ||||
-rwxr-xr-x | src/xdrv/xf86Wacom.c | 9 | ||||
-rwxr-xr-x | src/xdrv/xf86Wacom.h | 6 |
18 files changed, 183 insertions, 112 deletions
@@ -1,3 +1,8 @@ +2007-01-29 Ping Cheng <pingc@wacom.com> + * Added 3 new xsetwacom options + * Updated wacom_wac.c and wacom.c for Intuos outbound tracking + * label 0.7.7-3 + 2007-01-25 Ping Cheng <pingc@wacom.com> * Added support for Thinkpad X60t * label 0.7.7-2 for testing diff --git a/src/2.4.22/wacom.c b/src/2.4.22/wacom.c index a45a8b0..14ee058 100644 --- a/src/2.4.22/wacom.c +++ b/src/2.4.22/wacom.c @@ -87,6 +87,7 @@ * v1.30-j0.7.1 - added DTF720, DTU 710, G4 * v1.30-j0.7.3 - added DTF 521, I3 12x12, and I3 12x19 * v1.30-j0.7.5 - Support tablet buttons/keys + * v1.30-j0.7.7 - Support Intuos outbound tracking */ /* @@ -117,7 +118,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.30-j0.7.5" +#define DRIVER_VERSION "v1.30-j0.7.7" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@suse.cz>" #ifndef __JEJ_DEBUG #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver (LINUXWACOM)" @@ -442,10 +443,12 @@ static void wacom_graphire_irq(struct urb *urb) rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); input_report_rel(dev, REL_WHEEL, rw); input_report_key(dev, BTN_TOOL_FINGER, 0xf0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } else if ( wacom->id[1] ) { wacom->id[1] = 0; input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } } @@ -524,14 +527,6 @@ static int wacom_intuos_inout(struct urb *urb) default: /* Unknown tool */ wacom->tool[idx] = BTN_TOOL_PEN; break; } - if(!((wacom->tool[idx] == BTN_TOOL_LENS) && - (strstr(wacom->features->name, "Intuos3 12x12") - || strstr(wacom->features->name, "Intuos3 12x19")))) - { - input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); - input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); - } return 1; } @@ -543,12 +538,7 @@ static int wacom_intuos_inout(struct urb *urb) input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); return 1; } - - if((wacom->tool[idx] == BTN_TOOL_LENS) && (strstr(wacom->features->name, "Intuos3 12x12") - || strstr(wacom->features->name, "Intuos3 12x19"))) - return 1; - else - return 0; + return 0; } static void wacom_intuos_general(struct urb *urb) @@ -628,6 +618,7 @@ static void wacom_intuos_irq(struct urb *urb) input_report_key(dev, wacom->tool[1], 1); else input_report_key(dev, wacom->tool[1], 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xffffffff); return; } @@ -721,8 +712,15 @@ static void wacom_intuos_irq(struct urb *urb) } } - input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); + input_report_abs(dev, ABS_MISC, wacom->id[idx]); + + /* Only large I3 supports Lens Cursor + * Report in-prox only when RDY is set + */ + if((!((wacom->tool[idx] == BTN_TOOL_LENS) && (strstr(wacom->features->name, "Intuos3 12x12") + || strstr(wacom->features->name, "Intuos3 12x19")))) + && (data[1] & 0x40)) + input_report_key(dev, wacom->tool[idx], 1); input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); } diff --git a/src/2.4.30x86-64/wacom.c b/src/2.4.30x86-64/wacom.c index 4c47e7e..fdbd4b2 100644 --- a/src/2.4.30x86-64/wacom.c +++ b/src/2.4.30x86-64/wacom.c @@ -56,6 +56,7 @@ * v2.4.30-pc0.7.1 - Added DTF720, DTU 710, G4 * v2.4.30-pc0.7.3 - Added DTF 521, I3 12x12, and I3 12x19 * v2.4.30-pc0.7.5 - Support tablet buttons/keys + * v2.4.30-pc0.7.7 - Support Intuos outbound tracking */ /* @@ -86,7 +87,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v2.4.30-pc0.7.5" +#define DRIVER_VERSION "v2.4.30-pc0.7.7" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@suse.cz>" #ifndef __JEJ_DEBUG #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver (LINUXWACOM)" @@ -102,6 +103,7 @@ MODULE_LICENSE("GPL"); #define STYLUS_DEVICE_ID 0x02 #define CURSOR_DEVICE_ID 0x06 #define ERASER_DEVICE_ID 0x0A +#define ERASER_DEVICE_ID 0x0A struct wacom_features { char *name; @@ -385,10 +387,12 @@ static void wacom_graphire_irq(struct urb *urb) rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); input_report_rel(dev, REL_WHEEL, rw); input_report_key(dev, BTN_TOOL_FINGER, 0xf0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } else if ( wacom->id[1] ) { wacom->id[1] = 0; input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } } @@ -467,14 +471,6 @@ static int wacom_intuos_inout(struct urb *urb) default: /* Unknown tool */ wacom->tool[idx] = BTN_TOOL_PEN; break; } - if(!((wacom->tool[idx] == BTN_TOOL_LENS) && - (strstr(wacom->features->name, "Intuos3 12x12") - || strstr(wacom->features->name, "Intuos3 12x19")))) - { - input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1]); - input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); - } return 1; } @@ -486,12 +482,7 @@ static int wacom_intuos_inout(struct urb *urb) input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); return 1; } - - if((wacom->tool[idx] == BTN_TOOL_LENS) && (strstr(wacom->features->name, "Intuos3 12x12") - || strstr(wacom->features->name, "Intuos3 12x19"))) - return 1; - else - return 0; + return 0; } static void wacom_intuos_general(struct urb *urb) @@ -570,6 +561,7 @@ static void wacom_intuos_irq(struct urb *urb) input_report_key(dev, wacom->tool[1], 1); else input_report_key(dev, wacom->tool[1], 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xffffffff); return; } @@ -664,7 +656,13 @@ static void wacom_intuos_irq(struct urb *urb) } input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); + /* Only large I3 supports Lens Cursor + * Report in-prox only when RDY is set + */ + if((!((wacom->tool[idx] == BTN_TOOL_LENS) && (strstr(wacom->features->name, "Intuos3 12x12") + || strstr(wacom->features->name, "Intuos3 12x19")))) + && (data[1] & 0x40)) + input_report_key(dev, wacom->tool[idx], 1); input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); } diff --git a/src/2.4/wacom.c b/src/2.4/wacom.c index 65c7483..486c5e3 100644 --- a/src/2.4/wacom.c +++ b/src/2.4/wacom.c @@ -86,7 +86,8 @@ * v1.30-j0.7.0 - added Volito 2 and PenStation/PenPartner 2 * v1.30-j0.7.1 - added DTU 710, DTF 720, Graphire4 * v1.30-j0.7.3 - added DTF 521, I3 12x12, and I3 12x19 - * v1.30-j0.7.5 - Support tablet buttons/keys + * v1.30-j0.7.5 - Support tablet buttons/keys + * v1.30-j0.7.7 - Support Intuos outbound tracking */ /* @@ -117,7 +118,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.30-j0.7.5" +#define DRIVER_VERSION "v1.30-j0.7.7" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@suse.cz>" #ifndef __JEJ_DEBUG #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver (LINUXWACOM)" @@ -133,6 +134,7 @@ MODULE_LICENSE("GPL"); #define STYLUS_DEVICE_ID 0x02 #define CURSOR_DEVICE_ID 0x06 #define ERASER_DEVICE_ID 0x0A +#define PAD_DEVICE_ID 0x0F static int kwacomd_pid = 0; /* PID of kwacomd */ static DECLARE_COMPLETION(kwacomd_exited); @@ -440,10 +442,12 @@ static void wacom_graphire_irq(struct urb *urb) rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); input_report_rel(dev, REL_WHEEL, rw); input_report_key(dev, BTN_TOOL_FINGER, 0xf0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } else if ( wacom->id[1] ) { wacom->id[1] = 0; input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, 0); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } } @@ -522,14 +526,6 @@ static int wacom_intuos_inout(struct urb *urb) default: /* Unknown tool */ wacom->tool[idx] = BTN_TOOL_PEN; break; } - if(!((wacom->tool[idx] == BTN_TOOL_LENS) && - (strstr(wacom->features->name, "Intuos3 12x12") - || strstr(wacom->features->name, "Intuos3 12x19")))) - { - input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); - input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); - } return 1; } @@ -541,12 +537,7 @@ static int wacom_intuos_inout(struct urb *urb) input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); return 1; } - - if((wacom->tool[idx] == BTN_TOOL_LENS) && (strstr(wacom->features->name, "Intuos3 12x12") - || strstr(wacom->features->name, "Intuos3 12x19"))) - return 1; - else - return 0; + return 0; } static void wacom_intuos_general(struct urb *urb) @@ -626,6 +617,7 @@ static void wacom_intuos_irq(struct urb *urb) input_report_key(dev, wacom->tool[1], 1); else input_report_key(dev, wacom->tool[1], 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xffffffff); return; } @@ -721,7 +713,13 @@ static void wacom_intuos_irq(struct urb *urb) } input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); + /* Only large I3 supports Lens Cursor + * Report in-prox only when RDY is set + */ + if((!((wacom->tool[idx] == BTN_TOOL_LENS) && (strstr(wacom->features->name, "Intuos3 12x12") + || strstr(wacom->features->name, "Intuos3 12x19")))) + && (data[1] & 0x40)) + input_report_key(dev, wacom->tool[idx], 1); input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); } diff --git a/src/2.6.10/wacom.c b/src/2.6.10/wacom.c index d9bf936..3b112a8 100644 --- a/src/2.6.10/wacom.c +++ b/src/2.6.10/wacom.c @@ -9,7 +9,7 @@ * Copyright (c) 2000 Daniel Egger <egger@suse.de> * Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com> * Copyright (c) 2004 Panagiotis Issaris <panagiotis.issaris@mech.kuleuven.ac.be> - * Copyright (c) 2002-2006 Ping Cheng <pingc@wacom.com> + * Copyright (c) 2002-2007 Ping Cheng <pingc@wacom.com> * * ChangeLog: * v0.1 (vp) - Initial release @@ -63,6 +63,7 @@ * v1.40-2.6.10-pc-0.6 - Added G4, DTF720 and DTU710 * v1.40-2.6.10-pc-0.7 - Added DTF 521, I3 12x12, and I3 12x19 * v1.40-2.6.10-pc-0.8 - Support tablet buttons/keys + * v1.40-2.6.10-pc-0.9 - Support Intuos outbound tracking */ /* @@ -84,7 +85,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.40 - 2.6.10-pc-0.8" +#define DRIVER_VERSION "v1.40 - 2.6.10-pc-0.9" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" #define DRIVER_LICENSE "GPL" @@ -97,6 +98,7 @@ MODULE_LICENSE(DRIVER_LICENSE); #define STYLUS_DEVICE_ID 0x02 #define CURSOR_DEVICE_ID 0x06 #define ERASER_DEVICE_ID 0x0A +#define ERASER_DEVICE_ID 0x0A enum { PENPARTNER = 0, @@ -486,10 +488,12 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); input_report_rel(dev, REL_WHEEL, rw); input_report_key(dev, BTN_TOOL_FINGER, 0xf0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } else if ( wacom->id[1] ) { wacom->id[1] = 0; input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } input_sync(dev); @@ -569,14 +573,6 @@ static int wacom_intuos_inout(struct urb *urb) default: /* Unknown tool */ wacom->tool[idx] = BTN_TOOL_PEN; } - if(!((wacom->tool[idx] == BTN_TOOL_LENS) && - ((wacom->features->type == INTUOS3) - || (wacom->features->type == INTUOS3S)))) { - input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); - input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); - input_sync(dev); - } return 1; } @@ -684,6 +680,7 @@ static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs) input_report_key(dev, wacom->tool[1], 1); else input_report_key(dev, wacom->tool[1], 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xffffffff); input_sync(dev); goto exit; @@ -774,7 +771,14 @@ static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs) } input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); + /* Only large I3 supports Lens Cursor + * Report in-prox only when RDY is set + */ + if((!((wacom->tool[idx] == BTN_TOOL_LENS) + && ((wacom->features->type == INTUOS3) + || (wacom->features->type == INTUOS3S)))) && + (data[1] & 0x40)) + input_report_key(dev, wacom->tool[idx], 1); input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); input_sync(dev); diff --git a/src/2.6.16/wacom_wac.c b/src/2.6.16/wacom_wac.c index 78f3627..aaf184d 100644 --- a/src/2.6.16/wacom_wac.c +++ b/src/2.6.16/wacom_wac.c @@ -237,6 +237,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); wacom_report_rel(wcombo, REL_WHEEL, rw); wacom_report_key(wcombo, BTN_TOOL_FINGER, 0xf0); + wacom_report_abs(wcombo, ABS_MISC, PAD_DEVICE_ID); wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0); } else if (wacom->id[1]) { wacom_input_sync(wcombo); /* sync last event */ @@ -244,6 +245,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) wacom_report_key(wcombo, BTN_0, (data[7] & 0x40)); wacom_report_key(wcombo, BTN_4, (data[7] & 0x80)); wacom_report_key(wcombo, BTN_TOOL_FINGER, 0); + wacom_report_abs(wcombo, ABS_MISC, 0); wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0); } } @@ -314,15 +316,6 @@ static int wacom_intuos_inout(struct wacom_wac *wacom, void *wcombo) default: /* Unknown tool */ wacom->tool[idx] = BTN_TOOL_PEN; } - /* only large I3 support Lens Cursor */ - if(!((wacom->tool[idx] == BTN_TOOL_LENS) - && ((wacom->features->type == INTUOS3) - || (wacom->features->type == INTUOS3S)))) { - wacom_report_abs(wcombo, ABS_MISC, wacom->id[idx]); /* report tool id */ - wacom_report_key(wcombo, wacom->tool[idx], 1); - wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, wacom->serial[idx]); - return 2; - } return 1; } @@ -406,6 +399,7 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) wacom_report_key(wcombo, wacom->tool[1], 1); else wacom_report_key(wcombo, wacom->tool[1], 0); + wacom_report_abs(wcombo, ABS_MISC, PAD_DEVICE_ID); wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xffffffff); return 1; } @@ -487,8 +481,16 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) } } - wacom_report_abs(wcombo, ABS_MISC, wacom->id[idx]); /* report tool id */ - wacom_report_key(wcombo, wacom->tool[idx], 1); + wacom_report_abs(wcombo, ABS_MISC, wacom->id[idx]); + + /* Only large I3 supports Lens Cursor + * Report in-prox only when RDY is set + */ + if((!((wacom->tool[idx] == BTN_TOOL_LENS) + && ((wacom->features->type == INTUOS3) + || (wacom->features->type == INTUOS3S)))) && + (data[1] & 0x40)) + wacom_report_key(wcombo, wacom->tool[idx], 1); wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, wacom->serial[idx]); return 1; } diff --git a/src/2.6.16/wacom_wac.h b/src/2.6.16/wacom_wac.h index a1d9ce0..a230222 100644 --- a/src/2.6.16/wacom_wac.h +++ b/src/2.6.16/wacom_wac.h @@ -12,6 +12,7 @@ #define STYLUS_DEVICE_ID 0x02 #define CURSOR_DEVICE_ID 0x06 #define ERASER_DEVICE_ID 0x0A +#define PAD_DEVICE_ID 0x0F enum { PENPARTNER = 0, diff --git a/src/2.6.8/wacom.c b/src/2.6.8/wacom.c index 9c32216..cb90bf5 100644 --- a/src/2.6.8/wacom.c +++ b/src/2.6.8/wacom.c @@ -65,6 +65,7 @@ * v1.40-2.6.8-pc-0.8 - Added G4, DTF720 and DTU710 * v1.40-2.6.8-pc-0.9 - added DTF 521, I3 12x12, and I3 12x19 * v1.40-2.6.8-pc-0.10 - Support tablet buttons/keys + * v1.40-2.6.8-pc-0.11 - Support Intuos outbound tracking */ /* @@ -86,7 +87,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.40 - 2.6.8-pc-0.10" +#define DRIVER_VERSION "v1.40 - 2.6.8-pc-0.11" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" #define DRIVER_LICENSE "GPL" @@ -99,6 +100,7 @@ MODULE_LICENSE(DRIVER_LICENSE); #define STYLUS_DEVICE_ID 0x02 #define CURSOR_DEVICE_ID 0x06 #define ERASER_DEVICE_ID 0x0A +#define ERASER_DEVICE_ID 0x0A enum { PENPARTNER = 0, @@ -485,10 +487,12 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); input_report_rel(dev, REL_WHEEL, rw); input_report_key(dev, BTN_TOOL_FINGER, 0xf0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } else if ( wacom->id[1] ) { wacom->id[1] = 0; input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } input_sync(dev); @@ -568,14 +572,6 @@ static int wacom_intuos_inout(struct urb *urb) default: /* Unknown tool */ wacom->tool[idx] = BTN_TOOL_PEN; } - if(!((wacom->tool[idx] == BTN_TOOL_LENS) && - ((wacom->features->type == INTUOS3) - || (wacom->features->type == INTUOS3S)))) { - input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); - input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); - input_sync(dev); - } return 1; } @@ -683,6 +679,7 @@ static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs) input_report_key(dev, wacom->tool[1], 1); else input_report_key(dev, wacom->tool[1], 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xffffffff); input_sync(dev); goto exit; @@ -773,7 +770,14 @@ static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs) } input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); + /* Only large I3 supports Lens Cursor + * Report in-prox only when RDY is set + */ + if((!((wacom->tool[idx] == BTN_TOOL_LENS) + && ((wacom->features->type == INTUOS3) + || (wacom->features->type == INTUOS3S)))) && + (data[1] & 0x40)) + input_report_key(dev, wacom->tool[idx], 1); input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); input_sync(dev); diff --git a/src/2.6.9/wacom.c b/src/2.6.9/wacom.c index e6e79de..9087b5a 100644 --- a/src/2.6.9/wacom.c +++ b/src/2.6.9/wacom.c @@ -64,6 +64,7 @@ * v1.40-2.6.9-pc-0.7 - Added G4, DTF720 and DTU710 * v1.40-2.6.9-pc-0.8 - added DTF 521, I3 12x12, and I3 12x19 * v1.40-2.6.9-pc-0.9 - Support tablet buttons/keys + * v1.40-2.6.9-pc-0.10 - Support Intuos outbound tracking */ /* @@ -85,7 +86,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.40 - 2.6.9-pc-0.9" +#define DRIVER_VERSION "v1.40 - 2.6.9-pc-0.10" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" #define DRIVER_LICENSE "GPL" @@ -98,6 +99,7 @@ MODULE_LICENSE(DRIVER_LICENSE); #define STYLUS_DEVICE_ID 0x02 #define CURSOR_DEVICE_ID 0x06 #define ERASER_DEVICE_ID 0x0A +#define ERASER_DEVICE_ID 0x0A enum { PENPARTNER = 0, @@ -485,10 +487,12 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) rw = ((data[7] & 0x18) >> 3) - ((data[7] & 0x20) >> 3); input_report_rel(dev, REL_WHEEL, rw); input_report_key(dev, BTN_TOOL_FINGER, 0xf0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } else if ( wacom->id[1] ) { wacom->id[1] = 0; input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } input_sync(dev); @@ -568,14 +572,6 @@ static int wacom_intuos_inout(struct urb *urb) default: /* Unknown tool */ wacom->tool[idx] = BTN_TOOL_PEN; } - if(!((wacom->tool[idx] == BTN_TOOL_LENS) && - ((wacom->features->type == INTUOS3) - || (wacom->features->type == INTUOS3S)))) { - input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); - input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); - input_sync(dev); - } return 1; } @@ -683,6 +679,7 @@ static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs) input_report_key(dev, wacom->tool[1], 1); else input_report_key(dev, wacom->tool[1], 0); + input_report_abs(dev, ABS_MISC, PAD_DEVICE_ID); input_event(dev, EV_MSC, MSC_SERIAL, 0xffffffff); input_sync(dev); goto exit; @@ -773,7 +770,14 @@ static void wacom_intuos_irq(struct urb *urb, struct pt_regs *regs) } input_report_abs(dev, ABS_MISC, wacom->id[idx]); /* report tool id */ - input_report_key(dev, wacom->tool[idx], 1); + /* Only large I3 supports Lens Cursor + * Report in-prox only when RDY is set + */ + if((!((wacom->tool[idx] == BTN_TOOL_LENS) + && ((wacom->features->type == INTUOS3) + || (wacom->features->type == INTUOS3S)))) && + (data[1] & 0x40)) + input_report_key(dev, wacom->tool[idx], 1); input_event(dev, EV_MSC, MSC_SERIAL, wacom->serial[idx]); input_sync(dev); diff --git a/src/include/Xwacom.h b/src/include/Xwacom.h index 298da01..21f008b 100755 --- a/src/include/Xwacom.h +++ b/src/include/Xwacom.h @@ -78,10 +78,10 @@ #define XWACOM_PARAM_TOOLSERIAL 223 #define XWACOM_PARAM_GETMODEL 224 #define XWACOM_PARAM_NUMSCREEN 250 -#define XWACOM_PARAM_SCREENTOPX 231 -#define XWACOM_PARAM_SCREENTOPY 232 -#define XWACOM_PARAM_SCREENBOTTOMX 233 -#define XWACOM_PARAM_SCREENBOTTOMY 234 +#define XWACOM_PARAM_SCREENTOPX 251 +#define XWACOM_PARAM_SCREENTOPY 252 +#define XWACOM_PARAM_SCREENBOTTOMX 253 +#define XWACOM_PARAM_SCREENBOTTOMY 254 #define XWACOM_VALUE_ROTATE_NONE 0 #define XWACOM_VALUE_ROTATE_CW 1 diff --git a/src/util/xsetwacom.c b/src/util/xsetwacom.c index 72df73c..18fd314 100755 --- a/src/util/xsetwacom.c +++ b/src/util/xsetwacom.c @@ -340,10 +340,22 @@ static PARAMINFO gParamInfo[] = XWACOM_VALUE_ROTATE_HALF, SINGLE_VALUE, XWACOM_VALUE_ROTATE_NONE }, - { "GetTabletID", + { "ToolID", + "Returns the ID of the associated device. ", + XWACOM_PARAM_TOOLID, VALUE_REQUIRED }, + + { "ToolSerial", + "Returns the serial number of the associated device. ", + XWACOM_PARAM_TOOLSERIAL, VALUE_REQUIRED }, + + { "TabletID", "Returns the tablet ID of the associated device. ", XWACOM_PARAM_TID, VALUE_REQUIRED }, + { "NumScreen", + "Returns number of screens configured for the desktop. ", + XWACOM_PARAM_NUMSCREEN, VALUE_REQUIRED }, + { "GetModel", "Writes tablet models to /etc/wacom.dat. ", XWACOM_PARAM_GETMODEL, VALUE_OPTIONAL }, @@ -543,6 +555,13 @@ static int Set(WACOMCONFIG * hConfig, char** argv) return 1; } + if (p->nParamID > XWACOM_PARAM_GETONLYPARAM) + { + fprintf(stderr,"Set: '%s' doesn't support set option.\n", + pszParam); + return 1; + } + /* Set case correctly for error messages below. */ pszParam = p->pszParam; diff --git a/src/xdrv/wcmCommon.c b/src/xdrv/wcmCommon.c index 52da7d6..3e103f9 100755 --- a/src/xdrv/wcmCommon.c +++ b/src/xdrv/wcmCommon.c @@ -1,6 +1,6 @@ /* * Copyright 1995-2002 by Frederic Lepied, France. <Lepied@XFree86.org> - * Copyright 2002-2006 by Ping Cheng, Wacom Technology. <pingc@wacom.com> + * Copyright 2002-2007 by Ping Cheng, Wacom Technology. <pingc@wacom.com> * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -667,6 +667,8 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds, unsigne } } priv->oldProximity = is_proximity; + priv->old_device_id = id; + priv->old_serial = serial; if (is_proximity) { priv->oldButtons = buttons; diff --git a/src/xdrv/wcmConfig.c b/src/xdrv/wcmConfig.c index d51ee80..b471b56 100755 --- a/src/xdrv/wcmConfig.c +++ b/src/xdrv/wcmConfig.c @@ -1,6 +1,6 @@ /* * Copyright 1995-2002 by Frederic Lepied, France. <Lepied@XFree86.org> - * Copyright 2002-2006 by Ping Cheng, Wacom. <pingc@wacom.com> + * Copyright 2002-2007 by Ping Cheng, Wacom. <pingc@wacom.com> * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -115,6 +115,11 @@ LocalDevicePtr xf86WcmAllocate(char* name, int flag) priv->factorY = 0.0; /* Y factor */ priv->common = common; /* common info pointer */ priv->oldProximity = 0; /* previous proximity */ + priv->old_serial = 0; /* last active tool's serial */ + priv->old_device_id = IsStylus(priv) ? STYLUS_DEVICE_ID : + (IsEraser(priv) ? ERASER_DEVICE_ID : + (IsCursor(priv) ? CURSOR_DEVICE_ID : PAD_DEVICE_ID)); + priv->devReverseCount = 0; /* flag for relative Reverse call */ priv->serial = 0; /* serial number */ priv->screen_no = -1; /* associated screen */ @@ -174,6 +179,8 @@ LocalDevicePtr xf86WcmAllocate(char* name, int flag) common->wcmProtocolLevel = 4; /* protocol level */ common->wcmThreshold = 0; /* unconfigured threshold */ common->wcmLinkSpeed = 9600; /* serial link speed */ + common->wcmISDV4Speed = 19200; /* serial ISDV4 link speed */ + common->wcmDevCls = &gWacomSerialDevice; /* device-specific functions */ common->wcmModel = NULL; /* model-specific functions */ common->wcmEraserID = 0; /* eraser id associated with the stylus */ diff --git a/src/xdrv/wcmISDV4.c b/src/xdrv/wcmISDV4.c index 691128d..ed6201b 100755 --- a/src/xdrv/wcmISDV4.c +++ b/src/xdrv/wcmISDV4.c @@ -1,6 +1,6 @@ /* * Copyright 1995-2002 by Frederic Lepied, France. <Lepied@XFree86.org> - * Copyright 2002-2005 by Ping Cheng, Wacom Technology. <pingc@wacom.com> + * Copyright 2002-2007 by Ping Cheng, Wacom Technology. <pingc@wacom.com> * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -78,10 +78,8 @@ static Bool isdv4Init(LocalDevicePtr local) DBG(1, ErrorF("initializing ISDV4 tablet\n")); - /* Set the speed of the serial link to 19200 first */ - if (common->wcmLinkSpeed == 9600) - common->wcmLinkSpeed = 19200; - if (xf86WcmSetSerialSpeed(local->fd, common->wcmLinkSpeed) < 0) + /* Try 19200 first */ + if (xf86WcmSetSerialSpeed(local->fd, common->wcmISDV4Speed) < 0) return !Success; /* Send stop command to the tablet */ @@ -114,6 +112,7 @@ static void isdv4InitISDV4(WacomCommonPtr common, const char* id, float version) common->wcmResolY = 2540; /* tablet Y resolution in points/inch */ common->wcmTPCButton = 1; /* Tablet PC buttons on by default */ common->wcmTPCButtonDefault = 1; + common->tablet_id = 0x90; } static int isdv4GetRanges(LocalDevicePtr local) { @@ -167,9 +166,10 @@ static int isdv4GetRanges(LocalDevicePtr local) /* Control data bit check */ if ( !(data[0] & 0x40) ) { - if (common->wcmLinkSpeed != 38400) + /* Try 38400 now */ + if (common->wcmISDV4Speed != 38400) { - common->wcmLinkSpeed = 38400; + common->wcmISDV4Speed = 38400; return isdv4Init(local); } else diff --git a/src/xdrv/wcmSerial.c b/src/xdrv/wcmSerial.c index a840faf..ff50c7b 100755 --- a/src/xdrv/wcmSerial.c +++ b/src/xdrv/wcmSerial.c @@ -1,6 +1,6 @@ /* * Copyright 1995-2002 by Frederic Lepied, France. <Lepied@XFree86.org> - * Copyright 2002-2005 by Ping Cheng, Wacom Technology. <pingc@wacom.com> + * Copyright 2002-2007 by Ping Cheng, Wacom Technology. <pingc@wacom.com> * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -523,6 +523,7 @@ static int serialInitTablet(LocalDevicePtr local) int loop, idx; char id[BUFFER_SIZE]; float version; + WacomCommonPtr common = ((WacomDevicePtr)(local->private))->common; WacomModelPtr model = NULL; @@ -559,19 +560,36 @@ static int serialInitTablet(LocalDevicePtr local) /* Detect tablet model based on identifier */ if (id[2] == 'G' && id[3] == 'D') + { model = &serialIntuos; + common->tablet_id = 0x20; + } else if (id[2] == 'X' && id[3] == 'D') + { model = &serialIntuos2; + common->tablet_id = 0x40; + } else if ( (id[2] == 'P' && id[3] == 'L') || (id[2] == 'D' && id[3] == 'T') ) + { model = &serialCintiq; + common->tablet_id = 0x30; + } else if (id[2] == 'C' && id[3] == 'T') + { model = &serialPenPartner; + common->tablet_id = 0x00; + } else if (id[2] == 'E' && id[3] == 'T') + { model = &serialGraphire; + common->tablet_id = 0x10; + } else + { model = &serialProtocol4; - + common->tablet_id = 0x03; + } } return xf86WcmInitTablet(local,model,id,version); diff --git a/src/xdrv/wcmUSB.c b/src/xdrv/wcmUSB.c index 7b1a876..483e612 100755 --- a/src/xdrv/wcmUSB.c +++ b/src/xdrv/wcmUSB.c @@ -1,6 +1,6 @@ /* * Copyright 1995-2002 by Frederic Lepied, France. <Lepied@XFree86.org> - * Copyright 2002-2006 by Ping Cheng, Wacom Technology. <pingc@wacom.com> + * Copyright 2002-2007 by Ping Cheng, Wacom Technology. <pingc@wacom.com> * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -722,8 +722,6 @@ static void usbParseEvent(WacomCommonPtr common, { memset(&common->wcmChannel[i],0, sizeof(WacomChannel)); - /* in case the in-prox event was missing */ - common->wcmChannel[i].work.proximity = 1; /* Intuos3 or Graphire4 Pad */ if (common->wcmLastToolSerial == 0xffffffff || common->wcmLastToolSerial == 0xf0) diff --git a/src/xdrv/xf86Wacom.c b/src/xdrv/xf86Wacom.c index 87a5b83..9ed439e 100755 --- a/src/xdrv/xf86Wacom.c +++ b/src/xdrv/xf86Wacom.c @@ -1148,6 +1148,15 @@ static int xf86WcmGetParam(LocalDevicePtr local, int param) return -1; case XWACOM_PARAM_TID: return common->tablet_id; + case XWACOM_PARAM_TOOLID: + return priv->old_device_id; + case XWACOM_PARAM_TOOLSERIAL: + return priv->old_serial; + case XWACOM_PARAM_NUMSCREEN: + if (priv->twinview == TV_NONE) + return screenInfo.numScreens; + else + return 2; } DBG(10, ErrorF("xf86WcmGetParam invalid param %d\n",param)); return -1; diff --git a/src/xdrv/xf86Wacom.h b/src/xdrv/xf86Wacom.h index 019e5ac..7ab948e 100755 --- a/src/xdrv/xf86Wacom.h +++ b/src/xdrv/xf86Wacom.h @@ -1,6 +1,6 @@ /* * Copyright 1995-2002 by Frederic Lepied, France. <Lepied@XFree86.org> - * Copyright 2002-2006 by Ping Cheng, Wacom Technology. <pingc@wacom.com> + * Copyright 2002-2007 by Ping Cheng, Wacom Technology. <pingc@wacom.com> * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -228,6 +228,7 @@ struct _WacomModel #define STYLUS_DEVICE_ID 0x02 #define CURSOR_DEVICE_ID 0x06 #define ERASER_DEVICE_ID 0x0A +#define PAD_DEVICE_ID 0x0F #define STYLUS_ID 0x00000001 #define CURSOR_ID 0x00000002 @@ -297,6 +298,8 @@ struct _WacomDeviceRec int oldThrottle; /* previous throttle value */ int oldButtons; /* previous buttons state */ int oldProximity; /* previous proximity */ + int old_device_id; /* last in prox device id */ + int old_serial; /* last in prox tool serial number */ int devReverseCount; /* Relative ReverseConvert called twice each movement*/ double speed; /* relative mode speed */ int accel; /* relative mode acceleration */ @@ -483,6 +486,7 @@ struct _WacomCommonRec int wcmThreshold; /* Threshold for button pressure */ WacomChannel wcmChannel[MAX_CHANNELS]; /* channel device state */ unsigned int wcmLinkSpeed; /* serial link speed */ + unsigned int wcmISDV4Speed; /* serial ISDV4 link speed */ WacomDeviceClassPtr wcmDevCls; /* device class functions */ WacomModelPtr wcmModel; /* model-specific functions */ |