All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Ball <cjb@laptop.org>
To: "Stéphane Chatty" <chatty@enac.fr>
Cc: Jiri Kosina <jkosina@suse.cz>,
	linux-usb@vger.kernel.org, linux-input@vger.kernel.org,
	tito@bankiz.org
Subject: Re: [PATCH RESEND] USB HID: Add ID for eGalax Multitouch used in JooJoo tablet
Date: Fri, 13 Aug 2010 22:33:14 -0400	[thread overview]
Message-ID: <m362zd6hzp.fsf_-_@pullcord.laptop.org> (raw)
In-Reply-To: <C6B3DDC8-79F3-47FC-BC26-244C49998852@enac.fr> (=?utf-8?Q?=22?= =?utf-8?Q?St=C3=A9phane?= Chatty"'s message of "Fri, 13 Aug 2010 12:47:50 +0200")

Hi,

Jiri wrote:
   > has this patch been really tested?
   >
   > I am almost certain that we need to have the device ID to be added to
   > hid_blacklist[] in drivers/hid/hid-core.c as well. Otherwise the
   > hid-egalax driver wouldn't bind to the device automatically in a
   > proper way.

Thanks for noticing that; you're right, it's necessary.  I only tested
CONFIG_HID_EGALAX=y, which doesn't seem to require the blacklist entry.
I've tested that using the blacklist with =m works now.

Stéphane wrote:
   > My suggestions:
   >   - accept the patch, after adding a few comments in the code about
   > this device requiring future care for its 'serial' protocol.
   >   - start thinking about what changes are required in hid-input and/
   > or hid-core for a more generic management of multitouch devices.

I've added a comment, feel free to reword it if you'd like to.  Thanks
for the excellent research!


From: Chris Ball <cjb@laptop.org>
Subject: [PATCH] USB HID: Add ID for eGalax Multitouch used in JooJoo tablet
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

The JooJoo tablet (http://thejoojoo.com/) contains an "eGalax Inc. USB
TouchController", and this patch hooks it up to the egalax-touch driver.
Without the patch we don't get any cursor motion, since it comes through
Z/RX rather than X/Y.

(The egalax-touch driver does not yet generate a correct event sequence
for the "serial" protocol used by this device, though -- see the note
added to the code, which comes from research by Stéphane Chatty.)

Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Stéphane Chatty <chatty@enac.fr>
Signed-off-by: Chris Ball <cjb@laptop.org>
---
 drivers/hid/hid-core.c   |    1 +
 drivers/hid/hid-egalax.c |    9 +++++++++
 drivers/hid/hid-ids.h    |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index e635199..0c52899 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1299,6 +1299,7 @@ static const struct hid_device_id hid_blacklist[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_MOUSE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV, USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
diff --git a/drivers/hid/hid-egalax.c b/drivers/hid/hid-egalax.c
index f44bdc0..a852e31 100644
--- a/drivers/hid/hid-egalax.c
+++ b/drivers/hid/hid-egalax.c
@@ -159,6 +159,13 @@ static int egalax_event(struct hid_device *hid, struct hid_field *field,
 {
 	struct egalax_data *td = hid_get_drvdata(hid);
 
+	/* Note, eGalax has two product lines: the first is resistive and
+	 * uses a standard parallel multitouch protocol (product ID ==
+	 * 48xx).  The second is capacitive and uses an unusual "serial"
+	 * protocol with a different message for each multitouch finger
+	 * (product ID == 72xx).  We do not yet generate a correct event
+	 * sequence for the capacitive/serial protocol.
+	 */
 	if (hid->claimed & HID_CLAIMED_INPUT) {
 		struct input_dev *input = field->hidinput->input;
 
@@ -246,6 +253,8 @@ static void egalax_remove(struct hid_device *hdev)
 static const struct hid_device_id egalax_devices[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
 			USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_DWAV,
+			USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1) },
 	{ }
 };
 MODULE_DEVICE_TABLE(hid, egalax_devices);
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index d3fc13a..85c6d13 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -188,6 +188,7 @@
 #define USB_VENDOR_ID_DWAV		0x0eef
 #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER	0x0001
 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH	0x480d
+#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH1	0x720c
 
 #define USB_VENDOR_ID_ELECOM		0x056e
 #define USB_DEVICE_ID_ELECOM_BM084	0x0061
-- 
1.6.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2010-08-14  2:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m339wl2ug6.fsf@pullcord.laptop.org>
2010-08-12 23:10 ` [PATCH RESEND] USB HID: Add ID for eGalax Multitouch used in JooJoo tablet Chris Ball
     [not found]   ` <m3hbiz8m11.fsf-0VGQAjvlmrQzNDMTQreKSUB+6BGkLq7r@public.gmane.org>
2010-08-12 23:15     ` Jiri Kosina
2010-08-13 10:47       ` Stéphane Chatty
2010-08-14  2:33         ` Chris Ball [this message]
2010-08-16 14:03           ` Jiri Kosina
2010-08-16 13:58         ` Jiri Kosina
2010-08-16 15:17           ` Stéphane Chatty
2010-08-16 15:37             ` Stéphane Chatty
     [not found]             ` <F35B802E-C47A-47BF-A350-8F57250D4394-rXV5z7KbLFk@public.gmane.org>
2010-08-18  9:33               ` Mathieu Virbel
2010-08-16 15:30 Henrik Rydberg
2010-08-17  7:49 ` Stéphane Chatty
2010-08-17  9:56   ` Henrik Rydberg
2010-08-19 21:45     ` Stéphane Chatty
2010-08-19 21:59       ` Henrik Rydberg
2010-08-17 10:55   ` Chase Douglas
2010-08-17 11:33     ` Stéphane Chatty
2010-08-17 11:44       ` Chase Douglas
2010-08-17 11:34     ` Stéphane Chatty

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=m362zd6hzp.fsf_-_@pullcord.laptop.org \
    --to=cjb@laptop.org \
    --cc=chatty@enac.fr \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=tito@bankiz.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.