* [PATCH] HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen
@ 2012-11-06 18:41 Forest Bond
2012-11-07 10:52 ` Jiri Kosina
2012-11-07 11:29 ` Sergei Shtylyov
0 siblings, 2 replies; 6+ messages in thread
From: Forest Bond @ 2012-11-06 18:41 UTC (permalink / raw)
To: Jiri Kosina
Cc: Dmitry Torokhov, Daniel Ritz, Alan Stern, Sergei Shtylyov,
linux-input, linux-usb
From: Forest Bond <forest.bond@rapidrollout.com>
Previously, both usbhid and usbtouchscreen would bind to D-WAV devices
with class HID and protocol None, so they would be claimed by whichever
driver was loaded first. Some of these devices do in fact work with
usbhid, but not all of them do. OTOH they all work with usbtouchscreen
as of commit 037a833ed05a86d01ea27a2c32043b86c549be1b ("Input:
usbtouchscreen - initialize eGalax devices"). So we ignore them in
usbhid to prevent getting in the way of usbtouchscreen and claiming an
interface that we may not be able to do anything useful with.
Signed-off-by: Forest Bond <forest.bond@rapidrollout.com>
---
drivers/hid/hid-core.c | 11 ++++++++++-
drivers/hid/hid-ids.h | 1 +
2 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index f4109fd..f2d614e 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -2188,7 +2188,16 @@ static bool hid_ignore(struct hid_device *hdev)
if (hdev->product == USB_DEVICE_ID_JESS_YUREX &&
hdev->type == HID_TYPE_USBNONE)
return true;
- break;
+ break;
+ case USB_VENDOR_ID_DWAV:
+ /* These are handled by usbtouchscreen. hdev->type is probably
+ * HID_TYPE_USBNONE, but we say !HID_TYPE_USBMOUSE to match
+ * usbtouchscreen. */
+ if ((hdev->product == USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER ||
+ hdev->product == USB_DEVICE_ID_DWAV_TOUCHCONTROLLER) &&
+ hdev->type != HID_TYPE_USBMOUSE)
+ return true;
+ break;
}
if (hdev->type == HID_TYPE_USBMOUSE &&
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 9d7a428..3d73774 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -257,6 +257,7 @@
#define USB_VENDOR_ID_DWAV 0x0eef
#define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001
+#define USB_DEVICE_ID_DWAV_TOUCHCONTROLLER 0x0002
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D 0x480d
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E 0x480e
#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7207 0x7207
--
1.7.0.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen
2012-11-06 18:41 [PATCH] HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen Forest Bond
@ 2012-11-07 10:52 ` Jiri Kosina
2012-11-07 11:29 ` Sergei Shtylyov
1 sibling, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2012-11-07 10:52 UTC (permalink / raw)
To: Forest Bond
Cc: Dmitry Torokhov, Daniel Ritz, Alan Stern, Sergei Shtylyov,
linux-input, linux-usb
On Tue, 6 Nov 2012, Forest Bond wrote:
> From: Forest Bond <forest.bond@rapidrollout.com>
>
> Previously, both usbhid and usbtouchscreen would bind to D-WAV devices
> with class HID and protocol None, so they would be claimed by whichever
> driver was loaded first. Some of these devices do in fact work with
> usbhid, but not all of them do. OTOH they all work with usbtouchscreen
> as of commit 037a833ed05a86d01ea27a2c32043b86c549be1b ("Input:
> usbtouchscreen - initialize eGalax devices"). So we ignore them in
> usbhid to prevent getting in the way of usbtouchscreen and claiming an
> interface that we may not be able to do anything useful with.
>
> Signed-off-by: Forest Bond <forest.bond@rapidrollout.com>
> ---
> drivers/hid/hid-core.c | 11 ++++++++++-
> drivers/hid/hid-ids.h | 1 +
> 2 files changed, 11 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index f4109fd..f2d614e 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -2188,7 +2188,16 @@ static bool hid_ignore(struct hid_device *hdev)
> if (hdev->product == USB_DEVICE_ID_JESS_YUREX &&
> hdev->type == HID_TYPE_USBNONE)
> return true;
> - break;
> + break;
> + case USB_VENDOR_ID_DWAV:
> + /* These are handled by usbtouchscreen. hdev->type is probably
> + * HID_TYPE_USBNONE, but we say !HID_TYPE_USBMOUSE to match
> + * usbtouchscreen. */
> + if ((hdev->product == USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER ||
> + hdev->product == USB_DEVICE_ID_DWAV_TOUCHCONTROLLER) &&
> + hdev->type != HID_TYPE_USBMOUSE)
> + return true;
> + break;
> }
>
> if (hdev->type == HID_TYPE_USBMOUSE &&
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 9d7a428..3d73774 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -257,6 +257,7 @@
>
> #define USB_VENDOR_ID_DWAV 0x0eef
> #define USB_DEVICE_ID_EGALAX_TOUCHCONTROLLER 0x0001
> +#define USB_DEVICE_ID_DWAV_TOUCHCONTROLLER 0x0002
> #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480D 0x480d
> #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_480E 0x480e
> #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7207 0x7207
Applied, thanks.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen
2012-11-06 18:41 [PATCH] HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen Forest Bond
2012-11-07 10:52 ` Jiri Kosina
@ 2012-11-07 11:29 ` Sergei Shtylyov
2012-11-07 13:57 ` Forest Bond
1 sibling, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2012-11-07 11:29 UTC (permalink / raw)
To: Forest Bond
Cc: Jiri Kosina, Dmitry Torokhov, Daniel Ritz, Alan Stern,
linux-input, linux-usb
Hello.
On 06-11-2012 22:41, Forest Bond wrote:
> From: Forest Bond <forest.bond@rapidrollout.com>
> Previously, both usbhid and usbtouchscreen would bind to D-WAV devices
> with class HID and protocol None, so they would be claimed by whichever
> driver was loaded first. Some of these devices do in fact work with
> usbhid, but not all of them do. OTOH they all work with usbtouchscreen
> as of commit 037a833ed05a86d01ea27a2c32043b86c549be1b ("Input:
> usbtouchscreen - initialize eGalax devices"). So we ignore them in
> usbhid to prevent getting in the way of usbtouchscreen and claiming an
> interface that we may not be able to do anything useful with.
> Signed-off-by: Forest Bond <forest.bond@rapidrollout.com>
> ---
> drivers/hid/hid-core.c | 11 ++++++++++-
> drivers/hid/hid-ids.h | 1 +
> 2 files changed, 11 insertions(+), 1 deletions(-)
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index f4109fd..f2d614e 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -2188,7 +2188,16 @@ static bool hid_ignore(struct hid_device *hdev)
> if (hdev->product == USB_DEVICE_ID_JESS_YUREX &&
> hdev->type == HID_TYPE_USBNONE)
> return true;
> - break;
> + break;
> + case USB_VENDOR_ID_DWAV:
> + /* These are handled by usbtouchscreen. hdev->type is probably
> + * HID_TYPE_USBNONE, but we say !HID_TYPE_USBMOUSE to match
> + * usbtouchscreen. */
Note that the preferred style of multi-line comments is this, according to
CodingStyle:
/*
* bla
* bla
*/
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen
2012-11-07 11:29 ` Sergei Shtylyov
@ 2012-11-07 13:57 ` Forest Bond
2012-11-07 14:02 ` Jiri Kosina
0 siblings, 1 reply; 6+ messages in thread
From: Forest Bond @ 2012-11-07 13:57 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Jiri Kosina, Dmitry Torokhov, Daniel Ritz, Alan Stern,
linux-input, linux-usb
[-- Attachment #1: Type: text/plain, Size: 2012 bytes --]
Hi Sergei,
On Wed, Nov 07, 2012 at 03:29:16PM +0400, Sergei Shtylyov wrote:
> Hello.
>
> On 06-11-2012 22:41, Forest Bond wrote:
>
> >From: Forest Bond <forest.bond@rapidrollout.com>
>
> >Previously, both usbhid and usbtouchscreen would bind to D-WAV devices
> >with class HID and protocol None, so they would be claimed by whichever
> >driver was loaded first. Some of these devices do in fact work with
> >usbhid, but not all of them do. OTOH they all work with usbtouchscreen
> >as of commit 037a833ed05a86d01ea27a2c32043b86c549be1b ("Input:
> >usbtouchscreen - initialize eGalax devices"). So we ignore them in
> >usbhid to prevent getting in the way of usbtouchscreen and claiming an
> >interface that we may not be able to do anything useful with.
>
> >Signed-off-by: Forest Bond <forest.bond@rapidrollout.com>
> >---
> > drivers/hid/hid-core.c | 11 ++++++++++-
> > drivers/hid/hid-ids.h | 1 +
> > 2 files changed, 11 insertions(+), 1 deletions(-)
>
> >diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> >index f4109fd..f2d614e 100644
> >--- a/drivers/hid/hid-core.c
> >+++ b/drivers/hid/hid-core.c
> >@@ -2188,7 +2188,16 @@ static bool hid_ignore(struct hid_device *hdev)
> > if (hdev->product == USB_DEVICE_ID_JESS_YUREX &&
> > hdev->type == HID_TYPE_USBNONE)
> > return true;
> >- break;
> >+ break;
> >+ case USB_VENDOR_ID_DWAV:
> >+ /* These are handled by usbtouchscreen. hdev->type is probably
> >+ * HID_TYPE_USBNONE, but we say !HID_TYPE_USBMOUSE to match
> >+ * usbtouchscreen. */
>
> Note that the preferred style of multi-line comments is this,
> according to CodingStyle:
>
> /*
> * bla
> * bla
> */
>
> WBR, Sergei
Thanks for the feedback. I had scanned the file and saw both styles. It would
be nice if checkpatch.pl issued a warning for this.
Jiri, would you like me to resend?
Thanks,
Forest
--
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen
2012-11-07 13:57 ` Forest Bond
@ 2012-11-07 14:02 ` Jiri Kosina
[not found] ` <alpine.LNX.2.00.1211071502190.27271-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2012-11-07 14:02 UTC (permalink / raw)
To: Forest Bond
Cc: Sergei Shtylyov, Dmitry Torokhov, Daniel Ritz, Alan Stern,
linux-input, linux-usb
On Wed, 7 Nov 2012, Forest Bond wrote:
> > /*
> > * bla
> > * bla
> > */
> >
> > WBR, Sergei
>
> Thanks for the feedback. I had scanned the file and saw both styles. It would
> be nice if checkpatch.pl issued a warning for this.
>
> Jiri, would you like me to resend?
Not necessary, minor thing and patch is already applied. Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen
[not found] ` <alpine.LNX.2.00.1211071502190.27271-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
@ 2012-11-07 14:09 ` Forest Bond
0 siblings, 0 replies; 6+ messages in thread
From: Forest Bond @ 2012-11-07 14:09 UTC (permalink / raw)
To: Jiri Kosina
Cc: Sergei Shtylyov, Dmitry Torokhov, Daniel Ritz, Alan Stern,
linux-input-u79uwXL29TY76Z2rM5mHXA,
linux-usb-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 554 bytes --]
On Wed, Nov 07, 2012 at 03:02:39PM +0100, Jiri Kosina wrote:
> On Wed, 7 Nov 2012, Forest Bond wrote:
>
> > > /*
> > > * bla
> > > * bla
> > > */
> > >
> > > WBR, Sergei
> >
> > Thanks for the feedback. I had scanned the file and saw both styles. It would
> > be nice if checkpatch.pl issued a warning for this.
> >
> > Jiri, would you like me to resend?
>
> Not necessary, minor thing and patch is already applied. Thanks,
Thank you.
-Forest
--
Forest Bond
http://www.alittletooquiet.net
http://www.rapidrollout.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-11-07 14:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06 18:41 [PATCH] HID: Ignore D-WAV/eGalax devices handled by usbtouchscreen Forest Bond
2012-11-07 10:52 ` Jiri Kosina
2012-11-07 11:29 ` Sergei Shtylyov
2012-11-07 13:57 ` Forest Bond
2012-11-07 14:02 ` Jiri Kosina
[not found] ` <alpine.LNX.2.00.1211071502190.27271-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
2012-11-07 14:09 ` Forest Bond
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.