hid: Complete support for the new unibody macbooks
PATCH 1/1 hid: Complete support for the new unibody macbooks
The unibody MacBook 5 and MacBook Pro 5 come with a new version of the bcm5974 trackpad. This patch adds the USB device ids and all the appropriate quirks, including hid_blacklist.
--- drivers/hid/hid-apple.c | 6 ++++++ drivers/hid/hid-core.c | 6 ++++++ drivers/hid/hid-ids.h | 3 +++ 3 files changed, 15 insertions(+), 0 deletions(-)
drivers/hid/hid-apple.c +6 -0
@@ -418,6 +418,12 @@ static const struct hid_device_id apple_devices[] = { .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS), .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI), + .driver_data = APPLE_HAS_FN }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO), + .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS), + .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY), .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY),
drivers/hid/hid-core.c +6 -0
@@ -1250,6 +1250,9 @@ static const struct hid_device_id hid_blacklist[] = { { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, { HID_USB_DEVICE(USB_VENDOR_ID_AVERMEDIA, USB_DEVICE_ID_AVER_FM_MR800) },
@@ -1572,6 +1575,9 @@ static const struct hid_device_id hid_mouse_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, { }
drivers/hid/hid-ids.h +3 -0
@@ -82,6 +82,9 @@#define USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI 0x0230#define USB_DEVICE_ID_APPLE_WELLSPRING2_ISO 0x0231#define USB_DEVICE_ID_APPLE_WELLSPRING2_JIS 0x0232 +#define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236 +#define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237 +#define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241
Signature · 1 line
1.5.6.3
Jiri Kosina
AppliedQuoted 5 lines · Henrik Rydberg
The unibody MacBook 5 and MacBook Pro 5 come with a new version of the bcm5974 trackpad. This patch adds the USB device ids and all the appropriate quirks, including
hid_blacklist.Signed-off-by Henrik Rydberg <[email protected]>
Applied, thanks Henrik (and sorry for the delay, I have been offline for a few days).
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 11 lines · Jiri Kosina
Quoted 5 lines · Henrik Rydberg
The unibody MacBook 5 and MacBook Pro 5 come with a new version of the bcm5974 trackpad. This patch adds the USB device ids and all the appropriate quirks, including
hid_blacklist.Signed-off-by Henrik Rydberg <[email protected]>Applied, thanks Henrik (and sorry for the delay, I have been offline for a few days).
No worries. I should have mentioned earlier that the hid update is best synchronized with the bcm5974 update, since the latter is the only driver that will pick the mouse interface up after the hid update. The bcm5974 patch was sent on October 23, but I have not received any feedback to it yet.
Cheers,
Henrik
Quoted 5 lines · Henrik Rydberg
No worries. I should have mentioned earlier that the hid update is best synchronized with the bcm5974 update, since the latter is the only driver that will pick the mouse interface up after the hid update. The bcm5974 patch was sent on October 23, but I have not received any feedback to it yet.
Yes, I am aware of bcm5974 being dependent in HID driver not claiming the mouse interface on this hardware.
Dmitry, what are your plans with this bcm5974 patch? 2.6.28 or 2.6.29?
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 8 lines · Jiri Kosina
Quoted 5 lines · Henrik Rydberg
No worries. I should have mentioned earlier that the hid update is best synchronized with the bcm5974 update, since the latter is the only driver that will pick the mouse interface up after the hid update. The bcm5974 patch was sent on October 23, but I have not received any feedback to it yet.
Quoted 5 lines
Yes, I am aware of bcm5974 being dependent in HID driver not claiming the mouse interface on this hardware.
Dmitry, what are your plans with this bcm5974 patch? 2.6.28 or 2.6.29?
2.6.29 - the driver is in use so I did nto want to touch it after .28 merge window closed. Also I am moving to the west coast so swamped anyways but I hope I will be somewhat settled after December 8th.
Btw, if you see something that you think needs to go into .28 for input could please merge it for me? I also going to ask Linus to pull from my for-linus branch in the next couple of days.
Thanks!
Signature · 1 line
Dmitry
Quoted 5 lines · Dmitry Torokhov
Quoted 3 lines
Yes, I am aware of bcm5974 being dependent in HID driver not claiming the mouse interface on this hardware.
Dmitry, what are your plans with this bcm5974 patch? 2.6.28 or 2.6.29?2.6.29 - the driver is in use so I did nto want to touch it after .28 merge window closed.
I see. I have already pushed the bits that ignore the mouse interface on the hardware in question in HID code. But that should be perfectly fine, as as the HID driver can't do anything with that mouse anyway.
Quoted 5 lines
Also I am moving to the west coast so swamped anyways but I hope I will be somewhat settled after December 8th.
Btw, if you see something that you think needs to go into .28 for input could please merge it for me? I also going to ask Linus to pull from my for-linus branch in the next couple of days.
Sure, no problem, I will keep an eye on incoming input patches before you are fully settled again, and if anything new urgent comes, I will merge it for .28.
Signature · 2 lines
Jiri Kosina SUSE Labs
Jiri Kosina wrote:
[...]
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines
Yes, I am aware of bcm5974 being dependent in HID driver not claiming the mouse interface on this hardware.
Dmitry, what are your plans with this bcm5974 patch? 2.6.28 or 2.6.29?2.6.29 - the driver is in use so I did nto want to touch it after .28 merge window closed.
I see. I have already pushed the bits that ignore the mouse interface on the hardware in question in HID code. But that should be perfectly fine, as as the HID driver can't do anything with that mouse anyway.
Without the mouse ignore quirk, HID will find the "normal" usb mouse interface. The current situation is much worse than to throw the bcm5974 patches in untested. And this is not even the case; the updated driver has been in use as a dkms package for almost a month.
Cheers,
Henrik
Quoted 4 lines · Henrik Rydberg
Without the mouse ignore quirk, HID will find the "normal" usb mouse interface. The current situation is much worse than to throw the bcm5974 patches in untested. And this is not even the case; the updated driver has been in use as a dkms package for almost a month.
Therefore my memory must have been wrong -- I thought that you told me when I was merging f89bd95c5c that the devices are not standard HID devices at all, and therefore they can be safely ignored by the driver right away, as they can't be driven by HID driver anyway.
If this is not the case, I'll then revert the hid_mouse_ignore_list[] addition peformed in a96d6ef34 and will push it for 2.6.29, so that it goes in together with bcm5974 driver modifications.
Thanks and sorry if I messed this up,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 11 lines · Jiri Kosina
Quoted 4 lines · Henrik Rydberg
Without the mouse ignore quirk, HID will find the "normal" usb mouse interface. The current situation is much worse than to throw the bcm5974 patches in untested. And this is not even the case; the updated driver has been in use as a dkms package for almost a month.
Therefore my memory must have been wrong -- I thought that you told me when I was merging
f89bd95c5cthat the devices are not standard HID devices at all, and therefore they can be safely ignored by the driver right away, as they can't be driven by HID driver anyway.
These usb devices provide several different functions through the same interface. By default, it looks like a regular mouse interface, which HID will claim. This is why we need the quirks.
Quoted 3 lines
If this is not the case, I'll then revert the hid_mouse_ignore_list[] addition peformed in
a96d6ef34and will push it for 2.6.29, so that it goes in together with bcm5974 driver modifications.
Yes, I think that is best.
Quoted 1 line
Thanks and sorry if I messed this up,
No harm done. :-)
Thanks,
Henrik
Quoted 7 lines · Henrik Rydberg
Quoted 4 lines
Therefore my memory must have been wrong -- I thought that you told me when I was merging
f89bd95c5cthat the devices are not standard HID devices at all, and therefore they can be safely ignored by the driver right away, as they can't be driven by HID driver anyway.These usb devices provide several different functions through the same interface. By default, it looks like a regular mouse interface, which HID will claim. This is why we need the quirks.
That I fully understand. But I though that the device is so much HID standard non-compliant, that even basic functionality is not possible with the generic HID driver, and therefore blacklisting it immediately can't do any harm. That's what I understood previously. But if this is wrong, and the HID code can get at least basic functionality from the device, I will revert the blacklist addition.
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 10 lines · Jiri Kosina
Quoted 7 lines · Henrik Rydberg
Quoted 4 lines
Therefore my memory must have been wrong -- I thought that you told me when I was merging
f89bd95c5cthat the devices are not standard HID devices at all, and therefore they can be safely ignored by the driver right away, as they can't be driven by HID driver anyway.These usb devices provide several different functions through the same interface. By default, it looks like a regular mouse interface, which HID will claim. This is why we need the quirks.
Quoted 6 lines
That I fully understand. But I though that the device is so much HID standard non-compliant, that even basic functionality is not possible with the generic HID driver, and therefore blacklisting it immediately can't do any harm. That's what I understood previously. But if this is wrong, and the HID code can get at least basic functionality from the device, I will revert the blacklist addition.
Basic functionality is possible with the generic HID driver.
Thanks,
Henrik
Quoted 4 lines · Henrik Rydberg
Quoted 3 lines
If this is not the case, I'll then revert the hid_mouse_ignore_list[] addition peformed in
a96d6ef34and will push it for 2.6.29, so that it goes in together with bcm5974 driver modifications.Yes, I think that is best.
OK, so I have queued this for 2.6.28
From: Jiri Kosina <[email protected]>
Subject: HID: unignore mouse on unibody macbooks
In commit a96d6ef34, the mouse interfaces on the unibody macbooks were put into hid mouse ignore list. This was a little bit too premature though, as the corresponding bcm5974 changes are scheduled for 2.6.29.
Remove these devices from the ignore list for now, in order to provide at least basic functionality with the HID driver.
Will be reintroduced in 2.6.29
--- drivers/hid/hid-core.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/hid/hid-core.c +0 -3
@@ -1576,9 +1576,6 @@ static const struct hid_device_id hid_mouse_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) }, - { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, { }
And this for 2.6.29
From: Jiri Kosina <[email protected]>
Subject: HID: ignore mouse interface for unibody macbooks
The mouse interface on unibody macbooks is going to be handled by bcm59743 driver in 2.6.29.
--- drivers/hid/hid-core.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/hid/hid-core.c +3 -0
@@ -1576,6 +1576,9 @@ static const struct hid_device_id hid_mouse_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, { }
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs