From: chris@cnpbagwell.com
To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com,
pinglinux@gmail.com
Cc: Chris Bagwell <chris@cnpbagwell.com>
Subject: [PATCH 1/6] Input: wacom - cleanup feature report for bamboos
Date: Sun, 16 Oct 2011 20:29:36 -0500 [thread overview]
Message-ID: <1318814981-30607-2-git-send-email-chris@cnpbagwell.com> (raw)
In-Reply-To: <1318814981-30607-1-git-send-email-chris@cnpbagwell.com>
From: Chris Bagwell <chris@cnpbagwell.com>
Only the stylus interface on Bamboo's has a feature report that can
be used to set to wacom mode. The touch interface only has 1 report mode
and will return errors for those get/sets requests.
The get request was always erroring out because it was not marked as
an input request. Only down side of error was needlessly resending the
set request 5 times.
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
---
drivers/input/tablet/wacom_sys.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index a205055..4f35473 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -66,7 +66,8 @@ static int wacom_get_report(struct usb_interface *intf, u8 type, u8 id,
do {
retval = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
USB_REQ_GET_REPORT,
- USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+ USB_DIR_IN | USB_TYPE_CLASS |
+ USB_RECIP_INTERFACE,
(type << 8) + id,
intf->altsetting[0].desc.bInterfaceNumber,
buf, size, 100);
@@ -362,7 +363,8 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
WAC_HID_FEATURE_REPORT,
report_id, rep_data, 4, 1);
} while ((error < 0 || rep_data[1] != 4) && limit++ < WAC_MSG_RETRIES);
- } else if (features->type != TABLETPC) {
+ } else if (features->type != TABLETPC &&
+ features->device_type == BTN_TOOL_PEN) {
do {
rep_data[0] = 2;
rep_data[1] = 2;
--
1.7.6.4
next prev parent reply other threads:[~2011-10-17 1:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-17 1:29 [PATCH 0/6] Add support for new (3rd generation) Bamboo P&T's chris
2011-10-17 1:29 ` chris [this message]
2011-10-17 1:29 ` [PATCH 2/6] Input: wacom - remove unused bamboo HID parsing chris
2011-10-20 21:17 ` Ping Cheng
2011-10-21 17:26 ` Chris Bagwell
2011-10-17 1:29 ` [PATCH 3/6] Input: wacom - add some comments to wacom_parse_hid chris
2011-10-17 1:29 ` [PATCH 4/6] Input: wacom - relax Bamboo stylus ID check chris
2011-10-17 1:29 ` [PATCH 5/6] Input: wacom - read 3rd gen Bamboo Touch HID data chris
2011-10-21 2:53 ` Dmitry Torokhov
2011-10-21 17:29 ` Chris Bagwell
2011-10-17 1:29 ` [PATCH 6/6] Input: wacom - 3rd gen Bamboo P&Touch packet support chris
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=1318814981-30607-2-git-send-email-chris@cnpbagwell.com \
--to=chris@cnpbagwell.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=pinglinux@gmail.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).