Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104215
b: refs/heads/master
c: ec42d44
h: refs/heads/master
i:
  104213: 480f25f
  104211: 65fd97b
  104207: 9bf1c90
v: v3
  • Loading branch information
Daniel Ritz authored and Dmitry Torokhov committed Jul 3, 2008
1 parent 74cdb89 commit b92ff3e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 89cdb8cebe6ab6590f8083877c4ca5e92303b3b0
refs/heads/master: ec42d4481e36cbdb5b2801f957e678211a9e5ae2
20 changes: 19 additions & 1 deletion trunk/drivers/input/touchscreen/usbtouchscreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/usb/input.h>
#include <linux/hid.h>


#define DRIVER_VERSION "v0.6"
Expand Down Expand Up @@ -101,7 +102,7 @@ struct usbtouch_usb {

/* device types */
enum {
DEVTPYE_DUMMY = -1,
DEVTYPE_IGNORE = -1,
DEVTYPE_EGALAX,
DEVTYPE_PANJIT,
DEVTYPE_3M,
Expand All @@ -115,8 +116,21 @@ enum {
DEVTYPE_GOTOP,
};

#define USB_DEVICE_HID_CLASS(vend, prod) \
.match_flags = USB_DEVICE_ID_MATCH_INT_CLASS \
| USB_DEVICE_ID_MATCH_DEVICE, \
.idVendor = (vend), \
.idProduct = (prod), \
.bInterfaceClass = USB_INTERFACE_CLASS_HID, \
.bInterfaceProtocol = USB_INTERFACE_PROTOCOL_MOUSE

static struct usb_device_id usbtouch_devices[] = {
#ifdef CONFIG_TOUCHSCREEN_USB_EGALAX
/* ignore the HID capable devices, handled by usbhid */
{USB_DEVICE_HID_CLASS(0x0eef, 0x0001), .driver_info = DEVTYPE_IGNORE},
{USB_DEVICE_HID_CLASS(0x0eef, 0x0002), .driver_info = DEVTYPE_IGNORE},

/* normal device IDs */
{USB_DEVICE(0x3823, 0x0001), .driver_info = DEVTYPE_EGALAX},
{USB_DEVICE(0x3823, 0x0002), .driver_info = DEVTYPE_EGALAX},
{USB_DEVICE(0x0123, 0x0001), .driver_info = DEVTYPE_EGALAX},
Expand Down Expand Up @@ -857,6 +871,10 @@ static int usbtouch_probe(struct usb_interface *intf,
struct usbtouch_device_info *type;
int err = -ENOMEM;

/* some devices are ignored */
if (id->driver_info == DEVTYPE_IGNORE)
return -ENODEV;

interface = intf->cur_altsetting;
endpoint = &interface->endpoint[0].desc;

Expand Down

0 comments on commit b92ff3e

Please sign in to comment.