AM3M support, 3.5+ compatibility

This commit is contained in:
Ondra Havel 2012-12-19 23:07:19 +01:00
parent e5b0040452
commit fbb9619e1e

View File

@ -5,7 +5,7 @@
#include <linux/usb/input.h> #include <linux/usb/input.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#define DRIVER_VERSION "0.4" #define DRIVER_VERSION "0.5"
#define DRIVER_AUTHOR "Ondra Havel <ondra.havel@gmail.com>" #define DRIVER_AUTHOR "Ondra Havel <ondra.havel@gmail.com>"
#define DRIVER_DESC "USB Hanvon tablet driver" #define DRIVER_DESC "USB Hanvon tablet driver"
#define DRIVER_LICENSE "GPL" #define DRIVER_LICENSE "GPL"
@ -15,11 +15,13 @@ MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE(DRIVER_LICENSE); MODULE_LICENSE(DRIVER_LICENSE);
#define USB_VENDOR_ID_HANVON 0x0b57 #define USB_VENDOR_ID_HANVON 0x0b57
#define USB_PRODUCT_ID_AM3M 0x8528
#define USB_PRODUCT_ID_AM0806 0x8502 #define USB_PRODUCT_ID_AM0806 0x8502
#define USB_PRODUCT_ID_AM0605 0x8503 #define USB_PRODUCT_ID_AM0605 0x8503
#define USB_PRODUCT_ID_AM1107 0x8505 #define USB_PRODUCT_ID_AM1107 0x8505
#define USB_PRODUCT_ID_AM1209 0x8501 #define USB_PRODUCT_ID_AM1209 0x8501
#define USB_PRODUCT_ID_RL0604 0x851f #define USB_PRODUCT_ID_RL0604 0x851f
#define USB_PRODUCT_ID_RL0504 0x851d
#define USB_AM_PACKET_LEN 10 #define USB_AM_PACKET_LEN 10
static int lbuttons[]={BTN_0,BTN_1,BTN_2,BTN_3}; /* reported on all AMs */ static int lbuttons[]={BTN_0,BTN_1,BTN_2,BTN_3}; /* reported on all AMs */
@ -113,15 +115,17 @@ static void hanvon_irq(struct urb *urb)
exit: exit:
retval = usb_submit_urb (urb, GFP_ATOMIC); retval = usb_submit_urb (urb, GFP_ATOMIC);
if (retval) if (retval)
err("%s - usb_submit_urb failed with result %d", __func__, retval); dbg("%s - usb_submit_urb failed with result %d", __func__, retval);
} }
static struct usb_device_id hanvon_ids[] = { static struct usb_device_id hanvon_ids[] = {
{ USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_AM3M) },
{ USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_AM1209) }, { USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_AM1209) },
{ USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_AM1107) }, { USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_AM1107) },
{ USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_AM0806) }, { USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_AM0806) },
{ USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_AM0605) }, { USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_AM0605) },
{ USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_RL0604) }, { USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_RL0604) },
{ USB_DEVICE(USB_VENDOR_ID_HANVON, USB_PRODUCT_ID_RL0504) },
{ } { }
}; };