linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] This adds support for keyboards on mid-2011 MacBook Airs
@ 2011-09-21 22:35 Jeff Mitchell
  2011-10-05  9:07 ` Henrik Rydberg
  0 siblings, 1 reply; 10+ messages in thread
From: Jeff Mitchell @ 2011-09-21 22:35 UTC (permalink / raw)
  To: linux-input; +Cc: jvdillon

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

 Hello,

 (Please include me explicitly in replies as I'm not subscribed to the 
 list.)

 This patch adds proper keyboard support for both MacBook Air 4,1 and 
 4,2 models (11" and 13" mid-2011 releases). It is based mostly on work 
 by Joshua Dillon.

 This fixes the issues with the previously-submitted patch by 
 Pieter-Augustijn Van Malleghem (subject: [PATCH] Add MacBookAir4,1 
 keyboard support), namely using an incorrect table, and also contains 
 support for both the 4,1 and 4,2 models instead of just the 4,1 model.

 Thanks,
 Jeff

[-- Attachment #2: 0001-This-adds-support-for-keyboards-on-mid-2011-MacBook-.patch --]
[-- Type: text/plain, Size: 4068 bytes --]

From e0f31e3d1a89831239676baa9bb244feee153133 Mon Sep 17 00:00:00 2001
From: Jeff Mitchell <jeff@jefferai.org>
Date: Wed, 21 Sep 2011 18:20:06 -0400
Subject: [PATCH] This adds support for keyboards on mid-2011 MacBook Airs
 (both the 11" 4,1 and 13" 4,2 models). Confusingly, 4,1
 corresponds to WELLSPRING6A and 4,2 corresponds to
 WELLSPRING6.

The patch is a cleaned up version of that created by Josh Dillon (jvdillon@gmail.com).

Signed-off-by: Jeff Mitchell <jeff@jefferai.org>
---
 drivers/hid/hid-apple.c |   12 ++++++++++++
 drivers/hid/hid-core.c  |    6 ++++++
 drivers/hid/hid-ids.h   |    6 ++++++
 3 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index 18b3bc6..03e6fb0 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -493,6 +493,18 @@ 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_WELLSPRING5_JIS),
 		.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI),
+		.driver_data = APPLE_HAS_FN },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO),
+		.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS),
+		.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI),
+		.driver_data = APPLE_HAS_FN },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ISO),
+		.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_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 242353d..96344ff0 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1340,6 +1340,12 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_ISO) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING5_JIS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_ISO) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING6_JIS) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ANSI) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_ISO) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_REVB_JIS) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 7484e1b..8b37036 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -109,6 +109,12 @@
 #define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI	0x0245
 #define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO	0x0246
 #define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS	0x0247
+#define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI	0x0249
+#define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO	0x024a
+#define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS	0x024b
+#define USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI	0x024c
+#define USB_DEVICE_ID_APPLE_WELLSPRING6_ISO	0x024d
+#define USB_DEVICE_ID_APPLE_WELLSPRING6_JIS	0x024e
 #define USB_DEVICE_ID_APPLE_ALU_REVB_ANSI	0x024f
 #define USB_DEVICE_ID_APPLE_ALU_REVB_ISO	0x0250
 #define USB_DEVICE_ID_APPLE_ALU_REVB_JIS	0x0251
-- 
1.7.6.2


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

end of thread, other threads:[~2011-10-06 14:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-21 22:35 [PATCH] This adds support for keyboards on mid-2011 MacBook Airs Jeff Mitchell
2011-10-05  9:07 ` Henrik Rydberg
2011-10-05  9:04   ` Jiri Kosina
2011-10-05  9:48     ` Henrik Rydberg
2011-10-05 10:13       ` Jiri Kosina
2011-10-05 14:16         ` Jeff Mitchell
2011-10-05 17:28           ` Henrik Rydberg
2011-10-05 17:28             ` Jiri Kosina
2011-10-05 17:43               ` Henrik Rydberg
2011-10-06 14:56                 ` Jeff Mitchell

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).