LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* usb initialization order (usbhid vs. appletouch)
@ 2006-10-26  9:53 Soeren Sonnenburg
  2006-10-26 10:20 ` Oliver Neukum
  0 siblings, 1 reply; 27+ messages in thread
From: Soeren Sonnenburg @ 2006-10-26  9:53 UTC (permalink / raw)
  To: Linux Kernel

Dear all,

I've noticed that the appletouch driver needs to be loaded *before* the
usbhid driver to function. This is currently impossible when built into
the kernel (and not modules). So I wonder how one can change the
ordering of when the usb drivers are loaded.

Suggestions ?

Soeren
-- 
For the one fact about the future of which we can be certain is that it
will be utterly fantastic. -- Arthur C. Clarke, 1962

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: usb initialization order (usbhid vs. appletouch)
  2006-10-26  9:53 usb initialization order (usbhid vs. appletouch) Soeren Sonnenburg
@ 2006-10-26 10:20 ` Oliver Neukum
  2006-10-26 11:49   ` Soeren Sonnenburg
  0 siblings, 1 reply; 27+ messages in thread
From: Oliver Neukum @ 2006-10-26 10:20 UTC (permalink / raw)
  To: Soeren Sonnenburg, linux-usb-devel; +Cc: Linux Kernel

Am Donnerstag, 26. Oktober 2006 11:53 schrieb Soeren Sonnenburg:
> Dear all,
> 
> I've noticed that the appletouch driver needs to be loaded *before* the
> usbhid driver to function. This is currently impossible when built into
> the kernel (and not modules). So I wonder how one can change the
> ordering of when the usb drivers are loaded.
> 
> Suggestions ?

Add a quirk to HID. Messing around with probing orders is not
a sure thing.

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: usb initialization order (usbhid vs. appletouch)
  2006-10-26 10:20 ` Oliver Neukum
@ 2006-10-26 11:49   ` Soeren Sonnenburg
  2006-10-26 12:36     ` Oliver Neukum
  0 siblings, 1 reply; 27+ messages in thread
From: Soeren Sonnenburg @ 2006-10-26 11:49 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb-devel, Linux Kernel

On Thu, 2006-10-26 at 12:20 +0200, Oliver Neukum wrote:
> Am Donnerstag, 26. Oktober 2006 11:53 schrieb Soeren Sonnenburg:
> > Dear all,
> > 
> > I've noticed that the appletouch driver needs to be loaded *before* the
> > usbhid driver to function. This is currently impossible when built into
> > the kernel (and not modules). So I wonder how one can change the
> > ordering of when the usb drivers are loaded.
> > 
> > Suggestions ?
> 
> Add a quirk to HID. Messing around with probing orders is not
> a sure thing.

what do you have in mind ? if appletouch is turned on ignore IDs that
appear in appletouch ?

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: usb initialization order (usbhid vs. appletouch)
  2006-10-26 11:49   ` Soeren Sonnenburg
@ 2006-10-26 12:36     ` Oliver Neukum
  2006-10-28 16:56       ` Soeren Sonnenburg
  0 siblings, 1 reply; 27+ messages in thread
From: Oliver Neukum @ 2006-10-26 12:36 UTC (permalink / raw)
  To: Soeren Sonnenburg; +Cc: linux-usb-devel, Linux Kernel

Am Donnerstag, 26. Oktober 2006 13:49 schrieb Soeren Sonnenburg:
> On Thu, 2006-10-26 at 12:20 +0200, Oliver Neukum wrote:
> > Am Donnerstag, 26. Oktober 2006 11:53 schrieb Soeren Sonnenburg:
> > > Dear all,
> > > 
> > > I've noticed that the appletouch driver needs to be loaded *before* the
> > > usbhid driver to function. This is currently impossible when built into
> > > the kernel (and not modules). So I wonder how one can change the
> > > ordering of when the usb drivers are loaded.
> > > 
> > > Suggestions ?
> > 
> > Add a quirk to HID. Messing around with probing orders is not
> > a sure thing.
> 
> what do you have in mind ? if appletouch is turned on ignore IDs that
> appear in appletouch ?

Yes, or even make it unconditional. There is a specific driver for a device.
It exists for a reason.

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: usb initialization order (usbhid vs. appletouch)
  2006-10-26 12:36     ` Oliver Neukum
@ 2006-10-28 16:56       ` Soeren Sonnenburg
  2006-10-28 17:03         ` Oliver Neukum
                           ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: Soeren Sonnenburg @ 2006-10-28 16:56 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb-devel, Linux Kernel

On Thu, 2006-10-26 at 14:36 +0200, Oliver Neukum wrote:
> Am Donnerstag, 26. Oktober 2006 13:49 schrieb Soeren Sonnenburg:
> > On Thu, 2006-10-26 at 12:20 +0200, Oliver Neukum wrote:
> > > Am Donnerstag, 26. Oktober 2006 11:53 schrieb Soeren Sonnenburg:
> > > > Dear all,
> > > > 
> > > > I've noticed that the appletouch driver needs to be loaded *before* the
> > > > usbhid driver to function. This is currently impossible when built into
> > > > the kernel (and not modules). So I wonder how one can change the
> > > > ordering of when the usb drivers are loaded.
> > > > 
> > > > Suggestions ?
> > > 
> > > Add a quirk to HID. Messing around with probing orders is not
> > > a sure thing.
> > 
> > what do you have in mind ? if appletouch is turned on ignore IDs that
> > appear in appletouch ?
> 
> Yes, or even make it unconditional. There is a specific driver for a device.
> It exists for a reason.

OK, so I tried adding all of them to the HID_QUIRK_IGNORE LIST, i.e.


#define USB_DEVICE_ID_APPLE_GEYSER_ANSI 0x0214
#define USB_DEVICE_ID_APPLE_GEYSER_ISO  0x0215
#define USB_DEVICE_ID_APPLE_GEYSER_JIS  0x0216
#define USB_DEVICE_ID_APPLE_GEYSER3_ANSI    0x0217
#define USB_DEVICE_ID_APPLE_GEYSER3_ISO     0x0218
#define USB_DEVICE_ID_APPLE_GEYSER3_JIS     0x0219


    { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_IGNORE },
    { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_IGNORE },
    { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_IGNORE },
    { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_IGNORE },
    { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_IGNORE },
    { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_IGNORE },
    { USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_IGNORE },
    { USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_IGNORE },
    { USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_IGNORE },
    { USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_IGNORE },


however this did (and cannot) work, as the product id stands for both
keyboard AND mouse. 

It will however work for the internal infrared receiver (which is also
affected).

#define USB_DEVICE_ID_APPLE_IR  0x8240

{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR, HID_QUIRK_IGNORE },

Could someone please add this to the quirk list in hid-core.c in git ?
Please note that one can even do this from userspace via

        libhid-detach-device 05ac:8240
        modprobe appleir


