I was annoyed by usbhid taking over the touchpad
(sometimes this happens [suspend/resume] even if
/etc/modules forces loading appletouch before usbhid)
and so I added a 'quirk' that lets usbhid ignore it.
The quirk is only enabled for ID 217 so far since
that's what I have.
-- Till
This patch adds a new quirk to the usb hid driver. If a
device is marked with this quirk and is a mouse-protocol
interface device then usbhid ignores it (so it can be
claimed by a special e.g., 'touchpad' driver).
-- Till Straumann, 2006/10/17
diff -rcN linux-2.6.18.orig/drivers/usb/input/hid-core.c linux-2.6.18/drivers/usb/input/hid-core.c
*** linux-2.6.18.orig/drivers/usb/input/hid-core.c 2006-09-19 20:42:06.000000000 -0700
--- linux-2.6.18/drivers/usb/input/hid-core.c 2006-10-03 15:47:05.000000000 -0700
***************
*** 1736,1742 ****
{ USB_VENDOR_ID_APPLE, 0x0214, HID_QUIRK_POWERBOOK_HAS_FN },
{ USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN },
{ USB_VENDOR_ID_APPLE, 0x0216, HID_QUIRK_POWERBOOK_HAS_FN },
! { USB_VENDOR_ID_APPLE, 0x0217, HID_QUIRK_POWERBOOK_HAS_FN },
{ USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN },
{ USB_VENDOR_ID_APPLE, 0x0219, HID_QUIRK_POWERBOOK_HAS_FN },
{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN },
--- 1736,1742 ----
{ USB_VENDOR_ID_APPLE, 0x0214, HID_QUIRK_POWERBOOK_HAS_FN },
{ USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN },
{ USB_VENDOR_ID_APPLE, 0x0216, HID_QUIRK_POWERBOOK_HAS_FN },
! { USB_VENDOR_ID_APPLE, 0x0217, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_APPLETOUCH },
{ USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN },
{ USB_VENDOR_ID_APPLE, 0x0219, HID_QUIRK_POWERBOOK_HAS_FN },
{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN },
***************
*** 1834,1839 ****
--- 1834,1843 ----
quirks |= HID_QUIRK_NOGET;
}
+ /* Leave touchpads alone */
+ if ( (quirks & HID_QUIRK_APPLETOUCH) && USB_INTERFACE_PROTOCOL_MOUSE == interface->desc.bInterfaceProtocol )
+ return NULL;
+
if (quirks & HID_QUIRK_IGNORE)
return NULL;
diff -rcN linux-2.6.18.orig/drivers/usb/input/hid.h linux-2.6.18/drivers/usb/input/hid.h
*** linux-2.6.18.orig/drivers/usb/input/hid.h 2006-09-19 20:42:06.000000000 -0700
--- linux-2.6.18/drivers/usb/input/hid.h 2006-10-03 15:39:01.000000000 -0700
***************
*** 260,265 ****
--- 260,266 ----
#define HID_QUIRK_POWERBOOK_HAS_FN 0x00001000
#define HID_QUIRK_POWERBOOK_FN_ON 0x00002000
#define HID_QUIRK_INVERT_HWHEEL 0x00004000
+ #define HID_QUIRK_APPLETOUCH 0x00008000
/*
* This is the global environment of the parser. This information is
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mactel-linux-devel mailing list
Mactel-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mactel-linux-devel