* [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
@ 2012-10-30 19:51 Dirk Hohndel
2012-10-30 22:22 ` Henrik Rydberg
0 siblings, 1 reply; 7+ messages in thread
From: Dirk Hohndel @ 2012-10-30 19:51 UTC (permalink / raw)
To: linux-input; +Cc: Jiri Kosina, Henrik Rydberg, Linus Torvalds
>From 364d79a254029881345d34ab02d5127fe74e288c Mon Sep 17 00:00:00 2001
From: Dirk Hohndel <dirk@hohndel.org>
Date: Tue, 30 Oct 2012 11:11:48 -0700
Subject: [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
This enables the existing drivers for keyboard and touchpad with the new
USB IDs found on the MBP 13" Reasonable Resolution (also known as the
Retina Display).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
---
drivers/hid/hid-apple.c | 6 ++++++
drivers/hid/hid-core.c | 3 +++
drivers/hid/hid-ids.h | 3 +++
drivers/input/mouse/bcm5974.c | 21 +++++++++++++++++++++
4 files changed, 33 insertions(+)
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 06ebdbb..fd7722a 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -522,6 +522,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_WELLSPRING7_JIS),
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
+ .driver_data = APPLE_HAS_FN },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
+ .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index bd3971b..e0f7a83 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1532,6 +1532,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ISO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 269b509..9d7a428 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -118,6 +118,9 @@
#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI 0x0252
#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO 0x0253
#define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS 0x0254
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b
#define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI 0x0249
#define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO 0x024a
#define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS 0x024b
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index 3a78f23..2baff1b 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -84,6 +84,10 @@
#define USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI 0x0262
#define USB_DEVICE_ID_APPLE_WELLSPRING7_ISO 0x0263
#define USB_DEVICE_ID_APPLE_WELLSPRING7_JIS 0x0264
+/* MacbookPro10,2 (unibody, October 2012) */
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b
#define BCM5974_DEVICE(prod) { \
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
@@ -137,6 +141,10 @@ static const struct usb_device_id bcm5974_table[] = {
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI),
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ISO),
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_JIS),
+ /* MacbookPro10,2 */
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
/* Terminating entry */
{}
};
@@ -379,6 +387,19 @@ static const struct bcm5974_config bcm5974_config_table[] = {
{ SN_COORD, -150, 6730 },
{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
},
+ {
+ USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI,
+ USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO,
+ USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS,
+ HAS_INTEGRATED_BUTTON,
+ 0x84, sizeof(struct bt_data),
+ 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
+ { SN_PRESSURE, 0, 300 },
+ { SN_WIDTH, 0, 2048 },
+ { SN_COORD, -4750, 5280 },
+ { SN_COORD, -150, 6730 },
+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
+ },
{}
};
--
1.8.0.rc0.18.gf84667d
--
Dirk Hohndel
Intel Open Source Technology Center
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
2012-10-30 19:51 [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad Dirk Hohndel
@ 2012-10-30 22:22 ` Henrik Rydberg
2012-10-30 22:28 ` Dirk Hohndel
0 siblings, 1 reply; 7+ messages in thread
From: Henrik Rydberg @ 2012-10-30 22:22 UTC (permalink / raw)
To: Dirk Hohndel; +Cc: linux-input, Jiri Kosina, Linus Torvalds
Hi Dirk,
> From 364d79a254029881345d34ab02d5127fe74e288c Mon Sep 17 00:00:00 2001
> From: Dirk Hohndel <dirk@hohndel.org>
> Date: Tue, 30 Oct 2012 11:11:48 -0700
> Subject: [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
>
> This enables the existing drivers for keyboard and touchpad with the new
> USB IDs found on the MBP 13" Reasonable Resolution (also known as the
> Retina Display).
>
> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
> ---
> drivers/hid/hid-apple.c | 6 ++++++
> drivers/hid/hid-core.c | 3 +++
> drivers/hid/hid-ids.h | 3 +++
> drivers/input/mouse/bcm5974.c | 21 +++++++++++++++++++++
> 4 files changed, 33 insertions(+)
Thanks for the patch, nice to see the 13'' in the open. One comment below.
>
> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> index 06ebdbb..fd7722a 100644
> --- a/drivers/hid/hid-apple.c
> +++ b/drivers/hid/hid-apple.c
> @@ -522,6 +522,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_WELLSPRING7_JIS),
> .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
> + .driver_data = APPLE_HAS_FN },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
> + .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
> + .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index bd3971b..e0f7a83 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1532,6 +1532,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI) },
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ISO) },
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
The entry in hid_mouse_ignore_list seems to be missing.
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 269b509..9d7a428 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -118,6 +118,9 @@
> #define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI 0x0252
> #define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO 0x0253
> #define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS 0x0254
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b
> #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI 0x0249
> #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO 0x024a
> #define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS 0x024b
> diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
> index 3a78f23..2baff1b 100644
> --- a/drivers/input/mouse/bcm5974.c
> +++ b/drivers/input/mouse/bcm5974.c
> @@ -84,6 +84,10 @@
> #define USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI 0x0262
> #define USB_DEVICE_ID_APPLE_WELLSPRING7_ISO 0x0263
> #define USB_DEVICE_ID_APPLE_WELLSPRING7_JIS 0x0264
> +/* MacbookPro10,2 (unibody, October 2012) */
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b
>
> #define BCM5974_DEVICE(prod) { \
> .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
> @@ -137,6 +141,10 @@ static const struct usb_device_id bcm5974_table[] = {
> BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI),
> BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ISO),
> BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_JIS),
> + /* MacbookPro10,2 */
> + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
> + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
> + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
> /* Terminating entry */
> {}
> };
> @@ -379,6 +387,19 @@ static const struct bcm5974_config bcm5974_config_table[] = {
> { SN_COORD, -150, 6730 },
> { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
> },
> + {
> + USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI,
> + USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO,
> + USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS,
> + HAS_INTEGRATED_BUTTON,
> + 0x84, sizeof(struct bt_data),
> + 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
> + { SN_PRESSURE, 0, 300 },
> + { SN_WIDTH, 0, 2048 },
> + { SN_COORD, -4750, 5280 },
> + { SN_COORD, -150, 6730 },
> + { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
> + },
> {}
> };
Thanks,
Henrik
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
2012-10-30 22:22 ` Henrik Rydberg
@ 2012-10-30 22:28 ` Dirk Hohndel
2012-10-31 5:48 ` Dmitry Torokhov
0 siblings, 1 reply; 7+ messages in thread
From: Dirk Hohndel @ 2012-10-30 22:28 UTC (permalink / raw)
To: Henrik Rydberg; +Cc: linux-input, Jiri Kosina, Linus Torvalds
On October 30, 2012 3:22:11 PM "Henrik Rydberg" <rydberg@euromail.se> wrote:
> Hi Dirk,
>
>
>
> The entry in hid_mouse_ignore_list seems to be missing.
Correct. It works fine without that.
I'm on my phone but I think there's a comment somewhere that for
certain multi-touch devices the ignore wasn't needed.
The keyboard definitely needs it, though.
Let me phrase it this way: the patch, as submitted, happily works on my rMBP 13
/D
--
Sent from my phone
Please excuse brevity and autocorrect mistakes
Sent with AquaMail for Android
http://www.aqua-mail.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
2012-10-30 22:28 ` Dirk Hohndel
@ 2012-10-31 5:48 ` Dmitry Torokhov
2012-10-31 6:02 ` Dirk Hohndel
0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Torokhov @ 2012-10-31 5:48 UTC (permalink / raw)
To: Dirk Hohndel; +Cc: Henrik Rydberg, linux-input, Jiri Kosina, Linus Torvalds
Hi Dirk,
On Tue, Oct 30, 2012 at 03:28:08PM -0700, Dirk Hohndel wrote:
> On October 30, 2012 3:22:11 PM "Henrik Rydberg" <rydberg@euromail.se> wrote:
> >Hi Dirk,
> >
> >
> >
> >The entry in hid_mouse_ignore_list seems to be missing.
>
> Correct. It works fine without that.
Pure luck I think as entries for bcm5974 get sorted before entries for
HID. To be safe and make sure it works if hid is built-in we need to add
the new devices to hid_mouse_ignore_list.
>
> I'm on my phone but I think there's a comment somewhere that for
> certain multi-touch devices the ignore wasn't needed.
That for devices driven by hid-multitouch, so not applicable to this
case.
>
> The keyboard definitely needs it, though.
>
> Let me phrase it this way: the patch, as submitted, happily works on my rMBP 13
By pure luck.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
2012-10-31 5:48 ` Dmitry Torokhov
@ 2012-10-31 6:02 ` Dirk Hohndel
2012-10-31 6:34 ` Dmitry Torokhov
0 siblings, 1 reply; 7+ messages in thread
From: Dirk Hohndel @ 2012-10-31 6:02 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Henrik Rydberg, linux-input, Jiri Kosina, Linus Torvalds
[-- Attachment #1: Type: text/plain, Size: 768 bytes --]
Dmitry Torokhov <dmitry.torokhov@gmail.com> writes:
>> >
>> >The entry in hid_mouse_ignore_list seems to be missing.
>>
>> Correct. It works fine without that.
>
> Pure luck I think as entries for bcm5974 get sorted before entries for
> HID. To be safe and make sure it works if hid is built-in we need to add
> the new devices to hid_mouse_ignore_list.
Erm - what makes you think I tested this as a module? Actually, come to
think of, I ONLY tested this built in.
> That for devices driven by hid-multitouch, so not applicable to this
> case.
Ok, thanks
>> The keyboard definitely needs it, though.
>>
>> Let me phrase it this way: the patch, as submitted, happily works on my rMBP 13
>
> By pure luck.
I'll take your word for it. Here's an updated patch
/D
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-support-for-the-MacBook-Pro-10-2-keyboard-touchp.patch --]
[-- Type: text/x-patch, Size: 5896 bytes --]
>From 67842b2edeb26e90f2805160e06163ab5f7d87f0 Mon Sep 17 00:00:00 2001
From: Dirk Hohndel <dirk@hohndel.org>
Date: Tue, 30 Oct 2012 11:11:48 -0700
Subject: [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
This enables the existing drivers for keyboard and touchpad with the new
USB IDs found on the MBP 13" Reasonable Resolution (also known as the
Retina Display).
Added entries to both keyboard and mouse ignore lists.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
---
drivers/hid/hid-apple.c | 6 ++++++
drivers/hid/hid-core.c | 6 ++++++
drivers/hid/hid-ids.h | 3 +++
drivers/input/mouse/bcm5974.c | 21 +++++++++++++++++++++
4 files changed, 36 insertions(+)
diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 06ebdbb..fd7722a 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -522,6 +522,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_WELLSPRING7_JIS),
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
+ .driver_data = APPLE_HAS_FN },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
+ .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
+ .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index bd3971b..f4109fd 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1532,6 +1532,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ISO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
@@ -2139,6 +2142,9 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ISO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_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) },
{ }
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 269b509..9d7a428 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -118,6 +118,9 @@
#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI 0x0252
#define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO 0x0253
#define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS 0x0254
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b
#define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI 0x0249
#define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO 0x024a
#define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS 0x024b
diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index 3a78f23..2baff1b 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -84,6 +84,10 @@
#define USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI 0x0262
#define USB_DEVICE_ID_APPLE_WELLSPRING7_ISO 0x0263
#define USB_DEVICE_ID_APPLE_WELLSPRING7_JIS 0x0264
+/* MacbookPro10,2 (unibody, October 2012) */
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a
+#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b
#define BCM5974_DEVICE(prod) { \
.match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
@@ -137,6 +141,10 @@ static const struct usb_device_id bcm5974_table[] = {
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI),
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ISO),
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_JIS),
+ /* MacbookPro10,2 */
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
/* Terminating entry */
{}
};
@@ -379,6 +387,19 @@ static const struct bcm5974_config bcm5974_config_table[] = {
{ SN_COORD, -150, 6730 },
{ SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
},
+ {
+ USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI,
+ USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO,
+ USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS,
+ HAS_INTEGRATED_BUTTON,
+ 0x84, sizeof(struct bt_data),
+ 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
+ { SN_PRESSURE, 0, 300 },
+ { SN_WIDTH, 0, 2048 },
+ { SN_COORD, -4750, 5280 },
+ { SN_COORD, -150, 6730 },
+ { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
+ },
{}
};
--
1.8.0.rc0.18.gf84667d
[-- Attachment #3: Type: text/plain, Size: 54 bytes --]
--
Dirk Hohndel
Intel Open Source Technology Center
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
2012-10-31 6:02 ` Dirk Hohndel
@ 2012-10-31 6:34 ` Dmitry Torokhov
2012-10-31 7:41 ` Jiri Kosina
0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Torokhov @ 2012-10-31 6:34 UTC (permalink / raw)
To: Dirk Hohndel, Jiri Kosina; +Cc: Henrik Rydberg, linux-input, Linus Torvalds
On Tue, Oct 30, 2012 at 11:02:28PM -0700, Dirk Hohndel wrote:
> Dmitry Torokhov <dmitry.torokhov@gmail.com> writes:
> >> >
> >> >The entry in hid_mouse_ignore_list seems to be missing.
> >>
> >> Correct. It works fine without that.
> >
> > Pure luck I think as entries for bcm5974 get sorted before entries for
> > HID. To be safe and make sure it works if hid is built-in we need to add
> > the new devices to hid_mouse_ignore_list.
>
> Erm - what makes you think I tested this as a module? Actually, come to
> think of, I ONLY tested this built in.
>
> > That for devices driven by hid-multitouch, so not applicable to this
> > case.
>
> Ok, thanks
>
> >> The keyboard definitely needs it, though.
> >>
> >> Let me phrase it this way: the patch, as submitted, happily works on my rMBP 13
> >
> > By pure luck.
>
> I'll take your word for it. Here's an updated patch
Thanks!
Jiri, do you want me to take it through my tree or yours?
>
> /D
>
> From 67842b2edeb26e90f2805160e06163ab5f7d87f0 Mon Sep 17 00:00:00 2001
> From: Dirk Hohndel <dirk@hohndel.org>
> Date: Tue, 30 Oct 2012 11:11:48 -0700
> Subject: [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
>
> This enables the existing drivers for keyboard and touchpad with the new
> USB IDs found on the MBP 13" Reasonable Resolution (also known as the
> Retina Display).
>
> Added entries to both keyboard and mouse ignore lists.
>
> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
> ---
> drivers/hid/hid-apple.c | 6 ++++++
> drivers/hid/hid-core.c | 6 ++++++
> drivers/hid/hid-ids.h | 3 +++
> drivers/input/mouse/bcm5974.c | 21 +++++++++++++++++++++
> 4 files changed, 36 insertions(+)
>
> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> index 06ebdbb..fd7722a 100644
> --- a/drivers/hid/hid-apple.c
> +++ b/drivers/hid/hid-apple.c
> @@ -522,6 +522,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_WELLSPRING7_JIS),
> .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
> + .driver_data = APPLE_HAS_FN },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
> + .driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
> + .driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
> .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index bd3971b..f4109fd 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1532,6 +1532,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI) },
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ISO) },
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
> { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
> @@ -2139,6 +2142,9 @@ static const struct hid_device_id hid_mouse_ignore_list[] = {
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI) },
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_ISO) },
> { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7_JIS) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
> + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_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) },
> { }
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 269b509..9d7a428 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -118,6 +118,9 @@
> #define USB_DEVICE_ID_APPLE_WELLSPRING5A_ANSI 0x0252
> #define USB_DEVICE_ID_APPLE_WELLSPRING5A_ISO 0x0253
> #define USB_DEVICE_ID_APPLE_WELLSPRING5A_JIS 0x0254
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b
> #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI 0x0249
> #define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO 0x024a
> #define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS 0x024b
> diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
> index 3a78f23..2baff1b 100644
> --- a/drivers/input/mouse/bcm5974.c
> +++ b/drivers/input/mouse/bcm5974.c
> @@ -84,6 +84,10 @@
> #define USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI 0x0262
> #define USB_DEVICE_ID_APPLE_WELLSPRING7_ISO 0x0263
> #define USB_DEVICE_ID_APPLE_WELLSPRING7_JIS 0x0264
> +/* MacbookPro10,2 (unibody, October 2012) */
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI 0x0259
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO 0x025a
> +#define USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS 0x025b
>
> #define BCM5974_DEVICE(prod) { \
> .match_flags = (USB_DEVICE_ID_MATCH_DEVICE | \
> @@ -137,6 +141,10 @@ static const struct usb_device_id bcm5974_table[] = {
> BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ANSI),
> BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_ISO),
> BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7_JIS),
> + /* MacbookPro10,2 */
> + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI),
> + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO),
> + BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS),
> /* Terminating entry */
> {}
> };
> @@ -379,6 +387,19 @@ static const struct bcm5974_config bcm5974_config_table[] = {
> { SN_COORD, -150, 6730 },
> { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
> },
> + {
> + USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI,
> + USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO,
> + USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS,
> + HAS_INTEGRATED_BUTTON,
> + 0x84, sizeof(struct bt_data),
> + 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
> + { SN_PRESSURE, 0, 300 },
> + { SN_WIDTH, 0, 2048 },
> + { SN_COORD, -4750, 5280 },
> + { SN_COORD, -150, 6730 },
> + { SN_ORIENT, -MAX_FINGER_ORIENTATION, MAX_FINGER_ORIENTATION }
> + },
> {}
> };
>
> --
> 1.8.0.rc0.18.gf84667d
>
>
> --
> Dirk Hohndel
> Intel Open Source Technology Center
--
Dmitry
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad
2012-10-31 6:34 ` Dmitry Torokhov
@ 2012-10-31 7:41 ` Jiri Kosina
0 siblings, 0 replies; 7+ messages in thread
From: Jiri Kosina @ 2012-10-31 7:41 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Dirk Hohndel, Henrik Rydberg, linux-input, Linus Torvalds
On Tue, 30 Oct 2012, Dmitry Torokhov wrote:
> > > Pure luck I think as entries for bcm5974 get sorted before entries for
> > > HID. To be safe and make sure it works if hid is built-in we need to add
> > > the new devices to hid_mouse_ignore_list.
> >
> > Erm - what makes you think I tested this as a module? Actually, come to
> > think of, I ONLY tested this built in.
> >
> > > That for devices driven by hid-multitouch, so not applicable to this
> > > case.
> >
> > Ok, thanks
> >
> > >> The keyboard definitely needs it, though.
> > >>
> > >> Let me phrase it this way: the patch, as submitted, happily works on my rMBP 13
> > >
> > > By pure luck.
> >
> > I'll take your word for it. Here's an updated patch
>
> Thanks!
>
> Jiri, do you want me to take it through my tree or yours?
Thanks everybody. I have now applied it.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-10-31 7:41 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-30 19:51 [PATCH] Add support for the MacBook Pro 10,2 keyboard / touchpad Dirk Hohndel
2012-10-30 22:22 ` Henrik Rydberg
2012-10-30 22:28 ` Dirk Hohndel
2012-10-31 5:48 ` Dmitry Torokhov
2012-10-31 6:02 ` Dirk Hohndel
2012-10-31 6:34 ` Dmitry Torokhov
2012-10-31 7:41 ` Jiri Kosina
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).