Anyways, back to the above problem. Can one somehow tell the hid-core to
load the appletouch driver when it detects any of these devices and then
initialize on top of that ? The appletouch driver is completely ignored
(doesn't even enter the atp_prope function as usb_register registers
with device/product tuples that are already taken by hid....

Any ideas ?

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: usb initialization order (usbhid vs. appletouch)
  2006-10-28 16:56       ` Soeren Sonnenburg
@ 2006-10-28 17:03         ` Oliver Neukum
  2006-10-28 17:36           ` Soeren Sonnenburg
  2006-10-28 18:14         ` [linux-usb-devel] " Sergey Vlasov
                           ` (3 subsequent siblings)
  4 siblings, 1 reply; 27+ messages in thread
From: Oliver Neukum @ 2006-10-28 17:03 UTC (permalink / raw)
  To: Soeren Sonnenburg; +Cc: linux-usb-devel, Linux Kernel

Am Samstag, 28. Oktober 2006 18:56 schrieb Soeren Sonnenburg:
> Anyways, back to the above problem. Can one somehow tell the hid-core to
> load the appletouch driver when it detects any of these devices and then
> initialize on top of that ? The appletouch driver is completely ignored
> (doesn't even enter the atp_prope function as usb_register registers
> with device/product tuples that are already taken by hid....
> 
> Any ideas ?

Try udev to disconnect the hid driver, then load appletouch.

	HTH
		Oliver

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: usb initialization order (usbhid vs. appletouch)
  2006-10-28 17:03         ` Oliver Neukum
@ 2006-10-28 17:36           ` Soeren Sonnenburg
  0 siblings, 0 replies; 27+ messages in thread
From: Soeren Sonnenburg @ 2006-10-28 17:36 UTC (permalink / raw)
  To: Oliver Neukum; +Cc: linux-usb-devel, Linux Kernel

On Sat, 2006-10-28 at 19:03 +0200, Oliver Neukum wrote:
> Am Samstag, 28. Oktober 2006 18:56 schrieb Soeren Sonnenburg:
> > Anyways, back to the above problem. Can one somehow tell the hid-core to
> > load the appletouch driver when it detects any of these devices and then
> > initialize on top of that ? The appletouch driver is completely ignored
> > (doesn't even enter the atp_prope function as usb_register registers
> > with device/product tuples that are already taken by hid....
> > 
> > Any ideas ?
> 
> Try udev to disconnect the hid driver, then load appletouch.

I don't understand... I can disconnect the driver if I do on cmdline
        libhid-detach-device 05ac:<id> ; modprobe appletouch .
However then my keyboard is gone.

Of course there is the workaround of building both the appletouch and
hid driver as modules and then loading them in this order ... but I was
hoping to have them fix in the kernel. If this is however not doable we
should mark it in Kconfig and I will have to live with it.

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)
  2006-10-28 16:56       ` Soeren Sonnenburg
  2006-10-28 17:03         ` Oliver Neukum
@ 2006-10-28 18:14         ` Sergey Vlasov
  2006-10-28 18:14         ` Pete Zaitcev
                           ` (2 subsequent siblings)
  4 siblings, 0 replies; 27+ messages in thread
From: Sergey Vlasov @ 2006-10-28 18:14 UTC (permalink / raw)
  To: Soeren Sonnenburg; +Cc: Oliver Neukum, linux-usb-devel, Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 3045 bytes --]

On Sat, Oct 28, 2006 at 06:56:16PM +0200, Soeren Sonnenburg wrote:
[...]
> OK, so I tried adding all of them to the HID_QUIRK_IGNORE LIST, i.e.
> 
> 
> #define USB_DEVICE_ID_APPLE_GEYSER_ANSI 0x0214
> #define USB_DEVICE_ID_APPLE_GEYSER_ISO  0x0215
> #define USB_DEVICE_ID_APPLE_GEYSER_JIS  0x0216
> #define USB_DEVICE_ID_APPLE_GEYSER3_ANSI    0x0217
> #define USB_DEVICE_ID_APPLE_GEYSER3_ISO     0x0218
> #define USB_DEVICE_ID_APPLE_GEYSER3_JIS     0x0219
> 
> 
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_IGNORE },
> 
> 
> however this did (and cannot) work, as the product id stands for both
> keyboard AND mouse. 

You mean that the device has multiple HID interfaces, but only one of
them should be ignored by usbhid and passed to appletouch?  Then you
probably need to add a new quirk flag to hiddev (patch completely
untested):

---

From: Sergey Vlasov <vsu@altlinux.ru>
Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag

