diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/2.4.22/wacom.c | 104 | ||||
-rw-r--r-- | src/2.4.30x86-64/wacom.c | 101 | ||||
-rw-r--r-- | src/2.4/wacom.c | 101 | ||||
-rw-r--r-- | src/2.6.10/wacom.c | 113 | ||||
-rwxr-xr-x | src/2.6.11/wacom.h | 5 | ||||
-rwxr-xr-x | src/2.6.11/wacom_sys.c | 6 | ||||
-rwxr-xr-x | src/2.6.13/wacom.h | 6 | ||||
-rwxr-xr-x | src/2.6.13/wacom_sys.c | 6 | ||||
-rwxr-xr-x | src/2.6.15/wacom_sys.c | 6 | ||||
-rw-r--r-- | src/2.6.16/wacom.h | 5 | ||||
-rw-r--r-- | src/2.6.16/wacom_sys.c | 6 | ||||
-rw-r--r-- | src/2.6.16/wacom_wac.c | 35 | ||||
-rw-r--r-- | src/2.6.16/wacom_wac.h | 1 | ||||
-rw-r--r-- | src/2.6.18/wacom.h | 5 | ||||
-rwxr-xr-x | src/2.6.19/wacom.h | 5 | ||||
-rwxr-xr-x | src/2.6.19/wacom_sys.c | 6 | ||||
-rwxr-xr-x | src/2.6.19/wacom_wac.c | 35 | ||||
-rw-r--r-- | src/2.6.8/wacom.c | 72 | ||||
-rw-r--r-- | src/2.6.9/wacom.c | 72 | ||||
-rwxr-xr-x | src/util/wactablet.h | 3 | ||||
-rwxr-xr-x | src/util/wacusb.c | 13 | ||||
-rwxr-xr-x | src/xdrv/wcmCommon.c | 2 | ||||
-rwxr-xr-x | src/xdrv/wcmConfig.c | 8 | ||||
-rwxr-xr-x | src/xdrv/wcmUSB.c | 18 |
25 files changed, 533 insertions, 205 deletions
@@ -1,3 +1,7 @@ +2007-04-30 Ping Cheng <pingc@wacom.com> + * Fixed a xsetwacom button and a relative wheel bug + * label 0.7.7-9 + 2007-04-17 Ping Cheng <pingc@wacom.com> * Prepared for toggling CoreEvent option * Fixed bug 1698123 diff --git a/src/2.4.22/wacom.c b/src/2.4.22/wacom.c index 7f09ea8..c9abf2f 100644 --- a/src/2.4.22/wacom.c +++ b/src/2.4.22/wacom.c @@ -7,7 +7,7 @@ * Copyright (c) 2000 Daniel Egger <egger@suse.de> * Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com> * Copyright (c) 2002 Christer Nilsson <christer.nilsson@kretskompaniet.se> - * Copyright (c) 2002-2006 Ping Cheng <pingc@wacom.com> + * Copyright (c) 2002-2007 Ping Cheng <pingc@wacom.com> * Copyright (c) 2002 John Joganic <john@joganic.com> * * USB Wacom Graphire and Intuos tablet support @@ -88,6 +88,7 @@ * 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 + * v1.30-j0.7.8 - Added Bamboo */ /* @@ -118,7 +119,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.30-j0.7.7" +#define DRIVER_VERSION "v1.30-j0.7.8" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@suse.cz>" #ifndef __JEJ_DEBUG #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver (LINUXWACOM)" @@ -432,15 +433,14 @@ static void wacom_graphire_irq(struct urb *urb) input_report_key(dev, BTN_STYLUS, 0); input_report_key(dev, BTN_STYLUS2, 0); } - input_report_abs(dev, ABS_MISC, 0); /* reset tool id */ input_report_key(dev, wacom->tool[0], 0); + input_report_abs(dev, ABS_MISC, 0); /* reset tool id */ + input_report_key(dev, wacom->tool[0], 0); } input_event(dev, EV_MSC, MSC_SERIAL, data[1] & 0x01); /* send pad data */ - if ( strstr(wacom->features->name, "Graphire4") ) - { - if ( (wacom->serial[1] & 0xc0) != (data[7] & 0xf8) ) - { + if ( strstr(wacom->features->name, "Graphire4") ) { + if ( (wacom->serial[1] & 0xc0) != (data[7] & 0xf8) ) { wacom->id[1] = 1; wacom->serial[1] = (data[7] & 0xf8); input_report_key(dev, BTN_0, (data[7] & 0x40)); @@ -457,6 +457,30 @@ static void wacom_graphire_irq(struct urb *urb) input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } } + if ( strstr(wacom->features->name, "Bamboo") ) { + if ((data[7] & 0xf8) || (data[8] & 0x80)) { + wacom->id[1] = 1; + wacom->serial[1] = (data[7] & 0xf8); + input_report_key(dev, BTN_0, (data[7] & 0x08)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x10)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + 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_0, (data[7] & 0x40)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x80)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, 0); + input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); + } + } } static int wacom_intuos_inout(struct urb *urb) @@ -752,6 +776,8 @@ static void wacom_intuos_irq(struct urb *urb) #define WACOM_GRAPHIRE_REL (BIT(REL_WHEEL)) #define WACOM_G4_TOOLS (BIT(BTN_TOOL_FINGER)) #define WACOM_G4_BUTTONS (BIT(BTN_0) | BIT(BTN_4)) +#define WACOM_MO_BUTTONS (WACOM_G4_BUTTONS | BIT(BTN_1) | BIT(BTN_5)) +#define WACOM_MO_ABS (BIT(ABS_RX)) #define WACOM_INTUOS_TOOLS (BIT(BTN_TOOL_BRUSH) | BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS)) #define WACOM_INTUOS3_TOOLS (WACOM_INTUOS_TOOLS | BIT(BTN_TOOL_FINGER)) #define WACOM_INTUOS_BUTTONS (BIT(BTN_SIDE) | BIT(BTN_EXTRA)) @@ -847,47 +873,50 @@ struct wacom_features wacom_features[] = { wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, 0, 0 }, /* 27 */ { "Wacom PenPartner2", 8, 3250, 2320, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, 0, 0 }, - /* 28 */ { "Wacom Graphire3 4x5", 8, 10208, 7424, 511, 32, + /* 28 */ { "Wacom Bamboo", 8, 14760, 9225, 511, 32, + wacom_graphire_irq, WACOM_GRAPHIRE_BITS, WACOM_MO_ABS, + WACOM_GRAPHIRE_REL, WACOM_MO_BUTTONS, WACOM_G4_TOOLS }, + /* 29 */ { "Wacom Graphire3 4x5", 8, 10208, 7424, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, 0 }, - /* 29 */ { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 32, + /* 30 */ { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, 0 }, - /* 30 */ { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 32, + /* 31 */ { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, WACOM_G4_BUTTONS, WACOM_G4_TOOLS }, - /* 31 */ { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 32, + /* 32 */ { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, WACOM_G4_BUTTONS, WACOM_G4_TOOLS }, - /* 32 */ { "Wacom Cintiq Partner", 8, 20480, 15360, 511, 32, + /* 33 */ { "Wacom Cintiq Partner", 8, 20480, 15360, 511, 32, wacom_ptu_irq, 0, 0, 0, 0 }, /* Intuos3 */ - /* 33 */ { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 15, + /* 34 */ { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3S_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3S_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 34 */ { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 15, + /* 35 */ { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 35 */ { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 15, + /* 36 */ { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 36 */ { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 15, + /* 37 */ { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 37 */ { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 15, + /* 38 */ { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 38 */ { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 15, + /* 39 */ { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 39 */ { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 15, + /* 40 */ { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, /* Protocol 5 Cintiq */ - /* 40 */ { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 15, + /* 41 */ { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 41 */ { "Wacom DTF720", 8, 6858, 5506, 511, 32, + /* 42 */ { "Wacom DTF720", 8, 6858, 5506, 511, 32, wacom_pl_irq, 0, 0, 0, 0 }, - /* 42 */ { "Wacom DTF521", 8, 6282, 4762, 511, 32, + /* 43 */ { "Wacom DTF521", 8, 6282, 4762, 511, 32, wacom_pl_irq, 0, 0, 0, 0 }, { NULL , 0 } }; @@ -921,21 +950,22 @@ struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62), driver_info: 25 }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63), driver_info: 26 }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64), driver_info: 27 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x13), driver_info: 28 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14), driver_info: 29 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15), driver_info: 30 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16), driver_info: 31 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03), driver_info: 32 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB0), driver_info: 33 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB1), driver_info: 34 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB2), driver_info: 35 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB3), driver_info: 36 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB4), driver_info: 37 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5), driver_info: 38 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7), driver_info: 39 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F), driver_info: 40 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0), driver_info: 41 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4), driver_info: 42 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65), driver_info: 28 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x13), driver_info: 29 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14), driver_info: 30 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15), driver_info: 31 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16), driver_info: 32 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03), driver_info: 33 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB0), driver_info: 34 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB1), driver_info: 35 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB2), driver_info: 36 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB3), driver_info: 37 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB4), driver_info: 38 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5), driver_info: 39 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7), driver_info: 40 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F), driver_info: 41 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0), driver_info: 42 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4), driver_info: 43 }, /* some Intuos2 6x8's erroneously report as 0x47; * multiple confirmed examples exist. */ diff --git a/src/2.4.30x86-64/wacom.c b/src/2.4.30x86-64/wacom.c index 3fb9b98..e55c74d 100644 --- a/src/2.4.30x86-64/wacom.c +++ b/src/2.4.30x86-64/wacom.c @@ -7,7 +7,7 @@ * Copyright (c) 2000 Daniel Egger <egger@suse.de> * Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com> * Copyright (c) 2002 Christer Nilsson <christer.nilsson@kretskompaniet.se> - * Copyright (c) 2002-2006 Ping Cheng <pingc@wacom.com> + * Copyright (c) 2002-2007 Ping Cheng <pingc@wacom.com> * Copyright (c) 2002 John Joganic <john@joganic.com> * * USB Wacom Graphire and Intuos tablet support @@ -57,6 +57,7 @@ * 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 + * v2.4.30-pc0.7.8 - Added Bamboo */ /* @@ -87,7 +88,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v2.4.30-pc0.7.7" +#define DRIVER_VERSION "v2.4.30-pc0.7.8" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@suse.cz>" #ifndef __JEJ_DEBUG #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver (LINUXWACOM)" @@ -382,10 +383,8 @@ static void wacom_graphire_irq(struct urb *urb) input_event(dev, EV_MSC, MSC_SERIAL, data[1] & 0x01); /* send pad data */ - if ( strstr(wacom->features->name, "Graphire4") ) - { - if ( (wacom->serial[1] & 0xc0) != (data[7] & 0xf8) ) - { + if ( strstr(wacom->features->name, "Graphire4") ) { + if ( (wacom->serial[1] & 0xc0) != (data[7] & 0xf8) ) { wacom->id[1] = 1; wacom->serial[1] = (data[7] & 0xf8); input_report_key(dev, BTN_0, (data[7] & 0x40)); @@ -402,6 +401,30 @@ static void wacom_graphire_irq(struct urb *urb) input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } } + if ( strstr(wacom->features->name, "Bamboo") ) { + if ((data[7] & 0xf8) || (data[8] & 0x80)) { + wacom->id[1] = 1; + wacom->serial[1] = (data[7] & 0xf8); + input_report_key(dev, BTN_0, (data[7] & 0x08)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x10)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + 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_0, (data[7] & 0x40)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x80)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, 0); + input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); + } + } } static int wacom_intuos_inout(struct urb *urb) @@ -696,6 +719,8 @@ static void wacom_intuos_irq(struct urb *urb) #define WACOM_GRAPHIRE_REL (BIT(REL_WHEEL)) #define WACOM_G4_TOOLS (BIT(BTN_TOOL_FINGER)) #define WACOM_G4_BUTTONS (BIT(BTN_0) | BIT(BTN_4)) +#define WACOM_MO_BUTTONS (WACOM_G4_BUTTONS | BIT(BTN_1) | BIT(BTN_5)) +#define WACOM_MO_ABS (BIT(ABS_RX)) #define WACOM_INTUOS_TOOLS (BIT(BTN_TOOL_BRUSH) | BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS)) #define WACOM_INTUOS3_TOOLS (WACOM_INTUOS_TOOLS | BIT(BTN_TOOL_FINGER)) #define WACOM_INTUOS_BUTTONS (BIT(BTN_SIDE) | BIT(BTN_EXTRA)) @@ -791,47 +816,50 @@ struct wacom_features wacom_features[] = { wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, 0, 0 }, /* 27 */ { "Wacom PenPartner2", 8, 3250, 2320, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, 0, 0 }, - /* 28 */ { "Wacom Graphire3 4x5", 8, 10208, 7424, 511, 32, + /* 28 */ { "Wacom Bamboo", 8, 14760, 9225, 511, 32, + wacom_graphire_irq, WACOM_GRAPHIRE_BITS, WACOM_MO_ABS, + WACOM_GRAPHIRE_REL, WACOM_MO_BUTTONS, WACOM_G4_TOOLS }, + /* 29 */ { "Wacom Graphire3 4x5", 8, 10208, 7424, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, 0 }, - /* 29 */ { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 32, + /* 30 */ { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, 0 }, - /* 30 */ { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 32, + /* 31 */ { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, WACOM_G4_BUTTONS, WACOM_G4_TOOLS }, - /* 31 */ { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 32, + /* 32 */ { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, WACOM_G4_BUTTONS, WACOM_G4_TOOLS }, - /* 32 */ { "Wacom Cintiq Partner", 8, 20480, 15360, 511, 32, + /* 33 */ { "Wacom Cintiq Partner", 8, 20480, 15360, 511, 32, wacom_ptu_irq, 0, 0, 0, 0 }, /* Intuos3 */ - /* 33 */ { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 15, + /* 34 */ { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3S_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3S_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 34 */ { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 15, + /* 35 */ { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 35 */ { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 15, + /* 36 */ { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 36 */ { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 15, + /* 37 */ { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 37 */ { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 15, + /* 38 */ { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 38 */ { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 15, + /* 39 */ { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 39 */ { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 15, + /* 40 */ { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3S_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3S_BUTTONS, WACOM_INTUOS3_TOOLS }, /* Protocol 5 Cintiq */ - /* 40 */ { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 15, + /* 41 */ { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 41 */ { "Wacom DTF720", 8, 6858, 5506, 511, 32, + /* 42 */ { "Wacom DTF720", 8, 6858, 5506, 511, 32, wacom_pl_irq, 0, 0, 0, 0 }, - /* 42 */ { "Wacom DTF521", 8, 6282, 4762, 511, 32, + /* 43 */ { "Wacom DTF521", 8, 6282, 4762, 511, 32, wacom_pl_irq, 0, 0, 0, 0 }, { NULL , 0 } @@ -866,21 +894,22 @@ struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62), driver_info: 25 }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63), driver_info: 26 }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64), driver_info: 27 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x13), driver_info: 28 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14), driver_info: 29 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15), driver_info: 30 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16), driver_info: 31 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03), driver_info: 32 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB0), driver_info: 33 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB1), driver_info: 34 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB2), driver_info: 35 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB3), driver_info: 36 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB4), driver_info: 37 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5), driver_info: 38 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7), driver_info: 39 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F), driver_info: 40 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0), driver_info: 41 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4), driver_info: 42 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65), driver_info: 28 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x13), driver_info: 29 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14), driver_info: 30 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15), driver_info: 31 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16), driver_info: 32 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03), driver_info: 33 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB0), driver_info: 34 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB1), driver_info: 35 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB2), driver_info: 36 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB3), driver_info: 37 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB4), driver_info: 38 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5), driver_info: 39 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7), driver_info: 40 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F), driver_info: 41 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0), driver_info: 42 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4), driver_info: 43 }, /* some Intuos2 6x8's erroneously report as 0x47; * multiple confirmed examples exist. */ diff --git a/src/2.4/wacom.c b/src/2.4/wacom.c index 6b4e472..de0fc66 100644 --- a/src/2.4/wacom.c +++ b/src/2.4/wacom.c @@ -7,7 +7,7 @@ * Copyright (c) 2000 Daniel Egger <egger@suse.de> * Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com> * Copyright (c) 2002 Christer Nilsson <christer.nilsson@kretskompaniet.se> - * Copyright (c) 2002-2006 Ping Cheng <pingc@wacom.com> + * Copyright (c) 2002-2007 Ping Cheng <pingc@wacom.com> * Copyright (c) 2002 John Joganic <john@joganic.com> * * USB Wacom Graphire and Intuos tablet support @@ -88,6 +88,7 @@ * 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 + * v1.30-j0.7.8 - Added Bamboo */ /* @@ -118,7 +119,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.30-j0.7.7" +#define DRIVER_VERSION "v1.30-j0.7.8" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@suse.cz>" #ifndef __JEJ_DEBUG #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver (LINUXWACOM)" @@ -436,10 +437,8 @@ static void wacom_graphire_irq(struct urb *urb) input_event(dev, EV_MSC, MSC_SERIAL, data[1] & 0x01); /* send pad data */ - if ( strstr(wacom->features->name, "Graphire4") ) - { - if ( (wacom->serial[1] & 0xc0) != (data[7] & 0xf8) ) - { + if ( strstr(wacom->features->name, "Graphire4") ) { + if ( (wacom->serial[1] & 0xc0) != (data[7] & 0xf8) ) { wacom->id[1] = 1; wacom->serial[1] = (data[7] & 0xf8); input_report_key(dev, BTN_0, (data[7] & 0x40)); @@ -457,6 +456,30 @@ static void wacom_graphire_irq(struct urb *urb) input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } } + if ( strstr(wacom->features->name, "Bamboo") ) { + if ((data[7] & 0xf8) || (data[8] & 0x80)) { + wacom->id[1] = 1; + wacom->serial[1] = (data[7] & 0xf8); + input_report_key(dev, BTN_0, (data[7] & 0x08)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x10)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + 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_0, (data[7] & 0x40)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x80)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, 0); + input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); + } + } } static int wacom_intuos_inout(struct urb *urb) @@ -753,6 +776,8 @@ static void wacom_intuos_irq(struct urb *urb) #define WACOM_GRAPHIRE_REL (BIT(REL_WHEEL)) #define WACOM_G4_TOOLS (BIT(BTN_TOOL_FINGER)) #define WACOM_G4_BUTTONS (BIT(BTN_0) | BIT(BTN_4)) +#define WACOM_MO_BUTTONS (WACOM_G4_BUTTONS | BIT(BTN_1) | BIT(BTN_5)) +#define WACOM_MO_ABS (BIT(ABS_RX)) #define WACOM_INTUOS_TOOLS (BIT(BTN_TOOL_BRUSH) | BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_LENS)) #define WACOM_INTUOS3_TOOLS (WACOM_INTUOS_TOOLS | BIT(BTN_TOOL_FINGER)) #define WACOM_INTUOS_BUTTONS (BIT(BTN_SIDE) | BIT(BTN_EXTRA)) @@ -848,47 +873,50 @@ struct wacom_features wacom_features[] = { wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, 0, 0 }, /* 27 */ { "Wacom PenPartner2", 8, 3250, 2320, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, 0, 0 }, - /* 28 */ { "Wacom Graphire3 4x5", 8, 10208, 7424, 511, 32, + /* 28 */ { "Wacom Bamboo", 8, 14760, 9225, 511, 32, + wacom_graphire_irq, WACOM_GRAPHIRE_BITS, WACOM_MO_ABS, + WACOM_GRAPHIRE_REL, WACOM_MO_BUTTONS, WACOM_G4_TOOLS }, + /* 29 */ { "Wacom Graphire3 4x5", 8, 10208, 7424, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, 0 }, - /* 29 */ { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 32, + /* 30 */ { "Wacom Graphire3 6x8", 8, 16704, 12064, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, 0 }, - /* 30 */ { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 32, + /* 31 */ { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, WACOM_G4_BUTTONS, WACOM_G4_TOOLS }, - /* 31 */ { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 32, + /* 32 */ { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 32, wacom_graphire_irq, WACOM_GRAPHIRE_BITS, 0, WACOM_GRAPHIRE_REL, WACOM_G4_BUTTONS, WACOM_G4_TOOLS }, - /* 32 */ { "Wacom Cintiq Partner", 8, 20480, 15360, 511, 32, + /* 33 */ { "Wacom Cintiq Partner", 8, 20480, 15360, 511, 32, wacom_ptu_irq, 0, 0, 0, 0 }, /* Intuos3 */ - /* 33 */ { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 15, + /* 34 */ { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3S_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3S_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 34 */ { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 15, + /* 35 */ { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 35 */ { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 15, + /* 36 */ { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 36 */ { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 15, + /* 37 */ { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 37 */ { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 15, + /* 38 */ { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 38 */ { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 15, + /* 39 */ { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 39 */ { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 15, + /* 40 */ { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3S_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3S_BUTTONS, WACOM_INTUOS3_TOOLS }, /* Protocol 5 Cintiq */ - /* 40 */ { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 15, + /* 41 */ { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 15, wacom_intuos_irq, WACOM_INTUOS_BITS, WACOM_INTUOS3_ABS, WACOM_INTUOS_REL, WACOM_INTUOS3_BUTTONS, WACOM_INTUOS3_TOOLS }, - /* 41 */ { "Wacom DTF720", 8, 6858, 5506, 511, 32, + /* 42 */ { "Wacom DTF720", 8, 6858, 5506, 511, 32, wacom_pl_irq, 0, 0, 0, 0 }, - /* 42 */ { "Wacom DTF521", 8, 6282, 4762, 511, 32, + /* 43 */ { "Wacom DTF521", 8, 6282, 4762, 511, 32, wacom_pl_irq, 0, 0, 0, 0 }, { NULL , 0 } }; @@ -922,21 +950,22 @@ struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62), driver_info: 25 }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63), driver_info: 26 }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64), driver_info: 27 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x13), driver_info: 28 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14), driver_info: 29 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15), driver_info: 30 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16), driver_info: 31 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03), driver_info: 32 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB0), driver_info: 33 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB1), driver_info: 34 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB2), driver_info: 35 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB3), driver_info: 36 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB4), driver_info: 37 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5), driver_info: 38 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7), driver_info: 39 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F), driver_info: 40 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0), driver_info: 41 }, - { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4), driver_info: 42 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65), driver_info: 28 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x13), driver_info: 29 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x14), driver_info: 30 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15), driver_info: 31 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16), driver_info: 32 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03), driver_info: 33 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB0), driver_info: 34 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB1), driver_info: 35 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB2), driver_info: 36 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB3), driver_info: 37 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB4), driver_info: 38 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB5), driver_info: 39 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xB7), driver_info: 40 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x3F), driver_info: 41 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0), driver_info: 42 }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4), driver_info: 43 }, /* some Intuos2 6x8's erroneously report as 0x47; * multiple confirmed examples exist. */ diff --git a/src/2.6.10/wacom.c b/src/2.6.10/wacom.c index 6d4b94a..51a8571 100644 --- a/src/2.6.10/wacom.c +++ b/src/2.6.10/wacom.c @@ -64,6 +64,7 @@ * 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 + * v1.40-2.6.10-pc-0.10 - Added Bamboo */ /* @@ -85,7 +86,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.40 - 2.6.10-pc-0.9" +#define DRIVER_VERSION "v1.40 - 2.6.10-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" @@ -111,6 +112,7 @@ enum { INTUOS3, INTUOS3L, CINTIQ, + MO, MAX_TYPE }; @@ -484,8 +486,8 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) input_sync(dev); /* send pad data */ - if ( wacom->features->type == G4 ) - { + switch (wacom->features->type) { + case G4: if ( (wacom->serial[1] & 0xc0) != (data[7] & 0xf8) ) { wacom->id[1] = 1; wacom->serial[1] = (data[7] & 0xf8); @@ -503,6 +505,32 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } input_sync(dev); + break; + case MO: + if ((data[7] & 0xf8) || (data[8] & 0x80)) { + wacom->id[1] = 1; + wacom->serial[1] = (data[7] & 0xf8); + input_report_key(dev, BTN_0, (data[7] & 0x08)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x10)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + 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_0, (data[7] & 0x40)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x80)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, 0); + input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); + } + input_sync(dev); + break; } exit: @@ -584,25 +612,25 @@ static int wacom_intuos_inout(struct urb *urb) /* Exit report */ if ((data[1] & 0xfe) == 0x80) { - wacom_report_abs(wcombo, ABS_X, 0); - wacom_report_abs(wcombo, ABS_Y, 0); - wacom_report_abs(wcombo, ABS_DISTANCE, 0); + input_report_abs(dev, ABS_X, 0); + input_report_abs(dev, ABS_Y, 0); + input_report_abs(dev, ABS_DISTANCE, 0); if (wacom->tool[idx] >= BTN_TOOL_MOUSE) { - wacom_report_key(wcombo, BTN_LEFT, 0); - wacom_report_key(wcombo, BTN_MIDDLE, 0); - wacom_report_key(wcombo, BTN_RIGHT, 0); - wacom_report_key(wcombo, BTN_SIDE, 0); - wacom_report_key(wcombo, BTN_EXTRA, 0); - wacom_report_abs(wcombo, ABS_THROTTLE, 0); - wacom_report_abs(wcombo, ABS_RZ, 0); + input_report_key(dev, BTN_LEFT, 0); + input_report_key(dev, BTN_MIDDLE, 0); + input_report_key(dev, BTN_RIGHT, 0); + input_report_key(dev, BTN_SIDE, 0); + input_report_key(dev, BTN_EXTRA, 0); + input_report_abs(dev, ABS_THROTTLE, 0); + input_report_abs(dev, ABS_RZ, 0); } else { - wacom_report_abs(wcombo, ABS_PRESSURE, 0); - wacom_report_abs(wcombo, ABS_TILT_X, 0); - wacom_report_abs(wcombo, ABS_TILT_Y, 0); - wacom_report_key(wcombo, BTN_STYLUS, 0); - wacom_report_key(wcombo, BTN_STYLUS2, 0); - wacom_report_key(wcombo, BTN_TOUCH, 0); - wacom_report_abs(wcombo, ABS_WHEEL, 0); + input_report_abs(dev, ABS_PRESSURE, 0); + input_report_abs(dev, ABS_TILT_X, 0); + input_report_abs(dev, ABS_TILT_Y, 0); + input_report_key(dev, BTN_STYLUS, 0); + input_report_key(dev, BTN_STYLUS2, 0); + input_report_key(dev, BTN_TOUCH, 0); + input_report_abs(dev, ABS_WHEEL, 0); } input_report_key(dev, wacom->tool[idx], 0); input_report_abs(dev, ABS_MISC, 0); /* reset tool id */ @@ -811,7 +839,7 @@ exit: } static struct wacom_features wacom_features[] = { - { "Wacom Penpartner", 7, 5040, 3780, 255, 0, PENPARTNER, wacom_penpartner_irq }, + { "Wacom Penpartner", 7, 5040, 3780, 255, 0, PENPARTNER, wacom_penpartner_irq }, { "Wacom Graphire", 8, 10206, 7422, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom Graphire2 4x5", 8, 10206, 7422, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom Graphire2 5x7", 8, 13918, 10206, 511, 63, GRAPHIRE, wacom_graphire_irq }, @@ -822,38 +850,39 @@ static struct wacom_features wacom_features[] = { { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos 12x12", 10, 30480, 31680, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos 12x18", 10, 45720, 31680, 1023, 31, INTUOS, wacom_intuos_irq }, - { "Wacom PL400", 8, 5408, 4056, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL500", 8, 6144, 4608, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL600", 8, 6126, 4604, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL600SX", 8, 6260, 5016, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL550", 8, 6144, 4608, 511, 0, PL, wacom_pl_irq }, - { "Wacom PL800", 8, 7220, 5780, 511, 0, PL, wacom_pl_irq }, - { "Wacom PL700", 8, 6758, 5406, 511, 0, PL, wacom_pl_irq }, - { "Wacom PL510", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, - { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL, wacom_pl_irq }, - { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, + { "Wacom PL400", 8, 5408, 4056, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL500", 8, 6144, 4608, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL600", 8, 6126, 4604, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL600SX", 8, 6260, 5016, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL550", 8, 6144, 4608, 511, 0, PL, wacom_pl_irq }, + { "Wacom PL800", 8, 7220, 5780, 511, 0, PL, wacom_pl_irq }, + { "Wacom PL700", 8, 6758, 5406, 511, 0, PL, wacom_pl_irq }, + { "Wacom PL510", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, + { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL, wacom_pl_irq }, + { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos2 9x12", 10, 30480, 24060, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos2 12x12", 10, 30480, 31680, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos2 12x18", 10, 45720, 31680, 1023, 31, INTUOS, wacom_intuos_irq }, - { "Wacom Volito", 8, 5104, 3712, 511, 63, GRAPHIRE, wacom_graphire_irq }, + { "Wacom Volito", 8, 5104, 3712, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom PenStation2", 8, 3250, 2320, 255, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom PenPartner2", 8, 3250, 2320, 255, 63, GRAPHIRE, wacom_graphire_irq }, + { "Wacom Bamboo", 8, 14760, 9225, 511, 63, MO, wacom_graphire_irq }, { "Wacom Graphire4 4x5", 8, 10208, 7424, 511, 63, G4, wacom_graphire_irq }, { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, G4, wacom_graphire_irq }, - { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PL, wacom_ptu_irq }, - { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 63, INTUOS3S, wacom_intuos_irq }, + { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PL, wacom_ptu_irq }, + { "Wacom Intuos3 4x5", 10, 25400, 20320, 1023, 63, INTUOS3S, wacom_intuos_irq }, { "Wacom Intuos3 6x8", 10, 40640, 30480, 1023, 63, INTUOS3, wacom_intuos_irq }, { "Wacom Intuos3 9x12", 10, 60960, 45720, 1023, 63, INTUOS3, wacom_intuos_irq }, - { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 63, INTUOS3L, wacom_intuos_irq }, - { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 63, INTUOS3L, wacom_intuos_irq }, + { "Wacom Intuos3 12x12", 10, 60960, 60960, 1023, 63, INTUOS3L, wacom_intuos_irq }, + { "Wacom Intuos3 12x19", 10, 97536, 60960, 1023, 63, INTUOS3L, wacom_intuos_irq }, { "Wacom Intuos3 6x11", 10, 54204, 31750, 1023, 63, INTUOS3, wacom_intuos_irq }, { "Wacom Intuos3 4x6", 10, 31496, 19685, 1023, 63, INTUOS3S, wacom_intuos_irq }, { "Wacom Cintiq 21UX", 10, 87200, 65600, 1023, 63, CINTIQ, wacom_intuos_irq }, - { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL, wacom_pl_irq }, + { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL, wacom_pl_irq }, { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS, wacom_intuos_irq }, { } }; @@ -889,6 +918,7 @@ static struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x15) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03) }, @@ -965,6 +995,11 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); switch (wacom->features->type) { + case MO: + wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5); + wacom->dev.absbit[0] |= BIT(ABS_RX); + wacom->dev.absmax[ABS_RX] = 71; + case G4: wacom->dev.evbit[0] |= BIT(EV_MSC); wacom->dev.mscbit[0] |= BIT(MSC_SERIAL); @@ -985,12 +1020,14 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i case CINTIQ: wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7); wacom->dev.absbit[0] |= BIT(ABS_RY); + wacom->dev.absmax[ABS_RY] = 4096; /* fall through */ case INTUOS3S: wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3); wacom->dev.absbit[0] |= BIT(ABS_RX); + wacom->dev.absmax[ABS_RX] = 4096; /* fall through */ case INTUOS: @@ -1020,8 +1057,6 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i wacom->dev.absmax[ABS_TILT_Y] = 127; wacom->dev.absmax[ABS_WHEEL] = 1023; - wacom->dev.absmax[ABS_RX] = 4096; - wacom->dev.absmax[ABS_RY] = 4096; wacom->dev.absmin[ABS_RZ] = -900; wacom->dev.absmax[ABS_RZ] = 899; wacom->dev.absmin[ABS_THROTTLE] = -1023; diff --git a/src/2.6.11/wacom.h b/src/2.6.11/wacom.h index 1d4b82b..0027e22 100755 --- a/src/2.6.11/wacom.h +++ b/src/2.6.11/wacom.h @@ -11,7 +11,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 @@ -85,7 +85,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.46" +#define DRIVER_VERSION "v1.46-pc0.1" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" #define DRIVER_LICENSE "GPL" @@ -120,6 +120,7 @@ extern void wacom_input_event(void *wcombo, unsigned int type, unsigned int code extern void wacom_input_regs(void *wcombo); extern void wacom_input_sync(void *wcombo); extern void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac); +extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac); diff --git a/src/2.6.11/wacom_sys.c b/src/2.6.11/wacom_sys.c index 6a14d59..647a16f 100755 --- a/src/2.6.11/wacom_sys.c +++ b/src/2.6.11/wacom_sys.c @@ -151,6 +151,12 @@ static void wacom_close(struct input_dev *dev) usb_kill_urb(wacom->irq); } +void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac) +{ + input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5); + input_set_abs_params(input_dev, ABS_RX, 0, 71, 0, 0); +} + void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac) { input_dev->evbit[0] |= BIT(EV_MSC); diff --git a/src/2.6.13/wacom.h b/src/2.6.13/wacom.h index cabab68..e4a0dbc 100755 --- a/src/2.6.13/wacom.h +++ b/src/2.6.13/wacom.h @@ -11,7 +11,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 @@ -65,6 +65,7 @@ * v1.43-2.6.13.1-pc-0.2 - added DTF 521, I3 12x12, and I3 12x19 * v1.43-2.6.13.1-pc-0.3 - Support tablet buttons/keys * v1.43-2.6.13.1-pc-0.4 - Split wacom.c into 4 files + * v1.43-2.6.13.1-pc-0.5 - added Bamboo */ /* @@ -88,7 +89,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.43-2.6.13.1-pc-0.4" +#define DRIVER_VERSION "v1.43-2.6.13.1-pc-0.5" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" #define DRIVER_LICENSE "GPL" @@ -123,6 +124,7 @@ extern void wacom_input_event(void *wcombo, unsigned int type, unsigned int code extern void wacom_input_regs(void *wcombo); extern void wacom_input_sync(void *wcombo); extern void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac); +extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac); diff --git a/src/2.6.13/wacom_sys.c b/src/2.6.13/wacom_sys.c index 6583b22..b72d673 100755 --- a/src/2.6.13/wacom_sys.c +++ b/src/2.6.13/wacom_sys.c @@ -151,6 +151,12 @@ static void wacom_close(struct input_dev *dev) usb_kill_urb(wacom->irq); } +void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac) +{ + input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5); + input_set_abs_params(input_dev, ABS_RX, 0, 71, 0, 0); +} + void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac) { input_dev->evbit[0] |= BIT(EV_MSC); diff --git a/src/2.6.15/wacom_sys.c b/src/2.6.15/wacom_sys.c index aecef9f..640742b 100755 --- a/src/2.6.15/wacom_sys.c +++ b/src/2.6.15/wacom_sys.c @@ -145,6 +145,12 @@ static void wacom_close(struct input_dev *dev) usb_kill_urb(wacom->irq); } +void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac) +{ + input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5); + input_set_abs_params(input_dev, ABS_RX, 0, 71, 0, 0); +} + void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac) { input_dev->evbit[0] |= BIT(EV_MSC); diff --git a/src/2.6.16/wacom.h b/src/2.6.16/wacom.h index e760ca7..d1fd388 100644 --- a/src/2.6.16/wacom.h +++ b/src/2.6.16/wacom.h @@ -11,7 +11,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 @@ -86,7 +86,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.46" +#define DRIVER_VERSION "v1.46-pc0.1" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" #define DRIVER_LICENSE "GPL" @@ -120,6 +120,7 @@ extern void wacom_input_event(void *wcombo, unsigned int type, unsigned int code extern void wacom_input_regs(void *wcombo); extern void wacom_input_sync(void *wcombo); extern void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac); +extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac); diff --git a/src/2.6.16/wacom_sys.c b/src/2.6.16/wacom_sys.c index cc8de47..2aeb797 100644 --- a/src/2.6.16/wacom_sys.c +++ b/src/2.6.16/wacom_sys.c @@ -145,6 +145,12 @@ static void wacom_close(struct input_dev *dev) usb_kill_urb(wacom->irq); } +void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac) +{ + input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5); + input_set_abs_params(input_dev, ABS_RX, 0, 71, 0, 0); +} + void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac) { input_dev->evbit[0] |= BIT(EV_MSC); diff --git a/src/2.6.16/wacom_wac.c b/src/2.6.16/wacom_wac.c index a807ec6..319a80f 100644 --- a/src/2.6.16/wacom_wac.c +++ b/src/2.6.16/wacom_wac.c @@ -233,7 +233,8 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) } /* send pad data */ - if (wacom->features->type == WACOM_G4) { + switch (wacom->features->type) { + case WACOM_G4: if (data[7] & 0xf8) { wacom_input_sync(wcombo); /* sync last event */ wacom->id[1] = 1; @@ -254,6 +255,33 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) wacom_report_abs(wcombo, ABS_MISC, 0); wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0); } + break; + case WACOM_MO: + if ((data[7] & 0xf8) || (data[8] & 0x80)) { + wacom_input_sync(wcombo); /* sync last event */ + wacom->id[1] = 1; + wacom->serial[1] = (data[7] & 0xf8); + wacom_report_key(wcombo, BTN_0, (data[7] & 0x08)); + wacom_report_key(wcombo, BTN_1, (data[7] & 0x20)); + wacom_report_key(wcombo, BTN_4, (data[7] & 0x10)); + wacom_report_key(wcombo, BTN_5, (data[7] & 0x40)); + wacom_report_abs(wcombo, ABS_RX, (data[8] & 0x7f)); + 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 */ + wacom->id[1] = 0; + wacom_report_key(wcombo, BTN_0, (data[7] & 0x40)); + wacom_report_key(wcombo, BTN_1, (data[7] & 0x20)); + wacom_report_key(wcombo, BTN_4, (data[7] & 0x80)); + wacom_report_key(wcombo, BTN_5, (data[7] & 0x40)); + wacom_report_abs(wcombo, ABS_RX, (data[8] & 0x7f)); + wacom_report_key(wcombo, BTN_TOOL_FINGER, 0); + wacom_report_abs(wcombo, ABS_MISC, 0); + wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0); + } + break; } return 1; } @@ -523,6 +551,7 @@ int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo) case PL: return (wacom_pl_irq(wacom_wac, wcombo)); break; + case WACOM_MO: case WACOM_G4: case GRAPHIRE: return (wacom_graphire_irq(wacom_wac, wcombo)); @@ -546,6 +575,8 @@ int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo) void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac) { switch (wacom_wac->features->type) { + case WACOM_MO: + input_dev_mo(input_dev, wacom_wac); case WACOM_G4: input_dev_g4(input_dev, wacom_wac); /* fall through */ @@ -587,6 +618,7 @@ static struct wacom_features wacom_features[] = { { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE }, { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE }, { "Wacom PenPartner2", 8, 3250, 2320, 255, 63, GRAPHIRE }, + { "Wacom Bamboo", 8, 14760, 9225, 511, 63, WACOM_MO }, { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 31, INTUOS }, { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 31, INTUOS }, @@ -635,6 +667,7 @@ static struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) }, diff --git a/src/2.6.16/wacom_wac.h b/src/2.6.16/wacom_wac.h index a230222..25b283f 100644 --- a/src/2.6.16/wacom_wac.h +++ b/src/2.6.16/wacom_wac.h @@ -25,6 +25,7 @@ enum { INTUOS3, INTUOS3L, CINTIQ, + WACOM_MO, MAX_TYPE }; diff --git a/src/2.6.18/wacom.h b/src/2.6.18/wacom.h index f91cf53..186438f 100644 --- a/src/2.6.18/wacom.h +++ b/src/2.6.18/wacom.h @@ -11,7 +11,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 @@ -84,7 +84,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.46" +#define DRIVER_VERSION "v1.46-pc0.1" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" #define DRIVER_LICENSE "GPL" @@ -118,6 +118,7 @@ extern void wacom_input_event(void *wcombo, unsigned int type, unsigned int code extern void wacom_input_regs(void *wcombo); extern void wacom_input_sync(void *wcombo); extern void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac); +extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac); diff --git a/src/2.6.19/wacom.h b/src/2.6.19/wacom.h index d85abfc..be89750 100755 --- a/src/2.6.19/wacom.h +++ b/src/2.6.19/wacom.h @@ -11,7 +11,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 @@ -84,7 +84,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.46" +#define DRIVER_VERSION "v1.46-pc0.1" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" #define DRIVER_LICENSE "GPL" @@ -116,6 +116,7 @@ extern void wacom_report_key(void *wcombo, unsigned int key_type, int key_data); extern void wacom_input_event(void *wcombo, unsigned int type, unsigned int code, int value); extern void wacom_input_sync(void *wcombo); extern void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac); +extern void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_g(struct input_dev *input_dev, struct wacom_wac *wacom_wac); extern void input_dev_i3s(struct input_dev *input_dev, struct wacom_wac *wacom_wac); diff --git a/src/2.6.19/wacom_sys.c b/src/2.6.19/wacom_sys.c index 12b4274..5227934 100755 --- a/src/2.6.19/wacom_sys.c +++ b/src/2.6.19/wacom_sys.c @@ -138,6 +138,12 @@ static void wacom_close(struct input_dev *dev) usb_kill_urb(wacom->irq); } +void input_dev_mo(struct input_dev *input_dev, struct wacom_wac *wacom_wac) +{ + input_dev->keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5); + input_set_abs_params(input_dev, ABS_RX, 0, 71, 0, 0); +} + void input_dev_g4(struct input_dev *input_dev, struct wacom_wac *wacom_wac) { input_dev->evbit[0] |= BIT(EV_MSC); diff --git a/src/2.6.19/wacom_wac.c b/src/2.6.19/wacom_wac.c index 21bc041..daaf897 100755 --- a/src/2.6.19/wacom_wac.c +++ b/src/2.6.19/wacom_wac.c @@ -226,7 +226,8 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) } /* send pad data */ - if (wacom->features->type == WACOM_G4) { + switch (wacom->features->type) { + case WACOM_G4: if (data[7] & 0xf8) { wacom_input_sync(wcombo); /* sync last event */ wacom->id[1] = 1; @@ -247,6 +248,33 @@ static int wacom_graphire_irq(struct wacom_wac *wacom, void *wcombo) wacom_report_abs(wcombo, ABS_MISC, 0); wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0); } + break; + case WACOM_MO: + if ((data[7] & 0xf8) || (data[8] & 0x80)) { + wacom_input_sync(wcombo); /* sync last event */ + wacom->id[1] = 1; + wacom->serial[1] = (data[7] & 0xf8); + wacom_report_key(wcombo, BTN_0, (data[7] & 0x08)); + wacom_report_key(wcombo, BTN_1, (data[7] & 0x20)); + wacom_report_key(wcombo, BTN_4, (data[7] & 0x10)); + wacom_report_key(wcombo, BTN_5, (data[7] & 0x40)); + wacom_report_abs(wcombo, ABS_RX, (data[8] & 0x7f)); + 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 */ + wacom->id[1] = 0; + wacom_report_key(wcombo, BTN_0, (data[7] & 0x40)); + wacom_report_key(wcombo, BTN_1, (data[7] & 0x20)); + wacom_report_key(wcombo, BTN_4, (data[7] & 0x80)); + wacom_report_key(wcombo, BTN_5, (data[7] & 0x40)); + wacom_report_abs(wcombo, ABS_RX, (data[8] & 0x7f)); + wacom_report_key(wcombo, BTN_TOOL_FINGER, 0); + wacom_report_abs(wcombo, ABS_MISC, 0); + wacom_input_event(wcombo, EV_MSC, MSC_SERIAL, 0xf0); + } + break; } return 1; } @@ -517,6 +545,7 @@ int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo) break; case WACOM_G4: case GRAPHIRE: + case WACOM_MO: return (wacom_graphire_irq(wacom_wac, wcombo)); break; case PTU: @@ -538,6 +567,8 @@ int wacom_wac_irq(struct wacom_wac *wacom_wac, void *wcombo) void wacom_init_input_dev(struct input_dev *input_dev, struct wacom_wac *wacom_wac) { switch (wacom_wac->features->type) { + case WACOM_MO: + input_dev_mo(input_dev, wacom_wac); case WACOM_G4: input_dev_g4(input_dev, wacom_wac); /* fall through */ @@ -579,6 +610,7 @@ static struct wacom_features wacom_features[] = { { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE }, { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE }, { "Wacom PenPartner2", 8, 3250, 2320, 255, 63, GRAPHIRE }, + { "Wacom Bamboo", 8, 14760, 9225, 511, 63, WACOM_MO }, { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 31, INTUOS }, { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 31, INTUOS }, { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 31, INTUOS }, @@ -627,6 +659,7 @@ static struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) }, diff --git a/src/2.6.8/wacom.c b/src/2.6.8/wacom.c index 39823aa..3baab83 100644 --- a/src/2.6.8/wacom.c +++ b/src/2.6.8/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 @@ -66,6 +66,7 @@ * 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 + * v1.40-2.6.8-pc-0.12 - Added Bamboo */ /* @@ -87,7 +88,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.40 - 2.6.8-pc-0.11" +#define DRIVER_VERSION "v1.40 - 2.6.8-pc-0.12" #define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>" #define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver" #define DRIVER_LICENSE "GPL" @@ -112,6 +113,7 @@ enum { INTUOS3, INTUOS3L, CINTIQ, + MO, MAX_TYPE }; @@ -483,8 +485,8 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) input_sync(dev); /* send pad data */ - if ( wacom->features->type == G4 ) - { + switch (wacom->features->type) { + case G4: if ( (wacom->serial[1] & 0xc0) != (data[7] & 0xf8) ) { wacom->id[1] = 1; wacom->serial[1] = (data[7] & 0xf8); @@ -502,6 +504,32 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } input_sync(dev); + break; + case MO: + if ((data[7] & 0xf8) || (data[8] & 0x80)) { + wacom->id[1] = 1; + wacom->serial[1] = (data[7] & 0xf8); + input_report_key(dev, BTN_0, (data[7] & 0x08)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x10)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + 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_0, (data[7] & 0x40)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x80)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, 0); + input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); + } + input_sync(dev); + break; } exit: @@ -810,7 +838,7 @@ exit: } static struct wacom_features wacom_features[] = { - { "Wacom Penpartner", 7, 5040, 3780, 255, 0, PENPARTNER, wacom_penpartner_irq }, + { "Wacom Penpartner", 7, 5040, 3780, 255, 0, PENPARTNER, wacom_penpartner_irq }, { "Wacom Graphire", 8, 10206, 7422, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom Graphire2 4x5", 8, 10206, 7422, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom Graphire2 5x7", 8, 13918, 10206, 511, 63, GRAPHIRE, wacom_graphire_irq }, @@ -823,23 +851,24 @@ static struct wacom_features wacom_features[] = { { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom PenPartner2", 8, 3250, 2320, 255, 63, GRAPHIRE, wacom_graphire_irq }, + { "Wacom Bamboo", 8, 14760, 9225, 511, 63, MO, wacom_graphire_irq }, { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos 12x12", 10, 30480, 31680, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos 12x18", 10, 45720, 31680, 1023, 31, INTUOS, wacom_intuos_irq }, - { "Wacom PL400", 8, 5408, 4056, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL500", 8, 6144, 4608, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL600", 8, 6126, 4604, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL600SX", 8, 6260, 5016, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL550", 8, 6144, 4608, 511, 0, PL, wacom_pl_irq }, - { "Wacom PL800", 8, 7220, 5780, 511, 0, PL, wacom_pl_irq }, - { "Wacom PL700", 8, 6758, 5406, 511, 0, PL, wacom_pl_irq }, - { "Wacom PL510", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, - { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL, wacom_pl_irq }, - { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL, wacom_pl_irq }, - { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, - { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PL, wacom_ptu_irq }, + { "Wacom PL400", 8, 5408, 4056, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL500", 8, 6144, 4608, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL600", 8, 6126, 4604, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL600SX", 8, 6260, 5016, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL550", 8, 6144, 4608, 511, 0, PL, wacom_pl_irq }, + { "Wacom PL800", 8, 7220, 5780, 511, 0, PL, wacom_pl_irq }, + { "Wacom PL700", 8, 6758, 5406, 511, 0, PL, wacom_pl_irq }, + { "Wacom PL510", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, + { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL, wacom_pl_irq }, + { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL, wacom_pl_irq }, + { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, + { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PL, wacom_ptu_irq }, { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos2 9x12", 10, 30480, 24060, 1023, 31, INTUOS, wacom_intuos_irq }, @@ -871,6 +900,7 @@ static struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) }, @@ -964,6 +994,10 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); switch (wacom->features->type) { + case MO: + wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5); + wacom->dev.absbit[0] |= BIT(ABS_RX); + wacom->dev.absmax[ABS_RX] = 71; case G4: wacom->dev.evbit[0] |= BIT(EV_MSC); wacom->dev.mscbit[0] |= BIT(MSC_SERIAL); @@ -984,12 +1018,14 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i case CINTIQ: wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7); wacom->dev.absbit[0] |= BIT(ABS_RY); + wacom->dev.absmax[ABS_RY] = 4096; /* fall through */ case INTUOS3S: wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3); wacom->dev.absbit[0] |= BIT(ABS_RX); + wacom->dev.absmax[ABS_RX] = 4096; /* fall through */ case INTUOS: @@ -1019,8 +1055,6 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i wacom->dev.absmax[ABS_TILT_Y] = 127; wacom->dev.absmax[ABS_WHEEL] = 1023; - wacom->dev.absmax[ABS_RX] = 4096; - wacom->dev.absmax[ABS_RY] = 4096; wacom->dev.absmin[ABS_RZ] = -900; wacom->dev.absmax[ABS_RZ] = 899; wacom->dev.absmin[ABS_THROTTLE] = -1023; diff --git a/src/2.6.9/wacom.c b/src/2.6.9/wacom.c index 8cad260..0c497c9 100644 --- a/src/2.6.9/wacom.c +++ b/src/2.6.9/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 @@ -65,6 +65,7 @@ * 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 + * v1.40-2.6.9-pc-0.11 - Added Bamboo */ /* @@ -86,7 +87,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.40 - 2.6.9-pc-0.10" +#define DRIVER_VERSION "v1.40 - 2.6.9-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" @@ -111,6 +112,7 @@ enum { INTUOS3, INTUOS3L, CINTIQ, + MO, MAX_TYPE }; @@ -483,8 +485,8 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) input_sync(dev); /* send pad data */ - if ( wacom->features->type == G4 ) - { + switch (wacom->features->type) { + case G4: if ( (wacom->serial[1] & 0xc0) != (data[7] & 0xf8) ) { wacom->id[1] = 1; wacom->serial[1] = (data[7] & 0xf8); @@ -502,6 +504,32 @@ static void wacom_graphire_irq(struct urb *urb, struct pt_regs *regs) input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); } input_sync(dev); + break; + case MO: + if ((data[7] & 0xf8) || (data[8] & 0x80)) { + wacom->id[1] = 1; + wacom->serial[1] = (data[7] & 0xf8); + input_report_key(dev, BTN_0, (data[7] & 0x08)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x10)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + 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_0, (data[7] & 0x40)); + input_report_key(dev, BTN_1, (data[7] & 0x20)); + input_report_key(dev, BTN_4, (data[7] & 0x80)); + input_report_key(dev, BTN_5, (data[7] & 0x40)); + input_report_abs(dev, ABS_RX, (data[8] & 0x7f)); + input_report_key(dev, BTN_TOOL_FINGER, 0); + input_report_abs(dev, ABS_MISC, 0); + input_event(dev, EV_MSC, MSC_SERIAL, 0xf0); + } + input_sync(dev); + break; } exit: @@ -810,7 +838,7 @@ exit: } static struct wacom_features wacom_features[] = { - { "Wacom Penpartner", 7, 5040, 3780, 255, 0, PENPARTNER, wacom_penpartner_irq }, + { "Wacom Penpartner", 7, 5040, 3780, 255, 0, PENPARTNER, wacom_penpartner_irq }, { "Wacom Graphire", 8, 10206, 7422, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom Graphire2 4x5", 8, 10206, 7422, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom Graphire2 5x7", 8, 13918, 10206, 511, 63, GRAPHIRE, wacom_graphire_irq }, @@ -823,23 +851,24 @@ static struct wacom_features wacom_features[] = { { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom Volito2 2x3", 8, 3248, 2320, 511, 63, GRAPHIRE, wacom_graphire_irq }, { "Wacom PenPartner2", 8, 3250, 2320, 255, 63, GRAPHIRE, wacom_graphire_irq }, + { "Wacom Bamboo", 8, 14760, 9225, 511, 63, MO, wacom_graphire_irq }, { "Wacom Intuos 4x5", 10, 12700, 10600, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos 6x8", 10, 20320, 16240, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos 9x12", 10, 30480, 24060, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos 12x12", 10, 30480, 31680, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos 12x18", 10, 45720, 31680, 1023, 31, INTUOS, wacom_intuos_irq }, - { "Wacom PL400", 8, 5408, 4056, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL500", 8, 6144, 4608, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL600", 8, 6126, 4604, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL600SX", 8, 6260, 5016, 255, 0, PL, wacom_pl_irq }, - { "Wacom PL550", 8, 6144, 4608, 511, 0, PL, wacom_pl_irq }, - { "Wacom PL800", 8, 7220, 5780, 511, 0, PL, wacom_pl_irq }, - { "Wacom PL700", 8, 6758, 5406, 511, 0, PL, wacom_pl_irq }, - { "Wacom PL510", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, - { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL, wacom_pl_irq }, - { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, - { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL, wacom_pl_irq }, - { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PL, wacom_ptu_irq }, + { "Wacom PL400", 8, 5408, 4056, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL500", 8, 6144, 4608, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL600", 8, 6126, 4604, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL600SX", 8, 6260, 5016, 255, 0, PL, wacom_pl_irq }, + { "Wacom PL550", 8, 6144, 4608, 511, 0, PL, wacom_pl_irq }, + { "Wacom PL800", 8, 7220, 5780, 511, 0, PL, wacom_pl_irq }, + { "Wacom PL700", 8, 6758, 5406, 511, 0, PL, wacom_pl_irq }, + { "Wacom PL510", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, + { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL, wacom_pl_irq }, + { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL, wacom_pl_irq }, + { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL, wacom_pl_irq }, + { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PL, wacom_ptu_irq }, { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS, wacom_intuos_irq }, { "Wacom Intuos2 9x12", 10, 30480, 24060, 1023, 31, INTUOS, wacom_intuos_irq }, @@ -871,6 +900,7 @@ static struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x63) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x64) }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x65) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x20) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x21) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x22) }, @@ -964,6 +994,10 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); switch (wacom->features->type) { + case MO: + wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_1) | BIT(BTN_5); + wacom->dev.absbit[0] |= BIT(ABS_RX); + wacom->dev.absmax[ABS_RX] = 71; case G4: wacom->dev.evbit[0] |= BIT(EV_MSC); wacom->dev.mscbit[0] |= BIT(MSC_SERIAL); @@ -984,12 +1018,14 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i case CINTIQ: wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_4) | BIT(BTN_5) | BIT(BTN_6) | BIT(BTN_7); wacom->dev.absbit[0] |= BIT(ABS_RY); + wacom->dev.absmax[ABS_RY] = 4096; /* fall through */ case INTUOS3S: wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_FINGER); wacom->dev.keybit[LONG(BTN_LEFT)] |= BIT(BTN_0) | BIT(BTN_1) | BIT(BTN_2) | BIT(BTN_3); wacom->dev.absbit[0] |= BIT(ABS_RX); + wacom->dev.absmax[ABS_RX] = 4096; /* fall through */ case INTUOS: @@ -1019,8 +1055,6 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i wacom->dev.absmax[ABS_TILT_Y] = 127; wacom->dev.absmax[ABS_WHEEL] = 1023; - wacom->dev.absmax[ABS_RX] = 4096; - wacom->dev.absmax[ABS_RY] = 4096; wacom->dev.absmin[ABS_RZ] = -900; wacom->dev.absmax[ABS_RZ] = 899; wacom->dev.absmin[ABS_THROTTLE] = -1023; diff --git a/src/util/wactablet.h b/src/util/wactablet.h index e1c80c6..cb05277 100755 --- a/src/util/wactablet.h +++ b/src/util/wactablet.h @@ -2,7 +2,7 @@ ** wactablet.h ** ** Copyright (C) 2002 - 2004 - John E. Joganic -** Copyright (C) 2003 - 2006 - Ping Cheng +** Copyright (C) 2003 - 2007 - Ping Cheng ** ** This program is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License @@ -52,6 +52,7 @@ #define WACOMDEVICE_TPC 0x0010 #define WACOMDEVICE_INTUOS3 0x0011 #define WACOMDEVICE_CINTIQV5 0x0012 +#define WACOMDEVICE_MO 0x0013 typedef struct _WACOMMODEL WACOMMODEL; struct _WACOMMODEL diff --git a/src/util/wacusb.c b/src/util/wacusb.c index fbc6c6e..0948ae0 100755 --- a/src/util/wacusb.c +++ b/src/util/wacusb.c @@ -2,7 +2,7 @@ ** wacusb.c ** ** Copyright (C) 2002 - 2004 - John E. Joganic -** Copyright (C) 2003 - 2006 - Ping Cheng +** Copyright (C) 2003 - 2007 - Ping Cheng ** ** This program is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License @@ -252,6 +252,13 @@ static int USBIdentifyModel(USBTABLET* pUSB); { "FT-0203-U", "Wacom PenStation", 1, 0x61 }, { "CTF-420-U", "Wacom Volito2 4x5", 2, 0x62 }, { "CTF-220-U", "Wacom Volito2 2x3", 3, 0x63 }, + { "CTF-421-U", "Wacom PenPartner2", 4, 0x64 }, + { NULL } + }; + + static USBSUBTYPE xBamboo[] = + { + { "MTE_450", "Wacom Bamboo", 1, 0x65 }, { NULL } }; @@ -294,6 +301,7 @@ static int USBIdentifyModel(USBTABLET* pUSB); { "ptu", "Cintiq Partner (PTU)", WACOMDEVICE_PTU, xCintiqPartner, 1 }, { "vol", "Volito", WACOMDEVICE_VOLITO, xVolito, 1 }, { "vol2", "Volito2", WACOMDEVICE_VOLITO2, xVolito2, 1 }, + { "mo", "Bamboo", WACOMDEVICE_MO, xBamboo, 2 }, { NULL } }; @@ -638,6 +646,7 @@ static int USBIdentifyModel(USBTABLET* pUSB) /* add additional capabilities by device type */ switch (pUSB->pDevice->uDevice) { + case WACOMDEVICE_MO: case WACOMDEVICE_GRAPHIRE4: case WACOMDEVICE_INTUOS: case WACOMDEVICE_INTUOS2: @@ -722,10 +731,12 @@ static int USBReadRaw(WACOMTABLET_PRIV* pTablet, unsigned char* puchData, unsigned int uCnt, uPacketLength; USBTABLET* pUSB = (USBTABLET*)pTablet; uPacketLength = sizeof(struct input_event); +fprintf(stderr,"USBReadRaw\n"); /* check size of buffer */ if (uSize < uPacketLength) { errno=EINVAL; return 0; } +fprintf(stderr,"USBReadRaw not 0\n"); for (uCnt=0; uCnt<uPacketLength; uCnt+=nXfer) { nXfer = read(pUSB->fd,puchData+uCnt,uPacketLength-uCnt); diff --git a/src/xdrv/wcmCommon.c b/src/xdrv/wcmCommon.c index cf36675..eef6c39 100755 --- a/src/xdrv/wcmCommon.c +++ b/src/xdrv/wcmCommon.c @@ -906,7 +906,7 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds) xf86WcmSendButtons(local, buttons, x, y, z, v3, v4, v5); if (priv->oldProximity && local->dev->proximity) - xf86PostProximityEvent(local->dev, is_absolute, 0, naxes, + xf86PostProximityEvent(local->dev, 0, 0, naxes, x, y, z, v3, v4, v5); is_proximity = 0; } diff --git a/src/xdrv/wcmConfig.c b/src/xdrv/wcmConfig.c index d20da88..f2a450e 100755 --- a/src/xdrv/wcmConfig.c +++ b/src/xdrv/wcmConfig.c @@ -149,10 +149,10 @@ LocalDevicePtr xf86WcmAllocate(char* name, int flag) priv->keys[i][j] = 0; priv->nbuttons = MAX_BUTTONS; /* Default number of buttons */ - priv->relup = 4; /* Default relative wheel up event */ - priv->reldn = 5; /* Default relative wheel down event */ - priv->wheelup = 4; /* Default absolute wheel up event */ - priv->wheeldn = 5; /* Default absolute wheel down event */ + priv->relup = 5; /* Default relative wheel up event */ + priv->reldn = 4; /* Default relative wheel down event */ + priv->wheelup = 5; /* Default absolute wheel up event */ + priv->wheeldn = 4; /* Default absolute wheel down event */ priv->striplup = 0; /* Default left strip up event. Let user app take care of */ priv->stripldn = 0; /* Default left strip down event. Let user app take care of */ priv->striprup = 0; /* Default right strip up event. Let user app take care of */ diff --git a/src/xdrv/wcmUSB.c b/src/xdrv/wcmUSB.c index a26d29b..1149776 100755 --- a/src/xdrv/wcmUSB.c +++ b/src/xdrv/wcmUSB.c @@ -167,6 +167,22 @@ static void usbParseChannel(WacomCommonPtr common, int channel, int serial); usbDetectConfig, /* detect hardware buttons etc */ }; + static WacomModel usbBamboo = + { + "USB Bamboo", + usbInitProtocol4, + NULL, /* resolution not queried */ + usbWcmGetRanges, + NULL, /* reset not supported */ + NULL, /* tilt automatically enabled */ + NULL, /* suppress implemented in software */ + NULL, /* link speed unsupported */ + NULL, /* start not supported */ + usbParse, + xf86WcmFilterCoord, /* input filtering */ + usbDetectConfig, /* detect hardware buttons etc */ + }; + static WacomModel usbCintiq = { "USB Cintiq", @@ -399,6 +415,8 @@ static struct { 0x63, 1016, 1016, &usbVolito2 }, /* Volito2 2x3 */ { 0x64, 1016, 1016, &usbVolito2 }, /* PenPartner2 */ + { 0x65, 2540, 2540, &usbBamboo }, /* Bamboo */ + { 0xB0, 5080, 5080, &usbIntuos3 }, /* Intuos3 4x5 */ { 0xB1, 5080, 5080, &usbIntuos3 }, /* Intuos3 6x8 */ { 0xB2, 5080, 5080, &usbIntuos3 }, /* Intuos3 9x12 */ |