FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 10-01-2012, 07:57 PM
 
Default Input: wacom - rearrange type enum

From: Joseph Salisbury <joseph.salisbury@canonical.com>

BugLink: http://bugs.launchpad.net/bugs/1033783


== Quantal Justification ==

Wacom stylus and touch not recognised on Lenovo X220t without this commit. This commit allows wacom touch and pen digitisers to work in Quantal.

== Fix ==

commit ea2e60244573a9204c8cee9b4fb181106784c617
Author: Ping Cheng <pinglinux@gmail.com>
Date: Tue Jun 12 00:14:12 2012 -0700

Input: wacom - rearrange type enum

== Impact ==

Without this patch wacom touch and pen digitisers will not work in Quantal.

== Test Case ==

A test kernel was built with this patch and tested by the original bug reporter.


Ping Cheng (1):
Input: wacom - rearrange type enum

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(-)

--
1.7.9.5


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 10-01-2012, 07:57 PM
 
Default Input: wacom - rearrange type enum

From: Ping Cheng <pinglinux@gmail.com>

BugLink: http://bugs.launchpad.net/bugs/1033783

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>
(cherry picked from commit ea2e60244573a9204c8cee9b4fb181106784c617)

Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.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 8b31473..824abc7 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -445,8 +445,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;
@@ -465,7 +464,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 {
@@ -515,10 +514,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 a616733..05e8cb3 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -1324,10 +1324,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 0fb769b..9ae9118 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,
@@ -80,7 +78,9 @@ enum {
CINTIQ,
WACOM_BEE,
WACOM_MO,
- TABLETPC,
+ WIRELESS,
+ BAMBOO_PT,
+ TABLETPC, /* add new TPC below */
TABLETPC2FG,
MTSCREEN,
MAX_TYPE
--
1.7.9.5


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




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

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org