Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Kernel (http://www.linux-archive.org/debian-kernel/)
-   -   Bug#677164: wacom: Try to fix regressions in 3.2.18-1 (http://www.linux-archive.org/debian-kernel/676732-bug-677164-wacom-try-fix-regressions-3-2-18-1-a.html)

Jonathan Nieder 06-25-2012 05:22 AM

Bug#677164: wacom: Try to fix regressions in 3.2.18-1
 
Hi Ben,

The attached changes are extracted from the commit at the tip of

git://linuxwacom.git.sourceforge.net/gitroot/linuxwacom/input-wacom

According to upstream, Thinkpad x220t (0xE6) hardware reports too high
a maximum number of touch points. The second of the patches below
makes the driver prefer the hardcoded touch_max value when present.
This modifies the change introduced by

f393ee2b814e Input: wacom - retrieve maximum number of touch points

Both Ping and Chris seemed to consider it the right thing to do, at
least when testing. I have not seen test results without it applied.

The third and fourth patches concern changes introduced by

1963518b9b1b Input: wacom - add 0xE5 (MT device) support

Patch 3 is definitely needed if applying that patch; patch 4 I'm less
convinced about. I'm including them here for reference but don't
think we need them yet.

I think Nils has tested Linus's master + patch 1 + patch 2 + patch 3
and found it to work ok on his laptop. (But keep in mind that the
0xE5 support patch touched code for some other devices, too, so I am
happiest keeping it backed out for now.)

The upshot: sid might need patch 2.

It's hard to say anything since everything seems to be up in the air.
Hopefully something like these patches will be in linux-next soon to
makes matters a little clearer (in particular, with patch descriptions
I didn't make up).

Ping Cheng (4):
wacom: do not crash when retrieving touch_max
wacom: leave touch_max as is if predefined
wacom: do not request tablet data on MT Tablet PC pen interface
wacom: ignore new-style Wacom multi touch packets on MT Tablet PC

drivers/input/tablet/wacom_sys.c | 7 +++++--
drivers/input/tablet/wacom_wac.c | 6 +++++-
2 files changed, 10 insertions(+), 3 deletions(-)

Hope that helps,
Jonathan
From: Ping Cheng <pinglinux@gmail.com>
Date: Sun, 24 Jun 2012 09:48:03 -0500
Subject: wacom: do not crash when retrieving touch_max

When rep_data was an array

unsigned char rep_data[2];

spelling its address as &rep_data was perfectly valid, but now that
it is dynamically allocated

unsigned char *rep_data = kmalloc(2, GFP_KERNEL);

that expression returns a pointer to the pointer rather than to the
array itself. Regression introduced by commit f393ee2b814e (Input:
wacom - retrieve maximum number of touch points, 2012-04-29).

[jn: from mailing list discussion, with new description.
This change is also available as part of a larger commit in the
input-wacom repository.]

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index cad5602d3ce4..6b1cd71ba320 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -216,7 +216,7 @@ static void wacom_retrieve_report_data(struct usb_interface *intf,

rep_data[0] = 12;
result = wacom_get_report(intf, WAC_HID_FEATURE_REPORT,
- rep_data[0], &rep_data, 2,
+ rep_data[0], rep_data, 2,
WAC_MSG_RETRIES);

if (result >= 0 && rep_data[1] > 2)
--
1.7.11.rc3

From: Ping Cheng <pinglinux@gmail.com>
Date: Sun, 24 Jun 2012 23:00:29 -0500
Subject: wacom: leave touch_max as is if predefined

Another fixup to f393ee2b814e (Input: wacom - retrieve maximum number
of touch points, 2012-04-29). The 0xE6 tablet in the Thinkpad x220t
reports the wrong value for MAXCONTACTS so the hardcoded value must
take precedence.

[jn: extracted from a larger commit in the input-wacom repository,
with new description]

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 6b1cd71ba320..8b31473a81fe 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -401,7 +401,9 @@ static int wacom_parse_hid(struct usb_interface *intf,
break;

case HID_USAGE_CONTACTMAX:
- wacom_retrieve_report_data(intf, features);
+ /* leave touch_max as is if predefined */
+ if (!features->touch_max)
+ wacom_retrieve_report_data(intf, features);
i++;
break;
}
--
1.7.11.rc3

From: Ping Cheng <pinglinux@gmail.com>
Date: Sun, 24 Jun 2012 23:29:29 -0500
Subject: wacom: do not request tablet data on MT Tablet PC pen interface

When in commit 1963518b9b1b (Input: wacom - add 0xE5 (MT device)
support, 2012-04-29) the driver stopped asking for multitouch tablet
data on the pen interface of a tablet PC, as a side effect we started
executing the "else" to that if statement. Oops.

This is needed for the 0xE6 tablet in the Thinkpad x220t to be usable
again. Meanwhile the 0xE3 works fine without this. Not sure why. -jn

[jn: extracted from a larger commit in the input-wacom repository,
with new description]

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 8b31473a81fe..19e4725858dd 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -467,6 +467,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
}
} else if (features->type != TABLETPC &&
features->type != WIRELESS &&
+ features->type != TABLETPC2FG &&
features->device_type == BTN_TOOL_PEN) {
do {
rep_data[0] = 2;
--
1.7.11.rc3

From: Ping Cheng <pinglinux@gmail.com>
Date: Sun, 24 Jun 2012 23:44:46 -0500
Subject: wacom: ignore new-style Wacom multi touch packets on MT Tablet PC

Tablets such as 0xE6 (Thinkpad x220t) already worked fine before
adding support for the new packet format, so let's drop the
functionality for such devices for now. Meanwhile 0xE5 can still use
the new packet format.

This should bring the behavior of TABLETPC2FG devices closer to that
from before 1963518b9b1b (Input: wacom - add 0xE5 (MT device) support,
2012-04-29).

[jn: extracted from a larger commit in the input-wacom repository,
with new description]

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_wac.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 004bc1bb1544..d696ab7ecc2b 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1547,7 +1547,6 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
__set_bit(INPUT_PROP_POINTER, input_dev->propbit);
break;

- case TABLETPC2FG:
case MTSCREEN:
if (features->device_type == BTN_TOOL_FINGER) {

@@ -1559,6 +1558,11 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,

for (i = 0; i < features->touch_max; i++)
wacom_wac->slots[i] = -1;
+ }
+ /* fall through */
+
+ case TABLETPC2FG:
+ if (features->device_type == BTN_TOOL_FINGER) {

input_mt_init_slots(input_dev, features->touch_max);
input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE,
--
1.7.11.rc3

Ben Hutchings 06-26-2012 12:59 AM

Bug#677164: wacom: Try to fix regressions in 3.2.18-1
 
(ben@decadent.co.uk, who he?)

On Mon, 2012-06-25 at 00:22 -0500, Jonathan Nieder wrote:
> Hi Ben,
>
> The attached changes are extracted from the commit at the tip of
>
> git://linuxwacom.git.sourceforge.net/gitroot/linuxwacom/input-wacom
[...]

These all look reasonable to me, even though they're not completely
tested. I've applied them all.

Ben.

--
Ben Hutchings
Lowery's Law:
If it jams, force it. If it breaks, it needed replacing anyway.

Jonathan Nieder 06-26-2012 03:48 AM

Bug#677164: wacom: Try to fix regressions in 3.2.18-1
 
Ben Hutchings wrote:

> (ben@decadent.co.uk, who he?)

Sorry about that.

[...]
> These all look reasonable to me, even though they're not completely
> tested. I've applied them all.

Thanks. I think the exposure will be useful for upstream.

Jonathan



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120626034853.GB3010@burratino

Marcus Babzien 06-27-2012 01:34 PM

Bug#677164: wacom: Try to fix regressions in 3.2.18-1
 
Hi Jonathan,
I've got an x220t i7 cpu and applied all four patches to the sid 3.2.21 kernel. Without patches the tablet doesn't work. After applying the patches, it's recognized correctly and works fine with touch and pen inputs.

Regards,
Marcus



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FEB0BEF.1000403@bnl.gov">http://lists.debian.org/4FEB0BEF.1000403@bnl.gov

Jonathan Nieder 06-27-2012 08:23 PM

Bug#677164: wacom: Try to fix regressions in 3.2.18-1
 
tags 677164 - moreinfo
quit

Marcus Babzien wrote:

> Hi Jonathan,
> I've got an x220t i7 cpu and applied all four patches to the sid
> 3.2.21 kernel. Without patches the tablet doesn't work. After
> applying the patches, it's recognized correctly and works fine with
> touch and pen inputs.

Thanks! Marking so.

I'm also vaguely curious about the result if one applies the first
three patches and not the fourth, though that's out of personal
interest rather than for the sake of the Debian package.

Cheers,
Jonathan



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120627202347.GB12774@burratino

Jonathan Nieder 07-05-2012 04:20 AM

Bug#677164: wacom: Try to fix regressions in 3.2.18-1
 
Hi,

Jonathan Nieder wrote:

> Hopefully something like these patches will be in linux-next soon to
> makes matters a little clearer (in particular, with patch descriptions
> I didn't make up).
>
> Ping Cheng (4):
> wacom: do not crash when retrieving touch_max
> wacom: leave touch_max as is if predefined
> wacom: do not request tablet data on MT Tablet PC pen interface
> wacom: ignore new-style Wacom multi touch packets on MT Tablet PC

Now they've hit input-next. Patch 3 is one of the more important ones.
The commit message is disappointing, since it makes it sound like a
cleanup. By contrast, patch 4 really is just about avoiding some
complication and waste.

Patch 5 is a new hardware support patch.
Patches 6 and 7 are bugfixes.
Patches 8 and 9 seem to be intended as cleanups.

Notably missing from this series is

b7af2bb84cea Input: wacom - battery reporting improvements

which lumps together multiple fixes. The "And stop ignoring input
registration failures" part sounds useful, but a quick glance didn't
convince me it was worth the trouble of backporting.

I'd recommend at least taking patches 1-4, 6, and 7. Thoughts of all
kinds welcome, as usual.

Ping Cheng (5):
Input: wacom - fix retrieving touch_max bug
Input: wacom - don't retrieve touch_max when it is predefined
Input: wacom - rearrange type enum
Input: wacom - TPC2FG doesn't store touch id for slots
Input: wacom - add two new devices (0xed and 0xef)

Chris Bagwell (1):
Input: wacom - Bamboo One 1024 pressure fix

Jason Gerecke (2):
Input: wacom - initialize and destroy LEDs for Intuos4 S tablets
Input: wacom - remove code duplication

Ping Cheng (1):
Input: wacom - BTN_TOOL_DOUBLETAP is not a valid device_type

drivers/input/tablet/wacom_sys.c | 25 +++++++++++--------------
drivers/input/tablet/wacom_wac.c | 27 +++++++++++++++++++--------
drivers/input/tablet/wacom_wac.h | 8 +++++---
3 files changed, 35 insertions(+), 25 deletions(-)
From: Ping Cheng <pinglinux@gmail.com>
Date: Thu, 28 Jun 2012 16:46:27 -0700
Subject: Input: wacom - fix retrieving touch_max bug

commit 61c91dd4a58b21a783e37208f4d02e3cb4b637c4 upstream.

rep_data is not an array anymore, so taking it's address when passing to
wacom_get_report() is wrong.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 76bcae58a3d7..9d1955c90528 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -213,7 +213,7 @@ static void wacom_retrieve_report_data(struct usb_interface *intf,

rep_data[0] = 12;
result = wacom_get_report(intf, WAC_HID_FEATURE_REPORT,
- rep_data[0], &rep_data, 2,
+ rep_data[0], rep_data, 2,
WAC_MSG_RETRIES);

if (result >= 0 && rep_data[1] > 2)
--
1.7.10.4

From: Ping Cheng <pinglinux@gmail.com>
Date: Thu, 28 Jun 2012 16:47:30 -0700
Subject: Input: wacom - don't retrieve touch_max when it is predefined

commit 1cecc5cc0658e128bcad0b29edb96f286066571d upstream.

Some models, such as 0xE6, report more fingers than we process.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Nils Kanning <nils@kanning.de>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 9d1955c90528..5adb5326a55b 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -398,7 +398,9 @@ static int wacom_parse_hid(struct usb_interface *intf,
break;

case HID_USAGE_CONTACTMAX:
- wacom_retrieve_report_data(intf, features);
+ /* leave touch_max as is if predefined */
+ if (!features->touch_max)
+ wacom_retrieve_report_data(intf, features);
i++;
break;
}
--
1.7.10.4

From: Ping Cheng <pinglinux@gmail.com>
Date: Tue, 12 Jun 2012 00:14:12 -0700
Subject: Input: wacom - rearrange type enum

commit ea2e60244573a9204c8cee9b4fb181106784c617 upstream.

So we can simplify a few type related if statements

Signed-off-by: Ping Cheng <pingc@wacom.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 10 +++-------
drivers/input/tablet/wacom_wac.c | 6 ++----
drivers/input/tablet/wacom_wac.h | 6 +++---
3 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 5adb5326a55b..d8f8847fe4a9 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -442,8 +442,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
/* ask to report Wacom data */
if (features->device_type == BTN_TOOL_FINGER) {
/* if it is an MT Tablet PC touch */
- if (features->type == TABLETPC2FG ||
- features->type == MTSCREEN) {
+ if (features->type > TABLETPC) {
do {
rep_data[0] = 3;
rep_data[1] = 4;
@@ -462,7 +461,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
} while ((error < 0 || rep_data[1] != 4) &&
limit++ < WAC_MSG_RETRIES);
}
- } else if (features->type != TABLETPC &&
+ } else if (features->type <= BAMBOO_PT &&
features->type != WIRELESS &&
features->device_type == BTN_TOOL_PEN) {
do {
@@ -512,10 +511,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
}

/* only devices that support touch need to retrieve the info */
- if (features->type != TABLETPC &&
- features->type != TABLETPC2FG &&
- features->type != BAMBOO_PT &&
- features->type != MTSCREEN) {
+ if (features->type < BAMBOO_PT) {
goto out;
}

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 10e5cf870359..a41266182a70 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1308,10 +1308,8 @@ void wacom_setup_device_quirks(struct wacom_features *features)
}

/* these device have multiple inputs */
- if (features->type == TABLETPC || features->type == TABLETPC2FG ||
- features->type == BAMBOO_PT || features->type == WIRELESS ||
- (features->type >= INTUOS5S && features->type <= INTUOS5L) ||
- features->type == MTSCREEN)
+ if (features->type >= WIRELESS ||
+ (features->type >= INTUOS5S && features->type <= INTUOS5L))
features->quirks |= WACOM_QUIRK_MULTI_INPUT;

/* quirk for bamboo touch with 2 low res touches */
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index 78fbd3f42009..87080435116c 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -62,8 +62,6 @@ enum {
PTU,
PL,
DTU,
- BAMBOO_PT,
- WIRELESS,
INTUOS,
INTUOS3S,
INTUOS3,
@@ -79,7 +77,9 @@ enum {
CINTIQ,
WACOM_BEE,
WACOM_MO,
- TABLETPC,
+ WIRELESS,
+ BAMBOO_PT,
+ TABLETPC, /* add new TPC below */
TABLETPC2FG,
MTSCREEN,
MAX_TYPE
--
1.7.10.4

From: Ping Cheng <pinglinux@gmail.com>
Date: Thu, 28 Jun 2012 16:49:00 -0700
Subject: Input: wacom - TPC2FG doesn't store touch id for slots

commit 6795a524f0b049ceb5417d5036ab5e233345b900 upstream.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_wac.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index a41266182a70..e29bfc88d965 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1536,10 +1536,8 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
__set_bit(INPUT_PROP_POINTER, input_dev->propbit);
break;

- case TABLETPC2FG:
case MTSCREEN:
if (features->device_type == BTN_TOOL_FINGER) {
-
wacom_wac->slots = kmalloc(features->touch_max *
sizeof(int),
GFP_KERNEL);
@@ -1548,7 +1546,11 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,

for (i = 0; i < features->touch_max; i++)
wacom_wac->slots[i] = -1;
+ }
+ /* fall through */

+ case TABLETPC2FG:
+ if (features->device_type == BTN_TOOL_FINGER) {
input_mt_init_slots(input_dev, features->touch_max);
input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE,
0, MT_TOOL_MAX, 0, 0);
--
1.7.10.4

From: Ping Cheng <pinglinux@gmail.com>
Date: Tue, 12 Jun 2012 00:15:06 -0700
Subject: Input: wacom - add two new devices (0xed and 0xef)

commit ac173837cd4b268a538235a1699b91457551a9a9 upstream.

0xed supports pen and one finger touch; 0xef is pen only.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_wac.c | 13 ++++++++++++-
drivers/input/tablet/wacom_wac.h | 2 ++
2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index e29bfc88d965..a8d4a0f9735b 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -880,7 +880,7 @@ static int wacom_tpc_single_touch(struct wacom_wac *wacom, size_t len)
prox = data[0] & 0x01;
x = get_unaligned_le16(&data[1]);
y = get_unaligned_le16(&data[3]);
- } else { /* with capacity */
+ } else {
prox = data[1] & 0x01;
x = le16_to_cpup((__le16 *)&data[2]);
y = le16_to_cpup((__le16 *)&data[4]);
@@ -952,6 +952,7 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len)
case WACOM_REPORT_TPC1FG:
case WACOM_REPORT_TPCHID:
case WACOM_REPORT_TPCST:
+ case WACOM_REPORT_TPC1FGE:
return wacom_tpc_single_touch(wacom, len);

case WACOM_REPORT_TPCMT:
@@ -1235,6 +1236,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
break;

case TABLETPC:
+ case TABLETPCE:
case TABLETPC2FG:
case MTSCREEN:
sync = wacom_tpc_irq(wacom_wac, len);
@@ -1562,6 +1564,7 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
/* fall through */

case TABLETPC:
+ case TABLETPCE:
__clear_bit(ABS_MISC, input_dev->absbit);

__set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
@@ -1879,6 +1882,12 @@ static const struct wacom_features wacom_features_0xE6 =
static const struct wacom_features wacom_features_0xEC =
{ "Wacom ISDv4 EC", WACOM_PKGLEN_GRAPHIRE, 25710, 14500, 255,
0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xED =
+ { "Wacom ISDv4 ED", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255,
+ 0, TABLETPCE, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xEF =
+ { "Wacom ISDv4 EF", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255,
+ 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
static const struct wacom_features wacom_features_0x47 =
{ "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023,
31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
@@ -2053,6 +2062,8 @@ const struct usb_device_id wacom_ids[] = {
{ USB_DEVICE_WACOM(0xE5) },
{ USB_DEVICE_WACOM(0xE6) },
{ USB_DEVICE_WACOM(0xEC) },
+ { USB_DEVICE_WACOM(0xED) },
+ { USB_DEVICE_WACOM(0xEF) },
{ USB_DEVICE_WACOM(0x47) },
{ USB_DEVICE_WACOM(0xF4) },
{ USB_DEVICE_LENOVO(0x6004) },
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index 87080435116c..bd5d37b28714 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -48,6 +48,7 @@
#define WACOM_REPORT_TPCMT 13
#define WACOM_REPORT_TPCHID 15
#define WACOM_REPORT_TPCST 16
+#define WACOM_REPORT_TPC1FGE 18

/* device quirks */
#define WACOM_QUIRK_MULTI_INPUT 0x0001
@@ -80,6 +81,7 @@ enum {
WIRELESS,
BAMBOO_PT,
TABLETPC, /* add new TPC below */
+ TABLETPCE,
TABLETPC2FG,
MTSCREEN,
MAX_TYPE
--
1.7.10.4

From: Chris Bagwell <chris@cnpbagwell.com>
Date: Tue, 12 Jun 2012 00:25:48 -0700
Subject: Input: wacom - Bamboo One 1024 pressure fix

commit 6dc463511d4a690f01a9248df3b384db717e0b1c upstream.

Bamboo One's with ID of 0x6a and 0x6b were added with correct
indication of 1024 pressure levels but the Graphire packet routine
was only looking at 9 bits. Increased to 10 bits.

This bug caused these devices to roll over to zero pressure at half
way mark.

The other devices using this routine only support 256 or 512 range
and look to fix unused bits at zero.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Reported-by: Tushant Mirchandani <tushantin@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_wac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index a8d4a0f9735b..3a3e1c5e917a 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -243,7 +243,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
input_report_abs(input, ABS_X, le16_to_cpup((__le16 *)&data[2]));
input_report_abs(input, ABS_Y, le16_to_cpup((__le16 *)&data[4]));
if (wacom->tool[0] != BTN_TOOL_MOUSE) {
- input_report_abs(input, ABS_PRESSURE, data[6] | ((data[7] & 0x01) << 8));
+ input_report_abs(input, ABS_PRESSURE, data[6] | ((data[7] & 0x03) << 8));
input_report_key(input, BTN_TOUCH, data[1] & 0x01);
input_report_key(input, BTN_STYLUS, data[1] & 0x02);
input_report_key(input, BTN_STYLUS2, data[1] & 0x04);
--
1.7.10.4

From: Jason Gerecke <killertofu@gmail.com>
Date: Tue, 12 Jun 2012 00:27:53 -0700
Subject: Input: wacom - initialize and destroy LEDs for Intuos4 S tablets

commit a19fc98685ad0b5bccc38ca17acb50a92915ec51 upstream.

This case appears to have been missed in the original commit.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index d8f8847fe4a9..4c067203251b 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -852,6 +852,7 @@ static int wacom_initialize_leds(struct wacom *wacom)

/* Initialize default values */
switch (wacom->wacom_wac.features.type) {
+ case INTUOS4S:
case INTUOS4:
case INTUOS4L:
wacom->led.select[0] = 0;
@@ -905,6 +906,7 @@ static int wacom_initialize_leds(struct wacom *wacom)
static void wacom_destroy_leds(struct wacom *wacom)
{
switch (wacom->wacom_wac.features.type) {
+ case INTUOS4S:
case INTUOS4:
case INTUOS4L:
sysfs_remove_group(&wacom->intf->dev.kobj,
--
1.7.10.4

From: Jason Gerecke <killertofu@gmail.com>
Date: Tue, 12 Jun 2012 00:28:37 -0700
Subject: Input: wacom - remove code duplication

commit 32edbf562cabc0fb927692c86274c3cd2ccde0d0 upstream.

Replaces code to calculate Intuos5 physical dimensions with a call
to an existing function that performs the same task.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 4c067203251b..b690aa59cf30 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -1143,10 +1143,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
features->device_type = BTN_TOOL_FINGER;
features->pktlen = WACOM_PKGLEN_BBTOUCH3;

- features->x_phy =
- (features->x_max * 100) / features->x_resolution;
- features->y_phy =
- (features->y_max * 100) / features->y_resolution;
+ wacom_set_phy_from_res(features);

features->x_max = 4096;
features->y_max = 4096;
--
1.7.10.4

From: Ping Cheng <pinglinux@gmail.com>
Date: Thu, 28 Jun 2012 16:48:17 -0700
Subject: Input: wacom - BTN_TOOL_DOUBLETAP is not a valid device_type

commit adad004e1a50f8c64d9f116cd4934da937b51e27 upstream.

It is replaced by BTN_TOOL_FINGER.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index b690aa59cf30..29a8807d319d 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -505,7 +505,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
if (intf->cur_altsetting->desc.bInterfaceNumber == 0) {
features->device_type = 0;
} else if (intf->cur_altsetting->desc.bInterfaceNumber == 2) {
- features->device_type = BTN_TOOL_DOUBLETAP;
+ features->device_type = BTN_TOOL_FINGER;
features->pktlen = WACOM_PKGLEN_BBTOUCH3;
}
}
--
1.7.10.4

Jonathan Nieder 07-05-2012 04:39 AM

Bug#677164: wacom: Try to fix regressions in 3.2.18-1
 
(resending with corrected email address. Sorry for the noise.)
Hi,

Jonathan Nieder wrote:

> Hopefully something like these patches will be in linux-next soon to
> makes matters a little clearer (in particular, with patch descriptions
> I didn't make up).
>
> Ping Cheng (4):
> wacom: do not crash when retrieving touch_max
> wacom: leave touch_max as is if predefined
> wacom: do not request tablet data on MT Tablet PC pen interface
> wacom: ignore new-style Wacom multi touch packets on MT Tablet PC

Now they've hit input-next. Patch 3 is one of the more important ones.
The commit message is disappointing, since it makes it sound like a
cleanup. By contrast, patch 4 really is just about avoiding some
complication and waste.

Patch 5 is a new hardware support patch.
Patches 6 and 7 are bugfixes.
Patches 8 and 9 seem to be intended as cleanups.

Notably missing from this series is

b7af2bb84cea Input: wacom - battery reporting improvements

which lumps together multiple fixes. The "And stop ignoring input
registration failures" part sounds useful, but a quick glance didn't
convince me it was worth the trouble of backporting.

I'd recommend at least taking patches 1-4, 6, and 7. Thoughts of all
kinds welcome, as usual.

Ping Cheng (5):
Input: wacom - fix retrieving touch_max bug
Input: wacom - don't retrieve touch_max when it is predefined
Input: wacom - rearrange type enum
Input: wacom - TPC2FG doesn't store touch id for slots
Input: wacom - add two new devices (0xed and 0xef)

Chris Bagwell (1):
Input: wacom - Bamboo One 1024 pressure fix

Jason Gerecke (2):
Input: wacom - initialize and destroy LEDs for Intuos4 S tablets
Input: wacom - remove code duplication

Ping Cheng (1):
Input: wacom - BTN_TOOL_DOUBLETAP is not a valid device_type

drivers/input/tablet/wacom_sys.c | 25 +++++++++++--------------
drivers/input/tablet/wacom_wac.c | 27 +++++++++++++++++++--------
drivers/input/tablet/wacom_wac.h | 8 +++++---
3 files changed, 35 insertions(+), 25 deletions(-)
From: Ping Cheng <pinglinux@gmail.com>
Date: Thu, 28 Jun 2012 16:46:27 -0700
Subject: Input: wacom - fix retrieving touch_max bug

commit 61c91dd4a58b21a783e37208f4d02e3cb4b637c4 upstream.

rep_data is not an array anymore, so taking it's address when passing to
wacom_get_report() is wrong.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 76bcae58a3d7..9d1955c90528 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -213,7 +213,7 @@ static void wacom_retrieve_report_data(struct usb_interface *intf,

rep_data[0] = 12;
result = wacom_get_report(intf, WAC_HID_FEATURE_REPORT,
- rep_data[0], &rep_data, 2,
+ rep_data[0], rep_data, 2,
WAC_MSG_RETRIES);

if (result >= 0 && rep_data[1] > 2)
--
1.7.10.4

From: Ping Cheng <pinglinux@gmail.com>
Date: Thu, 28 Jun 2012 16:47:30 -0700
Subject: Input: wacom - don't retrieve touch_max when it is predefined

commit 1cecc5cc0658e128bcad0b29edb96f286066571d upstream.

Some models, such as 0xE6, report more fingers than we process.

Reported-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Nils Kanning <nils@kanning.de>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 9d1955c90528..5adb5326a55b 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -398,7 +398,9 @@ static int wacom_parse_hid(struct usb_interface *intf,
break;

case HID_USAGE_CONTACTMAX:
- wacom_retrieve_report_data(intf, features);
+ /* leave touch_max as is if predefined */
+ if (!features->touch_max)
+ wacom_retrieve_report_data(intf, features);
i++;
break;
}
--
1.7.10.4

From: Ping Cheng <pinglinux@gmail.com>
Date: Tue, 12 Jun 2012 00:14:12 -0700
Subject: Input: wacom - rearrange type enum

commit ea2e60244573a9204c8cee9b4fb181106784c617 upstream.

So we can simplify a few type related if statements

Signed-off-by: Ping Cheng <pingc@wacom.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 10 +++-------
drivers/input/tablet/wacom_wac.c | 6 ++----
drivers/input/tablet/wacom_wac.h | 6 +++---
3 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 5adb5326a55b..d8f8847fe4a9 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -442,8 +442,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
/* ask to report Wacom data */
if (features->device_type == BTN_TOOL_FINGER) {
/* if it is an MT Tablet PC touch */
- if (features->type == TABLETPC2FG ||
- features->type == MTSCREEN) {
+ if (features->type > TABLETPC) {
do {
rep_data[0] = 3;
rep_data[1] = 4;
@@ -462,7 +461,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
} while ((error < 0 || rep_data[1] != 4) &&
limit++ < WAC_MSG_RETRIES);
}
- } else if (features->type != TABLETPC &&
+ } else if (features->type <= BAMBOO_PT &&
features->type != WIRELESS &&
features->device_type == BTN_TOOL_PEN) {
do {
@@ -512,10 +511,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
}

/* only devices that support touch need to retrieve the info */
- if (features->type != TABLETPC &&
- features->type != TABLETPC2FG &&
- features->type != BAMBOO_PT &&
- features->type != MTSCREEN) {
+ if (features->type < BAMBOO_PT) {
goto out;
}

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 10e5cf870359..a41266182a70 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1308,10 +1308,8 @@ void wacom_setup_device_quirks(struct wacom_features *features)
}

/* these device have multiple inputs */
- if (features->type == TABLETPC || features->type == TABLETPC2FG ||
- features->type == BAMBOO_PT || features->type == WIRELESS ||
- (features->type >= INTUOS5S && features->type <= INTUOS5L) ||
- features->type == MTSCREEN)
+ if (features->type >= WIRELESS ||
+ (features->type >= INTUOS5S && features->type <= INTUOS5L))
features->quirks |= WACOM_QUIRK_MULTI_INPUT;

/* quirk for bamboo touch with 2 low res touches */
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index 78fbd3f42009..87080435116c 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -62,8 +62,6 @@ enum {
PTU,
PL,
DTU,
- BAMBOO_PT,
- WIRELESS,
INTUOS,
INTUOS3S,
INTUOS3,
@@ -79,7 +77,9 @@ enum {
CINTIQ,
WACOM_BEE,
WACOM_MO,
- TABLETPC,
+ WIRELESS,
+ BAMBOO_PT,
+ TABLETPC, /* add new TPC below */
TABLETPC2FG,
MTSCREEN,
MAX_TYPE
--
1.7.10.4

From: Ping Cheng <pinglinux@gmail.com>
Date: Thu, 28 Jun 2012 16:49:00 -0700
Subject: Input: wacom - TPC2FG doesn't store touch id for slots

commit 6795a524f0b049ceb5417d5036ab5e233345b900 upstream.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_wac.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index a41266182a70..e29bfc88d965 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1536,10 +1536,8 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
__set_bit(INPUT_PROP_POINTER, input_dev->propbit);
break;

- case TABLETPC2FG:
case MTSCREEN:
if (features->device_type == BTN_TOOL_FINGER) {
-
wacom_wac->slots = kmalloc(features->touch_max *
sizeof(int),
GFP_KERNEL);
@@ -1548,7 +1546,11 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,

for (i = 0; i < features->touch_max; i++)
wacom_wac->slots[i] = -1;
+ }
+ /* fall through */

+ case TABLETPC2FG:
+ if (features->device_type == BTN_TOOL_FINGER) {
input_mt_init_slots(input_dev, features->touch_max);
input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE,
0, MT_TOOL_MAX, 0, 0);
--
1.7.10.4

From: Ping Cheng <pinglinux@gmail.com>
Date: Tue, 12 Jun 2012 00:15:06 -0700
Subject: Input: wacom - add two new devices (0xed and 0xef)

commit ac173837cd4b268a538235a1699b91457551a9a9 upstream.

0xed supports pen and one finger touch; 0xef is pen only.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_wac.c | 13 ++++++++++++-
drivers/input/tablet/wacom_wac.h | 2 ++
2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index e29bfc88d965..a8d4a0f9735b 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -880,7 +880,7 @@ static int wacom_tpc_single_touch(struct wacom_wac *wacom, size_t len)
prox = data[0] & 0x01;
x = get_unaligned_le16(&data[1]);
y = get_unaligned_le16(&data[3]);
- } else { /* with capacity */
+ } else {
prox = data[1] & 0x01;
x = le16_to_cpup((__le16 *)&data[2]);
y = le16_to_cpup((__le16 *)&data[4]);
@@ -952,6 +952,7 @@ static int wacom_tpc_irq(struct wacom_wac *wacom, size_t len)
case WACOM_REPORT_TPC1FG:
case WACOM_REPORT_TPCHID:
case WACOM_REPORT_TPCST:
+ case WACOM_REPORT_TPC1FGE:
return wacom_tpc_single_touch(wacom, len);

case WACOM_REPORT_TPCMT:
@@ -1235,6 +1236,7 @@ void wacom_wac_irq(struct wacom_wac *wacom_wac, size_t len)
break;

case TABLETPC:
+ case TABLETPCE:
case TABLETPC2FG:
case MTSCREEN:
sync = wacom_tpc_irq(wacom_wac, len);
@@ -1562,6 +1564,7 @@ int wacom_setup_input_capabilities(struct input_dev *input_dev,
/* fall through */

case TABLETPC:
+ case TABLETPCE:
__clear_bit(ABS_MISC, input_dev->absbit);

__set_bit(INPUT_PROP_DIRECT, input_dev->propbit);
@@ -1879,6 +1882,12 @@ static const struct wacom_features wacom_features_0xE6 =
static const struct wacom_features wacom_features_0xEC =
{ "Wacom ISDv4 EC", WACOM_PKGLEN_GRAPHIRE, 25710, 14500, 255,
0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xED =
+ { "Wacom ISDv4 ED", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255,
+ 0, TABLETPCE, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xEF =
+ { "Wacom ISDv4 EF", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255,
+ 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
static const struct wacom_features wacom_features_0x47 =
{ "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023,
31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
@@ -2053,6 +2062,8 @@ const struct usb_device_id wacom_ids[] = {
{ USB_DEVICE_WACOM(0xE5) },
{ USB_DEVICE_WACOM(0xE6) },
{ USB_DEVICE_WACOM(0xEC) },
+ { USB_DEVICE_WACOM(0xED) },
+ { USB_DEVICE_WACOM(0xEF) },
{ USB_DEVICE_WACOM(0x47) },
{ USB_DEVICE_WACOM(0xF4) },
{ USB_DEVICE_LENOVO(0x6004) },
diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h
index 87080435116c..bd5d37b28714 100644
--- a/drivers/input/tablet/wacom_wac.h
+++ b/drivers/input/tablet/wacom_wac.h
@@ -48,6 +48,7 @@
#define WACOM_REPORT_TPCMT 13
#define WACOM_REPORT_TPCHID 15
#define WACOM_REPORT_TPCST 16
+#define WACOM_REPORT_TPC1FGE 18

/* device quirks */
#define WACOM_QUIRK_MULTI_INPUT 0x0001
@@ -80,6 +81,7 @@ enum {
WIRELESS,
BAMBOO_PT,
TABLETPC, /* add new TPC below */
+ TABLETPCE,
TABLETPC2FG,
MTSCREEN,
MAX_TYPE
--
1.7.10.4

From: Chris Bagwell <chris@cnpbagwell.com>
Date: Tue, 12 Jun 2012 00:25:48 -0700
Subject: Input: wacom - Bamboo One 1024 pressure fix

commit 6dc463511d4a690f01a9248df3b384db717e0b1c upstream.

Bamboo One's with ID of 0x6a and 0x6b were added with correct
indication of 1024 pressure levels but the Graphire packet routine
was only looking at 9 bits. Increased to 10 bits.

This bug caused these devices to roll over to zero pressure at half
way mark.

The other devices using this routine only support 256 or 512 range
and look to fix unused bits at zero.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Reported-by: Tushant Mirchandani <tushantin@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_wac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index a8d4a0f9735b..3a3e1c5e917a 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -243,7 +243,7 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
input_report_abs(input, ABS_X, le16_to_cpup((__le16 *)&data[2]));
input_report_abs(input, ABS_Y, le16_to_cpup((__le16 *)&data[4]));
if (wacom->tool[0] != BTN_TOOL_MOUSE) {
- input_report_abs(input, ABS_PRESSURE, data[6] | ((data[7] & 0x01) << 8));
+ input_report_abs(input, ABS_PRESSURE, data[6] | ((data[7] & 0x03) << 8));
input_report_key(input, BTN_TOUCH, data[1] & 0x01);
input_report_key(input, BTN_STYLUS, data[1] & 0x02);
input_report_key(input, BTN_STYLUS2, data[1] & 0x04);
--
1.7.10.4

From: Jason Gerecke <killertofu@gmail.com>
Date: Tue, 12 Jun 2012 00:27:53 -0700
Subject: Input: wacom - initialize and destroy LEDs for Intuos4 S tablets

commit a19fc98685ad0b5bccc38ca17acb50a92915ec51 upstream.

This case appears to have been missed in the original commit.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index d8f8847fe4a9..4c067203251b 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -852,6 +852,7 @@ static int wacom_initialize_leds(struct wacom *wacom)

/* Initialize default values */
switch (wacom->wacom_wac.features.type) {
+ case INTUOS4S:
case INTUOS4:
case INTUOS4L:
wacom->led.select[0] = 0;
@@ -905,6 +906,7 @@ static int wacom_initialize_leds(struct wacom *wacom)
static void wacom_destroy_leds(struct wacom *wacom)
{
switch (wacom->wacom_wac.features.type) {
+ case INTUOS4S:
case INTUOS4:
case INTUOS4L:
sysfs_remove_group(&wacom->intf->dev.kobj,
--
1.7.10.4

From: Jason Gerecke <killertofu@gmail.com>
Date: Tue, 12 Jun 2012 00:28:37 -0700
Subject: Input: wacom - remove code duplication

commit 32edbf562cabc0fb927692c86274c3cd2ccde0d0 upstream.

Replaces code to calculate Intuos5 physical dimensions with a call
to an existing function that performs the same task.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 4c067203251b..b690aa59cf30 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -1143,10 +1143,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
features->device_type = BTN_TOOL_FINGER;
features->pktlen = WACOM_PKGLEN_BBTOUCH3;

- features->x_phy =
- (features->x_max * 100) / features->x_resolution;
- features->y_phy =
- (features->y_max * 100) / features->y_resolution;
+ wacom_set_phy_from_res(features);

features->x_max = 4096;
features->y_max = 4096;
--
1.7.10.4

From: Ping Cheng <pinglinux@gmail.com>
Date: Thu, 28 Jun 2012 16:48:17 -0700
Subject: Input: wacom - BTN_TOOL_DOUBLETAP is not a valid device_type

commit adad004e1a50f8c64d9f116cd4934da937b51e27 upstream.

It is replaced by BTN_TOOL_FINGER.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Tested-by: Rafi Rubin <rafi@seas.upenn.edu>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
drivers/input/tablet/wacom_sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index b690aa59cf30..29a8807d319d 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -505,7 +505,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
if (intf->cur_altsetting->desc.bInterfaceNumber == 0) {
features->device_type = 0;
} else if (intf->cur_altsetting->desc.bInterfaceNumber == 2) {
- features->device_type = BTN_TOOL_DOUBLETAP;
+ features->device_type = BTN_TOOL_FINGER;
features->pktlen = WACOM_PKGLEN_BBTOUCH3;
}
}
--
1.7.10.4


All times are GMT. The time now is 05:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.