From linux-usb-devel-admin@lists.sourceforge.net Thu Aug  4 15:18:36 2005
From: Andrew de Quincey <adq_dvb@lidskialf.net>
Message-Id: <200508042316.12223.adq_dvb@lidskialf.net>
Subject: USB: Prevent hid-core claiming Apple Bluetooth device on new G4 powerbooks
Date: Thu, 4 Aug 2005 23:16:12 +0100


To recap: My new G4 powerbook has a bluetooth device that boots up in
what apppears to be a compatability mode - it looks exactly like an HID
keyboard/mouse device.

A special command sequence is sent to switch it into full bluetooth
mode. When this occurs the original HID device vanishes, and a new
(bluetooth HID) USB device appears on the bus with a different product
ID.

The original thread is here:
http://sourceforge.net/mailarchive/message.php?msg_id=12532263

The attached patch adds the device to the hid-core quirks so that
hid-core ignores it.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/input/hid-core.c |    3 +++
 1 files changed, 3 insertions(+)

--- gregkh-2.6.orig/drivers/usb/input/hid-core.c	2005-08-02 13:41:29.000000000 -0700
+++ gregkh-2.6/drivers/usb/input/hid-core.c	2005-08-08 15:52:22.000000000 -0700
@@ -1444,6 +1444,8 @@
 #define USB_DEVICE_ID_NETWORKANALYSER	0x2020
 #define USB_DEVICE_ID_POWERCONTROL	0x2030
 
+#define USB_VENDOR_ID_APPLE		0x05ac
+#define USB_DEVICE_ID_APPLE_BLUETOOTH  	0x1000
 
 /*
  * Alphabetically sorted blacklist by quirk type.
@@ -1462,6 +1464,7 @@
 	{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_22, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_23, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_BLUETOOTH, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, HID_QUIRK_IGNORE },