Some HID devices by Apple have both keyboard and mouse interfaces; the
keyboard interface is handled by usbhid, but the mouse (really
touchpad) interface must be handled by the separate 'appletouch'
driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
interfaces, therefore a new quirk flag to ignore only the mouse
interface is required.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index 45f44fe..feb41e7 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1872,6 +1872,9 @@ static struct hid_device *usb_hid_config
 
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
+	if ((quirks & HID_QUIRK_IGNORE_MOUSE) &&
+	    (interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE))
+		return NULL;
 
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	    (!interface->desc.bNumEndpoints ||
diff --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h
index 9b50eff..abd7b52 100644
--- a/drivers/usb/input/hid.h
+++ b/drivers/usb/input/hid.h
@@ -260,6 +260,7 @@ struct hid_item {
 #define HID_QUIRK_POWERBOOK_HAS_FN		0x00001000
 #define HID_QUIRK_POWERBOOK_FN_ON		0x00002000
 #define HID_QUIRK_INVERT_HWHEEL			0x00004000
+#define HID_QUIRK_IGNORE_MOUSE			0x00008000
 
 /*
  * This is the global environment of the parser. This information is

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: usb initialization order (usbhid vs. appletouch)
  2006-10-28 16:56       ` Soeren Sonnenburg
  2006-10-28 17:03         ` Oliver Neukum
  2006-10-28 18:14         ` [linux-usb-devel] " Sergey Vlasov
@ 2006-10-28 18:14         ` Pete Zaitcev
  2006-10-28 18:30           ` [linux-usb-devel] " Oliver Neukum
       [not found]         ` <200610282043.59106.oliver@neukum.org>
  2006-10-28 19:14         ` [linux-usb-devel] usb initialization order (usbhid vs. appletouch) Sergey Vlasov
  4 siblings, 1 reply; 27+ messages in thread
From: Pete Zaitcev @ 2006-10-28 18:14 UTC (permalink / raw)
  To: Soeren Sonnenburg; +Cc: Oliver Neukum, linux-usb-devel, Linux Kernel, zaitcev

On Sat, 28 Oct 2006 18:56:16 +0200, Soeren Sonnenburg <kernel@nn7.de> wrote:

> > > > > I've noticed that the appletouch driver needs to be loaded *before* the
> > > > > usbhid driver to function. This is currently impossible when built into
> > > > > the kernel (and not modules). So I wonder how one can change the
> > > > > ordering of when the usb drivers are loaded.
> > > > > 
> > > > > Suggestions ?
> > > > 
> > > > Add a quirk to HID. Messing around with probing orders is not
> > > > a sure thing.
> > > 
> > > what do you have in mind ? if appletouch is turned on ignore IDs that
> > > appear in appletouch ?
> > 
> > Yes, or even make it unconditional. There is a specific driver for a device.
> > It exists for a reason.
> 
> OK, so I tried adding all of them to the HID_QUIRK_IGNORE LIST, i.e.

This, of course, cannot possibly work, as we discussed a month ago.
 http://lkml.org/lkml/2006/10/1/18

So, you two are just beating a dead horse. It's time to write the code
which identifies Apple devices and not try to ride a quirk.

-- Pete

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)
  2006-10-28 18:14         ` Pete Zaitcev
@ 2006-10-28 18:30           ` Oliver Neukum
  0 siblings, 0 replies; 27+ messages in thread
From: Oliver Neukum @ 2006-10-28 18:30 UTC (permalink / raw)
  To: linux-usb-devel; +Cc: Pete Zaitcev, Soeren Sonnenburg, Linux Kernel

Am Samstag, 28. Oktober 2006 20:14 schrieb Pete Zaitcev:
> > OK, so I tried adding all of them to the HID_QUIRK_IGNORE LIST, i.e.
> 
> This, of course, cannot possibly work, as we discussed a month ago.
>  http://lkml.org/lkml/2006/10/1/18
> 
> So, you two are just beating a dead horse. It's time to write the code
> which identifies Apple devices and not try to ride a quirk.

No, this will need a quirk, just one that is more specific. Globally
triggering on Apple won't do.

	Regards
		Oliver

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)
       [not found]         ` <200610282043.59106.oliver@neukum.org>
@ 2006-10-28 18:55           ` Oliver Neukum
  2006-10-28 19:14             ` Fwd: " Pete Zaitcev
  2006-10-28 20:27             ` Fwd: Re: [linux-usb-devel] " Soeren Sonnenburg
  0 siblings, 2 replies; 27+ messages in thread
From: Oliver Neukum @ 2006-10-28 18:55 UTC (permalink / raw)
  To: Sergey Vlasov, Soeren Sonnenburg, linux-kernel; +Cc: linux-usb-devel


> From: Sergey Vlasov <vsu@altlinux.ru>
> Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> 
> Some HID devices by Apple have both keyboard and mouse interfaces; the
> keyboard interface is handled by usbhid, but the mouse (really
> touchpad) interface must be handled by the separate 'appletouch'
> driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> interfaces, therefore a new quirk flag to ignore only the mouse
> interface is required.

Exactly. Combing both patches:
Soeren, if this works, please sign it off and send it to Greg.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index 0549ec9..0745fcb 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1626,8 +1626,16 @@ #define USB_DEVICE_ID_LD_POWERCONTROL	0x
 #define USB_DEVICE_ID_LD_MACHINETEST	0x2040
 
 #define USB_VENDOR_ID_APPLE		0x05ac
+
+#define USB_DEVICE_ID_APPLE_GEYSER_ANSI	0x0214
+#define USB_DEVICE_ID_APPLE_GEYSER_ISO	0x0215
+#define USB_DEVICE_ID_APPLE_GEYSER_JIS	0x0216
+#define USB_DEVICE_ID_APPLE_GEYSER3_ANSI	0x0217
+#define USB_DEVICE_ID_APPLE_GEYSER3_ISO	0x0218
+#define USB_DEVICE_ID_APPLE_GEYSER3_JIS	0x0219
 #define USB_DEVICE_ID_APPLE_MIGHTYMOUSE	0x0304
 
+
 #define USB_VENDOR_ID_CHERRY		0x046a
 #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023
 
@@ -1801,6 +1809,18 @@ static const struct hid_blacklist {
 	{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN },
 	{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN },
 
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_IGNORE_MOUSE },
+
+
 	{ USB_VENDOR_ID_PANJIT, 0x0001, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_PANJIT, 0x0003, HID_QUIRK_IGNORE },
@@ -1897,6 +1917,9 @@ static struct hid_device *usb_hid_config
 
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
+	if (quirks & HID_QUIRK_IGNORE_MOUSE)
+		if (interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE)
+			return NULL;
 
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	    (!interface->desc.bNumEndpoints ||
diff --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h
index 9b50eff..abd7b52 100644
--- a/drivers/usb/input/hid.h
+++ b/drivers/usb/input/hid.h
@@ -260,6 +260,7 @@ #define HID_QUIRK_CYMOTION			0x00000800
 #define HID_QUIRK_POWERBOOK_HAS_FN		0x00001000
 #define HID_QUIRK_POWERBOOK_FN_ON		0x00002000
 #define HID_QUIRK_INVERT_HWHEEL			0x00004000
+#define HID_QUIRK_IGNORE_MOUSE			0x00008000
 
 /*
  * This is the global environment of the parser. This information is

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)
  2006-10-28 16:56       ` Soeren Sonnenburg
                           ` (3 preceding siblings ...)
       [not found]         ` <200610282043.59106.oliver@neukum.org>
@ 2006-10-28 19:14         ` Sergey Vlasov
  4 siblings, 0 replies; 27+ messages in thread
From: Sergey Vlasov @ 2006-10-28 19:14 UTC (permalink / raw)
  To: Soeren Sonnenburg; +Cc: Oliver Neukum, linux-usb-devel, Linux Kernel

[-- Attachment #1: Type: text/plain, Size: 3168 bytes --]

(sorry for the duplicate - the message was considered as spam by some
servers due to local misconfiguration on my end)

On Sat, Oct 28, 2006 at 06:56:16PM +0200, Soeren Sonnenburg wrote:
[...]
> OK, so I tried adding all of them to the HID_QUIRK_IGNORE LIST, i.e.
> 
> 
> #define USB_DEVICE_ID_APPLE_GEYSER_ANSI 0x0214
> #define USB_DEVICE_ID_APPLE_GEYSER_ISO  0x0215
> #define USB_DEVICE_ID_APPLE_GEYSER_JIS  0x0216
> #define USB_DEVICE_ID_APPLE_GEYSER3_ANSI    0x0217
> #define USB_DEVICE_ID_APPLE_GEYSER3_ISO     0x0218
> #define USB_DEVICE_ID_APPLE_GEYSER3_JIS     0x0219
> 
> 
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_IGNORE },
>     { USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_IGNORE },
> 
> 
> however this did (and cannot) work, as the product id stands for both
> keyboard AND mouse. 

You mean that the device has multiple HID interfaces, but only one of
them should be ignored by usbhid and passed to appletouch?  Then you
probably need to add a new quirk flag to hiddev (patch completely
untested):

---

From: Sergey Vlasov <vsu@altlinux.ru>
Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag

Some HID devices by Apple have both keyboard and mouse interfaces; the
keyboard interface is handled by usbhid, but the mouse (really
touchpad) interface must be handled by the separate 'appletouch'
driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
interfaces, therefore a new quirk flag to ignore only the mouse
interface is required.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index 45f44fe..feb41e7 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1872,6 +1872,9 @@ static struct hid_device *usb_hid_config
 
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
+	if ((quirks & HID_QUIRK_IGNORE_MOUSE) &&
+	    (interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE))
+		return NULL;
 
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	    (!interface->desc.bNumEndpoints ||
diff --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h
index 9b50eff..abd7b52 100644
--- a/drivers/usb/input/hid.h
+++ b/drivers/usb/input/hid.h
@@ -260,6 +260,7 @@ struct hid_item {
 #define HID_QUIRK_POWERBOOK_HAS_FN		0x00001000
 #define HID_QUIRK_POWERBOOK_FN_ON		0x00002000
 #define HID_QUIRK_INVERT_HWHEEL			0x00004000
+#define HID_QUIRK_IGNORE_MOUSE			0x00008000
 
 /*
  * This is the global environment of the parser. This information is

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* Fwd: Re: usb initialization order (usbhid vs. appletouch)
  2006-10-28 18:55           ` Fwd: " Oliver Neukum
@ 2006-10-28 19:14             ` Pete Zaitcev
  2006-10-28 20:27             ` Fwd: Re: [linux-usb-devel] " Soeren Sonnenburg
  1 sibling, 0 replies; 27+ messages in thread
From: Pete Zaitcev @ 2006-10-28 19:14 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: Sergey Vlasov, Soeren Sonnenburg, linux-kernel, linux-usb-devel, zaitcev

On Sat, 28 Oct 2006 20:55:03 +0200 (MEST), Oliver Neukum <oliver@neukum.name> wrote:

> Exactly. Combing both patches:
> Soeren, if this works, please sign it off and send it to Greg.
> 
> Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

This looks good. However, the love of meaningless whitespace makes
me uneasy. It sets us up for double-patching.

> +#define USB_DEVICE_ID_APPLE_GEYSER3_JIS	0x0219
>  #define USB_DEVICE_ID_APPLE_MIGHTYMOUSE	0x0304
>  
> +
>  #define USB_VENDOR_ID_CHERRY		0x046a
>  #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023

-- Pete

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)
  2006-10-28 18:55           ` Fwd: " Oliver Neukum
  2006-10-28 19:14             ` Fwd: " Pete Zaitcev
@ 2006-10-28 20:27             ` Soeren Sonnenburg
  2006-10-30 10:12               ` Joseph Fannin
  1 sibling, 1 reply; 27+ messages in thread
From: Soeren Sonnenburg @ 2006-10-28 20:27 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Oliver Neukum, Sergey Vlasov, linux-kernel, linux-usb-devel

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

On Sat, 2006-10-28 at 20:55 +0200, Oliver Neukum wrote: 
> > From: Sergey Vlasov <vsu@altlinux.ru>
> > Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> > 
> > Some HID devices by Apple have both keyboard and mouse interfaces; the
> > keyboard interface is handled by usbhid, but the mouse (really
> > touchpad) interface must be handled by the separate 'appletouch'
> > driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> > interfaces, therefore a new quirk flag to ignore only the mouse
> > interface is required.
> 
> Exactly. Combing both patches:
> Soeren, if this works, please sign it off and send it to Greg.

OK, this works, but as the same IDs need the FN key hacks I or'ed the FN
and mouse quirk flags. Also I added the appleir (builtin infrared on the
macbook/pro) to the list of ignored IDs. Therefore the patch though very
similar is again slightly different.

But hey, it worked for me over the last hour on this mbp :-))
Please comment/apply.

Soeren.
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

[-- Attachment #2: mbp-input.patch --]
[-- Type: text/x-patch, Size: 3649 bytes --]

Signed-off-by: Soeren Sonnenburg <kernel@nn7.de>
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

--- linux-2.6.18.1/drivers/usb/input/hid.h	2006-10-14 05:34:03.000000000 +0200
+++ linux-2.6.18.1-sonne/drivers/usb/input/hid.h	2006-10-28 21:44:32.000000000 +0200
@@ -260,6 +260,7 @@
 #define HID_QUIRK_POWERBOOK_HAS_FN		0x00001000
 #define HID_QUIRK_POWERBOOK_FN_ON		0x00002000
 #define HID_QUIRK_INVERT_HWHEEL			0x00004000
+#define HID_QUIRK_IGNORE_MOUSE          0x00008000
 
 /*
  * This is the global environment of the parser. This information is
--- linux-2.6.18.1/drivers/usb/input/hid-core.c	2006-10-14 05:34:03.000000000 +0200
+++ linux-2.6.18.1-sonne/drivers/usb/input/hid-core.c	2006-10-28 21:46:50.000000000 +0200
@@ -1585,6 +1585,13 @@
 
 #define USB_VENDOR_ID_APPLE		0x05ac
 #define USB_DEVICE_ID_APPLE_MIGHTYMOUSE	0x0304
+#define USB_DEVICE_ID_APPLE_GEYSER_ANSI	0x0214
+#define USB_DEVICE_ID_APPLE_GEYSER_ISO	0x0215
+#define USB_DEVICE_ID_APPLE_GEYSER_JIS	0x0216
+#define USB_DEVICE_ID_APPLE_GEYSER3_ANSI	0x0217
+#define USB_DEVICE_ID_APPLE_GEYSER3_ISO		0x0218
+#define USB_DEVICE_ID_APPLE_GEYSER3_JIS		0x0219
+#define USB_DEVICE_ID_APPLE_IR  0x8240
 
 #define USB_VENDOR_ID_CHERRY		0x046a
 #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023
@@ -1731,16 +1738,18 @@
 
 	{ USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION, HID_QUIRK_CYMOTION },
 
-	{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ 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 },
-	{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR, HID_QUIRK_IGNORE },
 
 	{ USB_VENDOR_ID_PANJIT, 0x0001, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
@@ -1837,6 +1846,10 @@
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
 
+	if (quirks & HID_QUIRK_IGNORE_MOUSE)
+		if (interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE)
+			return NULL;
+
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	    (!interface->desc.bNumEndpoints ||
 	     usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)
  2006-10-28 20:27             ` Fwd: Re: [linux-usb-devel] " Soeren Sonnenburg
@ 2006-10-30 10:12               ` Joseph Fannin
  2006-10-30 12:43                 ` Soeren Sonnenburg
  2006-12-08 17:19                 ` [PATCH] usbhid quirks for macbook(pro) (was: Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)) Soeren Sonnenburg
  0 siblings, 2 replies; 27+ messages in thread
From: Joseph Fannin @ 2006-10-30 10:12 UTC (permalink / raw)
  To: Soeren Sonnenburg
  Cc: Greg Kroah-Hartman, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

On Sat, Oct 28, 2006 at 10:27:46PM +0200, Soeren Sonnenburg wrote:
> On Sat, 2006-10-28 at 20:55 +0200, Oliver Neukum wrote:
> > > From: Sergey Vlasov <vsu@altlinux.ru>
> > > Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> > >
> > > Some HID devices by Apple have both keyboard and mouse interfaces; the
> > > keyboard interface is handled by usbhid, but the mouse (really
> > > touchpad) interface must be handled by the separate 'appletouch'
> > > driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> > > interfaces, therefore a new quirk flag to ignore only the mouse
> > > interface is required.

    The appletouch driver doesn't work properly on the MacBook
(non-Pro).  It claims the device, and sort of functions, but is
basically unusable.

    If this goes in, and blacklists the MacBook touchpad too, Macbook
users will be unhappy.  I think the MacBook and the -Pro use the same
IDs, though, which makes a problem for this patch until appletouch is
fixed on MacBooks.

> > Exactly. Combing both patches:
> > Soeren, if this works, please sign it off and send it to Greg.
>
> OK, this works, but as the same IDs need the FN key hacks I or'ed the FN
> and mouse quirk flags. Also I added the appleir (builtin infrared on the
> macbook/pro) to the list of ignored IDs. Therefore the patch though very
> similar is again slightly different.
>
> But hey, it worked for me over the last hour on this mbp :-))
> Please comment/apply.
>
> Soeren.

> Signed-off-by: Soeren Sonnenburg <kernel@nn7.de>
> Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>


--
Joseph Fannin
jfannin@gmail.com


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)
  2006-10-30 10:12               ` Joseph Fannin
@ 2006-10-30 12:43                 ` Soeren Sonnenburg
  2006-10-30 20:05                   ` Joseph Fannin
  2006-12-08 17:19                 ` [PATCH] usbhid quirks for macbook(pro) (was: Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)) Soeren Sonnenburg
  1 sibling, 1 reply; 27+ messages in thread
From: Soeren Sonnenburg @ 2006-10-30 12:43 UTC (permalink / raw)
  To: Joseph Fannin
  Cc: Greg Kroah-Hartman, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

On Mon, 2006-10-30 at 05:12 -0500, Joseph Fannin wrote:
> On Sat, Oct 28, 2006 at 10:27:46PM +0200, Soeren Sonnenburg wrote:
> > On Sat, 2006-10-28 at 20:55 +0200, Oliver Neukum wrote:
> > > > From: Sergey Vlasov <vsu@altlinux.ru>
> > > > Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> > > >
> > > > Some HID devices by Apple have both keyboard and mouse interfaces; the
> > > > keyboard interface is handled by usbhid, but the mouse (really
> > > > touchpad) interface must be handled by the separate 'appletouch'
> > > > driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> > > > interfaces, therefore a new quirk flag to ignore only the mouse
> > > > interface is required.
> 
>     The appletouch driver doesn't work properly on the MacBook
> (non-Pro).  It claims the device, and sort of functions, but is
> basically unusable.
> 
>     If this goes in, and blacklists the MacBook touchpad too, Macbook
> users will be unhappy.  I think the MacBook and the -Pro use the same
> IDs, though, which makes a problem for this patch until appletouch is
> fixed on MacBooks.

Can you please be a bit more specific on this ? Other sites mention it
works http://bbbart.ulyssis.be/gentoomacbook/ ... what are you missing ?
Sensitivity and such can all be tweaked in xorg.conf ...

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world oaround you, but you're still dreaming.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)
  2006-10-30 12:43                 ` Soeren Sonnenburg
@ 2006-10-30 20:05                   ` Joseph Fannin
  2006-11-01 20:47                     ` Soeren Sonnenburg
  0 siblings, 1 reply; 27+ messages in thread
From: Joseph Fannin @ 2006-10-30 20:05 UTC (permalink / raw)
  To: Soeren Sonnenburg
  Cc: Joseph Fannin, Greg Kroah-Hartman, Oliver Neukum, Sergey Vlasov,
	linux-kernel, linux-usb-devel

On Mon, Oct 30, 2006 at 01:43:31PM +0100, Soeren Sonnenburg wrote:
> On Mon, 2006-10-30 at 05:12 -0500, Joseph Fannin wrote:
> > On Sat, Oct 28, 2006 at 10:27:46PM +0200, Soeren Sonnenburg wrote:
> > > On Sat, 2006-10-28 at 20:55 +0200, Oliver Neukum wrote:
> > > > > From: Sergey Vlasov <vsu@altlinux.ru>
> > > > > Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> > > > >
> > > > > Some HID devices by Apple have both keyboard and mouse interfaces; the
> > > > > keyboard interface is handled by usbhid, but the mouse (really
> > > > > touchpad) interface must be handled by the separate 'appletouch'
> > > > > driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> > > > > interfaces, therefore a new quirk flag to ignore only the mouse
> > > > > interface is required.
> >
> >     The appletouch driver doesn't work properly on the MacBook
> > (non-Pro).  It claims the device, and sort of functions, but is
> > basically unusable.
> >
> >     If this goes in, and blacklists the MacBook touchpad too, Macbook
> > users will be unhappy.  I think the MacBook and the -Pro use the same
> > IDs, though, which makes a problem for this patch until appletouch is
> > fixed on MacBooks.
>
> Can you please be a bit more specific on this ? Other sites mention it
> works http://bbbart.ulyssis.be/gentoomacbook/ ... what are you missing ?
> Sensitivity and such can all be tweaked in xorg.conf ...

    That's the first I've heard of it working on a vanilla MacBook.
I'm glad.  I've only heard of failures before, some by people way
smarter than me.

    I wish I could whip out my 'Book and try it again, but it's away
for service.  But here's what I do know:

    Enabling the "dbg" parameter of the module produced output only
once, when I switched VTs to X and back quickly. The one
time it did work, it dumped so much info to syslog it for all
practical purposes locked the machine up, so I didn't learn much.

    Printk's I added to the code that initializes absolute mode for
geiser3 did get printed, though.

    I couldn't get debug events out of the driver in any other
situation, and I couldn't reproduce it.

    The touchpad doesn't respond to any of the xorg.conf knobs, and
synclient doesn't detect any device.  Yes, shm or whatever was
enabled.  (I've had a real synaptics pad working before, for what
that's worth.)

    Without the ability to tweak the settings, the tap-to-click
sensitivity was way too high, even for people who like that sort of
thing, and the pointer speed lower than that of the hid driver, even
with the GNOME mouse speed stuff turned all the way up.

    All my attempts to enable side-scrolling and so on also failed.

    Taken with all the other stuff, it seemed to be that the MacBook
touchpad was getting reset and so dropped out of absolute mode just as
soon as the driver enabled it.  The one time it actually produced
absolute events, it was because the geiser3 init code won the race
with whatever was resetting it, due to the quick switch to X and back
to vgacon.  It was at this point that I decided I was in *way* over my
head.

    Maybe it's a misconfiguration, or HAL doing something dumb to the
mouse device, and Gentoo dude didn't have HAL installed.  Anyway, it
looks like *someone* got it working.  But lots of people have failed,
and they're going to be unhappy when they upgrade their kernel and
their trackpad starts behaving badly.

--
Joseph Fannin
jhf@columbus.rr.com

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)
  2006-10-30 20:05                   ` Joseph Fannin
@ 2006-11-01 20:47                     ` Soeren Sonnenburg
  0 siblings, 0 replies; 27+ messages in thread
From: Soeren Sonnenburg @ 2006-11-01 20:47 UTC (permalink / raw)
  To: Joseph Fannin
  Cc: Greg Kroah-Hartman, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

On Mon, 2006-10-30 at 15:05 -0500, Joseph Fannin wrote:
> On Mon, Oct 30, 2006 at 01:43:31PM +0100, Soeren Sonnenburg wrote:
> > On Mon, 2006-10-30 at 05:12 -0500, Joseph Fannin wrote:
> > > On Sat, Oct 28, 2006 at 10:27:46PM +0200, Soeren Sonnenburg wrote:
> > > > On Sat, 2006-10-28 at 20:55 +0200, Oliver Neukum wrote:
> > > > > > From: Sergey Vlasov <vsu@altlinux.ru>
> > > > > > Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> > > > > >
> > > > > > Some HID devices by Apple have both keyboard and mouse interfaces; the
> > > > > > keyboard interface is handled by usbhid, but the mouse (really
> > > > > > touchpad) interface must be handled by the separate 'appletouch'
> > > > > > driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> > > > > > interfaces, therefore a new quirk flag to ignore only the mouse
> > > > > > interface is required.
> > >
> > >     The appletouch driver doesn't work properly on the MacBook
> > > (non-Pro).  It claims the device, and sort of functions, but is
> > > basically unusable.
> > >
> > >     If this goes in, and blacklists the MacBook touchpad too, Macbook
> > > users will be unhappy.  I think the MacBook and the -Pro use the same
> > > IDs, though, which makes a problem for this patch until appletouch is
> > > fixed on MacBooks.
> >
> > Can you please be a bit more specific on this ? Other sites mention it
> > works http://bbbart.ulyssis.be/gentoomacbook/ ... what are you missing ?
> > Sensitivity and such can all be tweaked in xorg.conf ...
> 
>     That's the first I've heard of it working on a vanilla MacBook.
> I'm glad.  I've only heard of failures before, some by people way
> smarter than me.

[lots of problems with the appletouch driver]

OK I am asking this on the mactel-linux list... Lets see if these
problems are gone and I find some happy mb appletouch user...

In the worst case this patch could be a config option or will have to be
kept separate.

Soeren.
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] usbhid quirks for macbook(pro) (was: Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch))
  2006-10-30 10:12               ` Joseph Fannin
  2006-10-30 12:43                 ` Soeren Sonnenburg
@ 2006-12-08 17:19                 ` Soeren Sonnenburg
  2006-12-10  2:08                   ` Joseph Fannin
  1 sibling, 1 reply; 27+ messages in thread
From: Soeren Sonnenburg @ 2006-12-08 17:19 UTC (permalink / raw)
  To: Joseph Fannin
  Cc: Greg Kroah-Hartman, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

[-- Attachment #1: Type: text/plain, Size: 1753 bytes --]

On Mon, 2006-10-30 at 05:12 -0500, Joseph Fannin wrote:
> On Sat, Oct 28, 2006 at 10:27:46PM +0200, Soeren Sonnenburg wrote:
> > On Sat, 2006-10-28 at 20:55 +0200, Oliver Neukum wrote:
> > > > From: Sergey Vlasov <vsu@altlinux.ru>
> > > > Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> > > >
> > > > Some HID devices by Apple have both keyboard and mouse interfaces; the
> > > > keyboard interface is handled by usbhid, but the mouse (really
> > > > touchpad) interface must be handled by the separate 'appletouch'
> > > > driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> > > > interfaces, therefore a new quirk flag to ignore only the mouse
> > > > interface is required.
> 
>     The appletouch driver doesn't work properly on the MacBook
> (non-Pro).  It claims the device, and sort of functions, but is
> basically unusable.
> 
>     If this goes in, and blacklists the MacBook touchpad too, Macbook
> users will be unhappy.  I think the MacBook and the -Pro use the same
> IDs, though, which makes a problem for this patch until appletouch is
> fixed on MacBooks.

ok, this patch was now in the mactel svn repository since about a month
and I've never ever seen a report about it failing. Also I asked on the
mailinglist for anyone having problems with that and got no answer,
execpt Joseph, the problem you have been seeing might have been that
one:

http://www.mail-archive.com/mactel-linux-devel@lists.sourceforge.net/msg00129.html

I would therefore hope it can be applied and thus appear in .20. I am
attaching the version that is now in mactel-svn (which also includes
geyser4 support).

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

[-- Attachment #2: usbhid.patch --]
[-- Type: text/x-patch, Size: 4464 bytes --]

diff -uNr linux-2.6.19/drivers/usb/input/hid-core.c linux-2.6.19-mactel/drivers/usb/input/hid-core.c
--- linux-2.6.19/drivers/usb/input/hid-core.c	2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19-mactel/drivers/usb/input/hid-core.c	2006-11-30 09:20:49.000000000 +0100
@@ -1627,6 +1627,16 @@
 
 #define USB_VENDOR_ID_APPLE		0x05ac
 #define USB_DEVICE_ID_APPLE_MIGHTYMOUSE	0x0304
+#define USB_DEVICE_ID_APPLE_GEYSER_ANSI	0x0214
+#define USB_DEVICE_ID_APPLE_GEYSER_ISO	0x0215
+#define USB_DEVICE_ID_APPLE_GEYSER_JIS	0x0216
+#define USB_DEVICE_ID_APPLE_GEYSER3_ANSI	0x0217
+#define USB_DEVICE_ID_APPLE_GEYSER3_ISO		0x0218
+#define USB_DEVICE_ID_APPLE_GEYSER3_JIS		0x0219
+#define USB_DEVICE_ID_APPLE_GEYSER4_ANSI	0x021A
+#define USB_DEVICE_ID_APPLE_GEYSER4_ISO		0x021B
+#define USB_DEVICE_ID_APPLE_GEYSER4_JIS		0x021C
+#define USB_DEVICE_ID_APPLE_IR		0x8240
 
 #define USB_VENDOR_ID_CHERRY		0x046a
 #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023
@@ -1794,17 +1804,21 @@
 
 	{ USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION, HID_QUIRK_CYMOTION },
 
-	{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0214, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ 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 | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, 0x0219, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x021B, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR, HID_QUIRK_IGNORE },
 
 	{ USB_VENDOR_ID_PANJIT, 0x0001, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
@@ -1903,6 +1917,10 @@
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
 
+	if ((quirks & HID_QUIRK_IGNORE_MOUSE) &&
+		(interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE))
+			return NULL;
+
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	    (!interface->desc.bNumEndpoints ||
 	     usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {
diff -uNr linux-2.6.19/drivers/usb/input/hid.h linux-2.6.19-mactel/drivers/usb/input/hid.h
--- linux-2.6.19/drivers/usb/input/hid.h	2006-11-29 22:57:37.000000000 +0100
+++ linux-2.6.19-mactel/drivers/usb/input/hid.h	2006-11-30 09:21:18.000000000 +0100
@@ -261,6 +261,7 @@
 #define HID_QUIRK_POWERBOOK_FN_ON		0x00002000
 #define HID_QUIRK_INVERT_HWHEEL			0x00004000
 #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD	0x00008000
+#define HID_QUIRK_IGNORE_MOUSE			0x00010000
 
 /*
  * This is the global environment of the parser. This information is

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] usbhid quirks for macbook(pro) (was: Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch))
  2006-12-08 17:19                 ` [PATCH] usbhid quirks for macbook(pro) (was: Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)) Soeren Sonnenburg
@ 2006-12-10  2:08                   ` Joseph Fannin
  2006-12-15  8:36                     ` Soeren Sonnenburg
  0 siblings, 1 reply; 27+ messages in thread
From: Joseph Fannin @ 2006-12-10  2:08 UTC (permalink / raw)
  To: Soeren Sonnenburg
  Cc: Greg Kroah-Hartman, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

On Fri, 2006-12-08 at 18:19 +0100, Soeren Sonnenburg wrote:

> ok, this patch was now in the mactel svn repository since about a month
> and I've never ever seen a report about it failing. Also I asked on the
> mailinglist for anyone having problems with that and got no answer,
> execpt Joseph, the problem you have been seeing might have been that
> one:
> 
> http://www.mail-archive.com/mactel-linux-devel@lists.sourceforge.net/msg00129.html
> 
> I would therefore hope it can be applied and thus appear in .20. I am
> attaching the version that is now in mactel-svn (which also includes
> geyser4 support).

    I've since gotten my Macbook's trackpad working with the Appletouch
driver also, now, so make that no problems, please.

    I don't know what the problems I was seeing were anymore, but I
think it was mostly the difficulty in getting it set up.  I understand
that this should help fix that, and wish I hadn't tried to hold it up!

--
Joseph Fannin
jfannin@gmail.com | jhf@columbus.rr.com

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] usbhid quirks for macbook(pro) (was: Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch))
  2006-12-10  2:08                   ` Joseph Fannin
@ 2006-12-15  8:36                     ` Soeren Sonnenburg
  2006-12-15 17:56                       ` Greg KH
  0 siblings, 1 reply; 27+ messages in thread
From: Soeren Sonnenburg @ 2006-12-15  8:36 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Joseph Fannin, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

On Sat, 2006-12-09 at 21:08 -0500, Joseph Fannin wrote:
> On Fri, 2006-12-08 at 18:19 +0100, Soeren Sonnenburg wrote:
> 
> > ok, this patch was now in the mactel svn repository since about a month
> > and I've never ever seen a report about it failing. Also I asked on the
> > mailinglist for anyone having problems with that and got no answer,
> > execpt Joseph, the problem you have been seeing might have been that
> > one:
> > 
> > http://www.mail-archive.com/mactel-linux-devel@lists.sourceforge.net/msg00129.html
> > 
> > I would therefore hope it can be applied and thus appear in .20. I am
> > attaching the version that is now in mactel-svn (which also includes
> > geyser4 support).
> 
>     I've since gotten my Macbook's trackpad working with the Appletouch
> driver also, now, so make that no problems, please.
> 
>     I don't know what the problems I was seeing were anymore, but I
> think it was mostly the difficulty in getting it set up.  I understand
> that this should help fix that, and wish I hadn't tried to hold it up!

Greg,

I've noticed that this patch is not in 2.6.20-rc1. Could you please
comment on what is wrong with it / whether it will ever have a chance to
be accepted in the way it is done ? 

Thanks,
Soeren

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] usbhid quirks for macbook(pro) (was: Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch))
  2006-12-15  8:36                     ` Soeren Sonnenburg
@ 2006-12-15 17:56                       ` Greg KH
  2006-12-23 10:38                         ` [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc1 Soeren Sonnenburg
  0 siblings, 1 reply; 27+ messages in thread
From: Greg KH @ 2006-12-15 17:56 UTC (permalink / raw)
  To: Soeren Sonnenburg
  Cc: Joseph Fannin, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

On Fri, Dec 15, 2006 at 09:36:04AM +0100, Soeren Sonnenburg wrote:
> On Sat, 2006-12-09 at 21:08 -0500, Joseph Fannin wrote:
> > On Fri, 2006-12-08 at 18:19 +0100, Soeren Sonnenburg wrote:
> > 
> > > ok, this patch was now in the mactel svn repository since about a month
> > > and I've never ever seen a report about it failing. Also I asked on the
> > > mailinglist for anyone having problems with that and got no answer,
> > > execpt Joseph, the problem you have been seeing might have been that
> > > one:
> > > 
> > > http://www.mail-archive.com/mactel-linux-devel@lists.sourceforge.net/msg00129.html
> > > 
> > > I would therefore hope it can be applied and thus appear in .20. I am
> > > attaching the version that is now in mactel-svn (which also includes
> > > geyser4 support).
> > 
> >     I've since gotten my Macbook's trackpad working with the Appletouch
> > driver also, now, so make that no problems, please.
> > 
> >     I don't know what the problems I was seeing were anymore, but I
> > think it was mostly the difficulty in getting it set up.  I understand
> > that this should help fix that, and wish I hadn't tried to hold it up!
> 
> Greg,
> 
> I've noticed that this patch is not in 2.6.20-rc1. Could you please
> comment on what is wrong with it / whether it will ever have a chance to
> be accepted in the way it is done ? 

It's in my queue right now, sorry.  I'll catch up on it in a few hours.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc1
  2006-12-15 17:56                       ` Greg KH
@ 2006-12-23 10:38                         ` Soeren Sonnenburg
  2007-01-27 14:08                           ` [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc6 Soeren Sonnenburg
  0 siblings, 1 reply; 27+ messages in thread
From: Soeren Sonnenburg @ 2006-12-23 10:38 UTC (permalink / raw)
  To: Greg KH
  Cc: Joseph Fannin, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

On Fri, 2006-12-15 at 09:56 -0800, Greg KH wrote:
> On Fri, Dec 15, 2006 at 09:36:04AM +0100, Soeren Sonnenburg wrote:
> > On Sat, 2006-12-09 at 21:08 -0500, Joseph Fannin wrote:
> > > On Fri, 2006-12-08 at 18:19 +0100, Soeren Sonnenburg wrote:
[...]
> > Greg,
> > 
> > I've noticed that this patch is not in 2.6.20-rc1. Could you please
> > comment on what is wrong with it / whether it will ever have a chance to
> > be accepted in the way it is done ? 
> 
> It's in my queue right now, sorry.  I'll catch up on it in a few hours.

Please find attached a updated version of this patch (for kernel
2.6.20-rc1)

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

[-- Attachment #2: usbhid.patch --]
[-- Type: text/x-patch, Size: 4712 bytes --]

Signed-off-by: Soeren Sonnenburg <kernel@nn7.de>
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

diff -ur linux-2.6.20-rc1-orig/drivers/usb/input/hid-core.c linux-2.6.20-rc1/drivers/usb/input/hid-core.c
--- linux-2.6.20-rc1-orig/drivers/usb/input/hid-core.c	2006-12-14 02:14:23.000000000 +0100
+++ linux-2.6.20-rc1/drivers/usb/input/hid-core.c	2006-12-23 10:21:49.000000000 +0100
@@ -772,6 +772,7 @@
 #define USB_DEVICE_ID_APPLE_GEYSER4_JIS	0x021c
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY	0x030a
 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY	0x030b
+#define USB_DEVICE_ID_APPLE_IR		0x8240
 
 #define USB_VENDOR_ID_CHERRY		0x046a
 #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023
@@ -942,19 +943,19 @@
 
 	{ USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION, HID_QUIRK_CYMOTION },
 
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
 
 	{ USB_VENDOR_ID_PANJIT, 0x0001, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
@@ -1060,6 +1061,11 @@
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
 
+	if ((quirks & HID_QUIRK_IGNORE_MOUSE) &&
+		(interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE))
+			return NULL;
+
+
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	    (!interface->desc.bNumEndpoints ||
 	     usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {
diff -ur linux-2.6.20-rc1-orig/include/linux/hid.h linux-2.6.20-rc1/include/linux/hid.h
--- linux-2.6.20-rc1-orig/include/linux/hid.h	2006-12-14 02:14:23.000000000 +0100
+++ linux-2.6.20-rc1/include/linux/hid.h	2006-12-23 08:21:41.000000000 +0100
@@ -264,6 +264,7 @@
 #define HID_QUIRK_INVERT_HWHEEL			0x00004000
 #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD        0x00008000
 #define HID_QUIRK_BAD_RELATIVE_KEYS		0x00010000
+#define HID_QUIRK_IGNORE_MOUSE			0x00020000
 
 /*
  * This is the global environment of the parser. This information is

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc6
  2006-12-23 10:38                         ` [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc1 Soeren Sonnenburg
@ 2007-01-27 14:08                           ` Soeren Sonnenburg
  2007-01-29  9:38                             ` Jiri Kosina
  0 siblings, 1 reply; 27+ messages in thread
From: Soeren Sonnenburg @ 2007-01-27 14:08 UTC (permalink / raw)
  To: Greg KH
  Cc: Joseph Fannin, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

[-- Attachment #1: Type: text/plain, Size: 799 bytes --]

On Sat, 2006-12-23 at 11:38 +0100, Soeren Sonnenburg wrote:
> On Fri, 2006-12-15 at 09:56 -0800, Greg KH wrote:
> > On Fri, Dec 15, 2006 at 09:36:04AM +0100, Soeren Sonnenburg wrote:
> > > On Sat, 2006-12-09 at 21:08 -0500, Joseph Fannin wrote:
> > > > On Fri, 2006-12-08 at 18:19 +0100, Soeren Sonnenburg wrote:
> [...]
> > > Greg,
> > > 
> > > I've noticed that this patch is not in 2.6.20-rc1. Could you please
> > > comment on what is wrong with it / whether it will ever have a chance to
> > > be accepted in the way it is done ? 
> > 
> > It's in my queue right now, sorry.  I'll catch up on it in a few hours.

This is the updated version for 2.6.20-rc6.

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

[-- Attachment #2: usbhid.patch --]
[-- Type: text/x-patch, Size: 4635 bytes --]

diff -ur linux-2.6.20-rc6/drivers/usb/input/hid-core.c linux-2.6.20-rc6-sonne/drivers/usb/input/hid-core.c
--- linux-2.6.20-rc6/drivers/usb/input/hid-core.c	2007-01-25 03:19:28.000000000 +0100
+++ linux-2.6.20-rc6-sonne/drivers/usb/input/hid-core.c	2007-01-27 14:55:30.000000000 +0100
@@ -777,6 +777,7 @@
 #define USB_DEVICE_ID_APPLE_GEYSER4_JIS	0x021c
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY	0x030a
 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY	0x030b
+#define USB_DEVICE_ID_APPLE_IR		0x8240
 
 #define USB_VENDOR_ID_CHERRY		0x046a
 #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023
@@ -954,19 +955,21 @@
 
 	{ USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION, HID_QUIRK_CYMOTION },
 
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR, HID_QUIRK_IGNORE },
 
 	{ USB_VENDOR_ID_PANJIT, 0x0001, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
@@ -1072,6 +1075,11 @@
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
 
+	if ((quirks & HID_QUIRK_IGNORE_MOUSE) &&
+		(interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE))
+			return NULL;
+
+
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	    (!interface->desc.bNumEndpoints ||
 	     usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {

--- linux-2.6.20-rc6/include/linux/hid.h	2007-01-25 03:19:28.000000000 +0100
+++ linux-2.6.20-rc6-sonne/include/linux/hid.h	2007-01-27 11:05:51.000000000 +0100
@@ -264,6 +264,7 @@
 #define HID_QUIRK_INVERT_HWHEEL			0x00004000
 #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD        0x00008000
 #define HID_QUIRK_BAD_RELATIVE_KEYS		0x00010000
+#define HID_QUIRK_IGNORE_MOUSE			0x00020000
 
 /*
  * This is the global environment of the parser. This information is

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc6
  2007-01-27 14:08                           ` [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc6 Soeren Sonnenburg
@ 2007-01-29  9:38                             ` Jiri Kosina
  2007-01-29 10:59                               ` Soeren Sonnenburg
  2007-01-30 15:27                               ` Jiri Kosina
  0 siblings, 2 replies; 27+ messages in thread
From: Jiri Kosina @ 2007-01-29  9:38 UTC (permalink / raw)
  To: Soeren Sonnenburg, Greg KH
  Cc: Joseph Fannin, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

On Sat, 27 Jan 2007, Soeren Sonnenburg wrote:

> > > > I've noticed that this patch is not in 2.6.20-rc1. Could you please
> > > > comment on what is wrong with it / whether it will ever have a chance to
> > > > be accepted in the way it is done ? 
> > > It's in my queue right now, sorry.  I'll catch up on it in a few hours.
> This is the updated version for 2.6.20-rc6.

Greg,

do you have this already in your tree, or should I take it over?

Soeren - could you please submit your patch with proper Signed-off-by 
line?

Thanks,

-- 
Jiri Kosina

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc6
  2007-01-29  9:38                             ` Jiri Kosina
@ 2007-01-29 10:59                               ` Soeren Sonnenburg
  2007-01-30 15:27                               ` Jiri Kosina
  1 sibling, 0 replies; 27+ messages in thread
From: Soeren Sonnenburg @ 2007-01-29 10:59 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Greg KH, Joseph Fannin, Oliver Neukum, Sergey Vlasov,
	linux-kernel, linux-usb-devel

[-- Attachment #1: Type: text/plain, Size: 351 bytes --]

On Mon, 2007-01-29 at 10:38 +0100, Jiri Kosina wrote:
> On Sat, 27 Jan 2007, Soeren Sonnenburg wrote:
[...]
> Soeren - could you please submit your patch with proper Signed-off-by 
> line?

argh, sorry!

Attached!

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

[-- Attachment #2: usbhid.patch --]
[-- Type: text/x-patch, Size: 4735 bytes --]

Signed-off-by: Soeren Sonnenburg <kernel@nn7.de>
Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>

diff -ur linux-2.6.20-rc6/drivers/usb/input/hid-core.c linux-2.6.20-rc6-sonne/drivers/usb/input/hid-core.c
--- linux-2.6.20-rc6/drivers/usb/input/hid-core.c	2007-01-25 03:19:28.000000000 +0100
+++ linux-2.6.20-rc6-sonne/drivers/usb/input/hid-core.c	2007-01-27 14:55:30.000000000 +0100
@@ -777,6 +777,7 @@
 #define USB_DEVICE_ID_APPLE_GEYSER4_JIS	0x021c
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY	0x030a
 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY	0x030b
+#define USB_DEVICE_ID_APPLE_IR		0x8240
 
 #define USB_VENDOR_ID_CHERRY		0x046a
 #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023
@@ -954,19 +955,21 @@
 
 	{ USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION, HID_QUIRK_CYMOTION },
 
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR, HID_QUIRK_IGNORE },
 
 	{ USB_VENDOR_ID_PANJIT, 0x0001, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
@@ -1072,6 +1075,11 @@
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
 
+	if ((quirks & HID_QUIRK_IGNORE_MOUSE) &&
+		(interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE))
+			return NULL;
+
+
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	    (!interface->desc.bNumEndpoints ||
 	     usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {

--- linux-2.6.20-rc6/include/linux/hid.h	2007-01-25 03:19:28.000000000 +0100
+++ linux-2.6.20-rc6-sonne/include/linux/hid.h	2007-01-27 11:05:51.000000000 +0100
@@ -264,6 +264,7 @@
 #define HID_QUIRK_INVERT_HWHEEL			0x00004000
 #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD        0x00008000
 #define HID_QUIRK_BAD_RELATIVE_KEYS		0x00010000
+#define HID_QUIRK_IGNORE_MOUSE			0x00020000
 
 /*
  * This is the global environment of the parser. This information is

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc6
  2007-01-29  9:38                             ` Jiri Kosina
  2007-01-29 10:59                               ` Soeren Sonnenburg
@ 2007-01-30 15:27                               ` Jiri Kosina
  1 sibling, 0 replies; 27+ messages in thread
From: Jiri Kosina @ 2007-01-30 15:27 UTC (permalink / raw)
  To: Soeren Sonnenburg, Greg KH
  Cc: Joseph Fannin, Oliver Neukum, Sergey Vlasov, linux-kernel,
	linux-usb-devel

On Mon, 29 Jan 2007, Jiri Kosina wrote:

> > > > > I've noticed that this patch is not in 2.6.20-rc1. Could you 
> > > > > please comment on what is wrong with it / whether it will ever 
> > > > > have a chance to be accepted in the way it is done ?
> > > > It's in my queue right now, sorry.  I'll catch up on it in a few hours.
> > This is the updated version for 2.6.20-rc6.
> do you have this already in your tree, or should I take it over?

I have checked that it doesn't seem to be in Greg's patchset, so I merged 
it into hid tree.

Thanks,

-- 
Jiri Kosina

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2007-01-30 15:28 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-26  9:53 usb initialization order (usbhid vs. appletouch) Soeren Sonnenburg
2006-10-26 10:20 ` Oliver Neukum
2006-10-26 11:49   ` Soeren Sonnenburg
2006-10-26 12:36     ` Oliver Neukum
2006-10-28 16:56       ` Soeren Sonnenburg
2006-10-28 17:03         ` Oliver Neukum
2006-10-28 17:36           ` Soeren Sonnenburg
2006-10-28 18:14         ` [linux-usb-devel] " Sergey Vlasov
2006-10-28 18:14         ` Pete Zaitcev
2006-10-28 18:30           ` [linux-usb-devel] " Oliver Neukum
     [not found]         ` <200610282043.59106.oliver@neukum.org>
2006-10-28 18:55           ` Fwd: " Oliver Neukum
2006-10-28 19:14             ` Fwd: " Pete Zaitcev
2006-10-28 20:27             ` Fwd: Re: [linux-usb-devel] " Soeren Sonnenburg
2006-10-30 10:12               ` Joseph Fannin
2006-10-30 12:43                 ` Soeren Sonnenburg
2006-10-30 20:05                   ` Joseph Fannin
2006-11-01 20:47                     ` Soeren Sonnenburg
2006-12-08 17:19                 ` [PATCH] usbhid quirks for macbook(pro) (was: Re: Fwd: Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)) Soeren Sonnenburg
2006-12-10  2:08                   ` Joseph Fannin
2006-12-15  8:36                     ` Soeren Sonnenburg
2006-12-15 17:56                       ` Greg KH
2006-12-23 10:38                         ` [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc1 Soeren Sonnenburg
2007-01-27 14:08                           ` [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc6 Soeren Sonnenburg
2007-01-29  9:38                             ` Jiri Kosina
2007-01-29 10:59                               ` Soeren Sonnenburg
2007-01-30 15:27                               ` Jiri Kosina
2006-10-28 19:14         ` [linux-usb-devel] usb initialization order (usbhid vs. appletouch) Sergey Vlasov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).