linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: chris@cnpbagwell.com
To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, pingc@wacom.com
Cc: Chris Bagwell <chris@cnpbagwell.com>
Subject: [PATCH v2 1/4] input: wacom - Request tablet data for Bamboo Pens
Date: Sat, 11 Sep 2010 13:30:35 -0500	[thread overview]
Message-ID: <1284229838-2852-2-git-send-email-chris@cnpbagwell.com> (raw)
In-Reply-To: <1284229838-2852-1-git-send-email-chris@cnpbagwell.com>

From: Chris Bagwell <chris@cnpbagwell.com>

Bamboo P&T need to use second form of usb_set_report() to
ask to report tablet data.

With previous addition of Bamboo Touch, BTN_TOOL_TRIPLETAP is now used
for both TABLETPC2FG and BAMBOO_PT types.  So reduced check to
match type=TABLETPC2FG.

This change shows redundant check for !TABLETPC2FG in else statement.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
---
 drivers/input/tablet/wacom_sys.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index fc6fd53..1e3af29 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -319,8 +319,9 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
 	if (!rep_data)
 		return error;
 
-	/* ask to report tablet data if it is 2FGT or not a Tablet PC */
-	if (features->device_type == BTN_TOOL_TRIPLETAP) {
+	/* ask to report tablet data if it is 2FGT Tablet PC or
+	 * not a Tablet PC */
+	if (features->type == TABLETPC2FG) {
 		do {
 			rep_data[0] = 3;
 			rep_data[1] = 4;
@@ -332,7 +333,7 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
 					WAC_HID_FEATURE_REPORT, report_id,
 					rep_data, 3);
 		} while ((error < 0 || rep_data[1] != 4) && limit++ < 5);
-	} else if (features->type != TABLETPC && features->type != TABLETPC2FG) {
+	} else if (features->type != TABLETPC) {
 		do {
 			rep_data[0] = 2;
 			rep_data[1] = 2;
@@ -364,7 +365,7 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf,
 	features->pressure_fuzz = 0;
 	features->distance_fuzz = 0;
 
-	/* only Tablet PCs need to retrieve the info */
+	/* only Tablet PCs and Bamboo P&T need to retrieve the info */
 	if ((features->type != TABLETPC) && (features->type != TABLETPC2FG) &&
 	    (features->type != BAMBOO_PT))
 		goto out;
-- 
1.7.2.2


  reply	other threads:[~2010-09-11 18:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-11 18:30 [PATCH v2 0/4] input: wacom - Add Bamboo Pen Support chris
2010-09-11 18:30 ` chris [this message]
2010-09-11 18:30 ` [PATCH v2 2/4] input: wacom - move Bamboo Touch irq to own function chris
2010-09-11 18:30 ` [PATCH v2 3/4] input: wacom - Add support for Bamboo Pen chris
2010-09-11 18:30 ` [PATCH v2 4/4] input: wacom - disable Bamboo touchpad when pen is being used chris
2010-09-12  2:13 ` [PATCH v2 0/4] input: wacom - Add Bamboo Pen Support Ping Cheng
2010-09-12  7:14   ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1284229838-2852-2-git-send-email-chris@cnpbagwell.com \
    --to=chris@cnpbagwell.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=pingc@wacom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).