Add patches Bastien pointed out for MacBookAir 4,1 support

This commit is contained in:
Josh Boyer 2011-09-14 09:21:29 -04:00
parent 35fd65a181
commit b226a238b4
4 changed files with 298 additions and 1 deletions

View File

@ -0,0 +1,67 @@
Path: news.gmane.org!not-for-mail
From: Pieter-Augustijn Van Malleghem <p-a-rJAIWvhRp0CZIoH1IeqzKA@public.gmane.org>
Newsgroups: gmane.linux.bluez.kernel
Subject: [PATCH] Add MacBookAir4,1 support
Date: Wed, 7 Sep 2011 02:28:10 -0400
Lines: 18
Approved: news@gmane.org
Message-ID: <20110907062810.GA4755@Caligula>
NNTP-Posting-Host: lo.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: dough.gmane.org 1315376918 16651 80.91.229.12 (7 Sep 2011 06:28:38 GMT)
X-Complaints-To: usenet@dough.gmane.org
NNTP-Posting-Date: Wed, 7 Sep 2011 06:28:38 +0000 (UTC)
To: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Original-X-From: linux-bluetooth-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Wed Sep 07 08:28:35 2011
Return-path: <linux-bluetooth-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Envelope-to: glbk-linux-bluetooth-1dZseelyfdZg9hUCZPvPmw@public.gmane.org
Original-Received: from vger.kernel.org ([209.132.180.67])
by lo.gmane.org with esmtp (Exim 4.69)
(envelope-from <linux-bluetooth-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>)
id 1R1Bce-00013w-IP
for glbk-linux-bluetooth-1dZseelyfdZg9hUCZPvPmw@public.gmane.org; Wed, 07 Sep 2011 08:28:32 +0200
Original-Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand
id S1755760Ab1IGG22 (ORCPT
<rfc822;glbk-linux-bluetooth@m.gmane.org>);
Wed, 7 Sep 2011 02:28:28 -0400
Original-Received: from mail-qy0-f174.google.com ([209.85.216.174]:48109 "EHLO
mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1756054Ab1IGG2V (ORCPT
<rfc822;linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>);
Wed, 7 Sep 2011 02:28:21 -0400
Original-Received: by qyk7 with SMTP id 7so455185qyk.19
for <linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; Tue, 06 Sep 2011 23:28:20 -0700 (PDT)
Original-Received: by 10.224.192.6 with SMTP id do6mr4345154qab.189.1315376900296;
Tue, 06 Sep 2011 23:28:20 -0700 (PDT)
Original-Received: from Caligula ([140.247.187.88])
by mx.google.com with ESMTPS id dr7sm2176040qab.26.2011.09.06.23.28.19
(version=TLSv1/SSLv3 cipher=OTHER);
Tue, 06 Sep 2011 23:28:19 -0700 (PDT)
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
Original-Sender: linux-bluetooth-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Precedence: bulk
List-ID: <linux-bluetooth.vger.kernel.org>
X-Mailing-List: linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Xref: news.gmane.org gmane.linux.bluez.kernel:16281
Archived-At: <http://permalink.gmane.org/gmane.linux.bluez.kernel/16281>
This patch against current git adds the hardware ID for the Apple
MacBookAir4,1, released in July 2011. The device features a BCM2046
USB chip. The patch was inspired by the previous modifications adding
support for the MacBookAir3,x.
Signed-off-by: Pieter-Augustijn Van Malleghem <p-a-rJAIWvhRp0CZIoH1IeqzKA@public.gmane.org>
--- linux/drivers/bluetooth/btusb.c 2011-09-06 23:41:57.000000000 -0400
+++ patched/drivers/bluetooth/btusb.c 2011-09-06 23:50:27.000000000 -0400
@@ -72,6 +72,9 @@
/* Apple MacBookAir3,1, MacBookAir3,2 */
{ USB_DEVICE(0x05ac, 0x821b) },
+ /* Apple MacBookAir4,1 */
+ { USB_DEVICE(0x05ac, 0x821f) },
+
/* Apple MacBookPro8,2 */
{ USB_DEVICE(0x05ac, 0x821a) },

View File

@ -0,0 +1,119 @@
Path: news.gmane.org!not-for-mail
From: Pieter-Augustijn Van Malleghem <p-a@scarlet.be>
Newsgroups: gmane.linux.kernel.input
Subject: [PATCH] Add MacBookAir4,1 keyboard support
Date: Wed, 7 Sep 2011 16:15:52 -0400
Lines: 72
Approved: news@gmane.org
Message-ID: <20110907201552.GA1962@Caligula>
NNTP-Posting-Host: lo.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: dough.gmane.org 1315426570 11003 80.91.229.12 (7 Sep 2011 20:16:10 GMT)
X-Complaints-To: usenet@dough.gmane.org
NNTP-Posting-Date: Wed, 7 Sep 2011 20:16:10 +0000 (UTC)
To: linux-input@vger.kernel.org
Original-X-From: linux-input-owner@vger.kernel.org Wed Sep 07 22:16:06 2011
Return-path: <linux-input-owner@vger.kernel.org>
Envelope-to: glki-linux-input-2@lo.gmane.org
Original-Received: from vger.kernel.org ([209.132.180.67])
by lo.gmane.org with esmtp (Exim 4.69)
(envelope-from <linux-input-owner@vger.kernel.org>)
id 1R1OXV-0007QX-Ll
for glki-linux-input-2@lo.gmane.org; Wed, 07 Sep 2011 22:16:06 +0200
Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1751419Ab1IGUQE (ORCPT <rfc822;glki-linux-input-2@m.gmane.org>);
Wed, 7 Sep 2011 16:16:04 -0400
Original-Received: from mail-vx0-f174.google.com ([209.85.220.174]:57168 "EHLO
mail-vx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1751237Ab1IGUQC (ORCPT
<rfc822;linux-input@vger.kernel.org>); Wed, 7 Sep 2011 16:16:02 -0400
Original-Received: by vxj15 with SMTP id 15so31147vxj.19
for <linux-input@vger.kernel.org>; Wed, 07 Sep 2011 13:16:02 -0700 (PDT)
Original-Received: by 10.52.69.210 with SMTP id g18mr64348vdu.133.1315426562281;
Wed, 07 Sep 2011 13:16:02 -0700 (PDT)
Original-Received: from Caligula ([140.247.246.50])
by mx.google.com with ESMTPS id ch2sm944169vdc.19.2011.09.07.13.16.01
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 07 Sep 2011 13:16:01 -0700 (PDT)
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
Original-Sender: linux-input-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-input.vger.kernel.org>
X-Mailing-List: linux-input@vger.kernel.org
Xref: news.gmane.org gmane.linux.kernel.input:21462
Archived-At: <http://permalink.gmane.org/gmane.linux.kernel.input/21462>
This patch adds support for the Apple MacBookAir4,1 released in July
2011. It was inspired by Joshua Dillon's patch for the MacBookAir4,2
posted on http://www.almostsure.com/mba42/hid-apple-dkms.patch.
Signed-off-by: Pieter-Augustijn Van Malleghem <p-a@scarlet.be>
diff -uNr linux/drivers/hid/hid-apple.c patched/drivers/hid/hid-apple.c
--- linux/drivers/hid/hid-apple.c 2011-09-06 23:41:58.000000000 -0400
+++ patched/drivers/hid/hid-apple.c 2011-09-06 23:53:05.000000000 -0400
@@ -183,6 +183,9 @@
if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS)
table = macbookair_fn_keys;
+ else if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI &&
+ hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS)
+ table = macbookair_fn_keys;
else if (hid->product < 0x21d || hid->product >= 0x300)
table = powerbook_fn_keys;
else
@@ -493,6 +499,12 @@
.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_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 -uNr linux/drivers/hid/hid-core.c patched/drivers/hid/hid-core.c
--- linux/drivers/hid/hid-core.c 2011-09-06 23:41:58.000000000 -0400
+++ patched/drivers/hid/hid-core.c 2011-09-06 23:56:22.000000000 -0400
@@ -1340,6 +1340,9 @@
{ 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_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) },
@@ -1892,6 +1895,9 @@
{ 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_FOUNTAIN_TP_ONLY) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
{ }
diff -uNr linux/drivers/hid/hid-ids.h patched/drivers/hid/hid-ids.h
--- linux/drivers/hid/hid-ids.h 2011-09-06 23:41:58.000000000 -0400
+++ patched/drivers/hid/hid-ids.h 2011-09-06 23:57:39.000000000 -0400
@@ -109,6 +109,9 @@
#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_ALU_REVB_ANSI 0x024f
#define USB_DEVICE_ID_APPLE_ALU_REVB_ISO 0x0250
#define USB_DEVICE_ID_APPLE_ALU_REVB_JIS 0x0251
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

View File

@ -0,0 +1,100 @@
Path: news.gmane.org!not-for-mail
From: Pieter-Augustijn Van Malleghem <p-a@scarlet.be>
Newsgroups: gmane.linux.kernel.input
Subject: [PATCH] Add MacBookAir4,1 trackpad support
Date: Wed, 7 Sep 2011 16:16:39 -0400
Lines: 53
Approved: news@gmane.org
Message-ID: <20110907201639.GA2004@Caligula>
NNTP-Posting-Host: lo.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: dough.gmane.org 1315427050 14847 80.91.229.12 (7 Sep 2011 20:24:10 GMT)
X-Complaints-To: usenet@dough.gmane.org
NNTP-Posting-Date: Wed, 7 Sep 2011 20:24:10 +0000 (UTC)
To: linux-input@vger.kernel.org
Original-X-From: linux-input-owner@vger.kernel.org Wed Sep 07 22:24:06 2011
Return-path: <linux-input-owner@vger.kernel.org>
Envelope-to: glki-linux-input-2@lo.gmane.org
Original-Received: from vger.kernel.org ([209.132.180.67])
by lo.gmane.org with esmtp (Exim 4.69)
(envelope-from <linux-input-owner@vger.kernel.org>)
id 1R1OfE-0003bX-Dq
for glki-linux-input-2@lo.gmane.org; Wed, 07 Sep 2011 22:24:04 +0200
Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1756616Ab1IGUYD (ORCPT <rfc822;glki-linux-input-2@m.gmane.org>);
Wed, 7 Sep 2011 16:24:03 -0400
Original-Received: from mail-vx0-f174.google.com ([209.85.220.174]:45534 "EHLO
mail-vx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1755813Ab1IGUYB (ORCPT
<rfc822;linux-input@vger.kernel.org>); Wed, 7 Sep 2011 16:24:01 -0400
Original-Received: by vxj15 with SMTP id 15so37615vxj.19
for <linux-input@vger.kernel.org>; Wed, 07 Sep 2011 13:24:01 -0700 (PDT)
Original-Received: by 10.52.173.49 with SMTP id bh17mr2675458vdc.82.1315426608488;
Wed, 07 Sep 2011 13:16:48 -0700 (PDT)
Original-Received: from Caligula ([140.247.246.50])
by mx.google.com with ESMTPS id da15sm937150vdb.26.2011.09.07.13.16.47
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 07 Sep 2011 13:16:47 -0700 (PDT)
Content-Disposition: inline
User-Agent: Mutt/1.5.21 (2010-09-15)
Original-Sender: linux-input-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-input.vger.kernel.org>
X-Mailing-List: linux-input@vger.kernel.org
Xref: news.gmane.org gmane.linux.kernel.input:21463
Archived-At: <http://permalink.gmane.org/gmane.linux.kernel.input/21463>
This patch adds trackpad support for the MacBookAir4,1, released in July 2011.
It is very similar to the MacBookAir4,2 patch submitted by Joshua Dillon and
Chase Douglas.
Signed-off-by: Pieter-Augustijn Van Malleghem <p-a@scarlet.be>
--- linux/drivers/input/mouse/bcm5974.c 2011-09-06 23:41:58.000000000 -0400
+++ patched/drivers/input/mouse/bcm5974.c 2011-09-07 00:02:44.000000000 -0400
@@ -67,6 +67,10 @@
#define USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI 0x0245
#define USB_DEVICE_ID_APPLE_WELLSPRING5_ISO 0x0246
#define USB_DEVICE_ID_APPLE_WELLSPRING5_JIS 0x0247
+/* MacbookAir4,1 (unibody, July 2011) */
+#define USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI 0x0249
+#define USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO 0x024a
+#define USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS 0x024b
/* MacbookAir4,2 (unibody, July 2011) */
#define USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI 0x024c
#define USB_DEVICE_ID_APPLE_WELLSPRING6_ISO 0x024d
@@ -112,6 +116,10 @@
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ANSI),
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_ISO),
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING5_JIS),
+ /* MacbookAir4,1 */
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI),
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO),
+ BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS),
/* MacbookAir4,2 */
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6_ANSI),
BCM5974_DEVICE(USB_DEVICE_ID_APPLE_WELLSPRING6_ISO),
@@ -334,6 +342,18 @@
{ DIM_X, DIM_X / SN_COORD, -4750, 5280 },
{ DIM_Y, DIM_Y / SN_COORD, -150, 6730 }
},
+ {
+ USB_DEVICE_ID_APPLE_WELLSPRING6A_ANSI,
+ USB_DEVICE_ID_APPLE_WELLSPRING6A_ISO,
+ USB_DEVICE_ID_APPLE_WELLSPRING6A_JIS,
+ HAS_INTEGRATED_BUTTON,
+ 0x84, sizeof(struct bt_data),
+ 0x81, TYPE2, FINGER_TYPE2, FINGER_TYPE2 + SIZEOF_ALL_FINGERS,
+ { DIM_PRESSURE, DIM_PRESSURE / SN_PRESSURE, 0, 300 },
+ { DIM_WIDTH, DIM_WIDTH / SN_WIDTH, 0, 2048 },
+ { DIM_X, DIM_X / SN_COORD, -4620, 5140 },
+ { DIM_Y, DIM_Y / SN_COORD, -150, 6600 }
+ },
{}
};
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

View File

@ -51,7 +51,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be prepended with "0.", so
# for example a 3 here will become 0.3
#
%global baserelease 0
%global baserelease 1
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -725,6 +725,10 @@ Patch13003: efi-dont-map-boot-services-on-32bit.patch
Patch13004: iwlagn-revert-max-aggregate-size.patch
Patch13005: ucvideo-fix-crash-when-linking-entities.patch
Patch13006: add-macbookair41-trackpad.patch
Patch13007: add-macbookair41-keyboard.patch
Patch13008: add-macbookair41-btusb.patch
Patch20000: utrace.patch
# Flattened devicetree support
@ -1339,6 +1343,10 @@ ApplyPatch efi-dont-map-boot-services-on-32bit.patch
ApplyPatch iwlagn-revert-max-aggregate-size.patch
ApplyPatch ucvideo-fix-crash-when-linking-entities.patch
ApplyPatch add-macbookair41-trackpad.patch
ApplyPatch add-macbookair41-keyboard.patch
ApplyPatch add-macbookair41-btusb.patch
# utrace.
ApplyPatch utrace.patch
@ -2041,6 +2049,9 @@ fi
# and build.
%changelog
* Wed Sep 14 2011 Josh Boyer <jwboyer@redhat.com>
- Add support for Macbook Air 4,1 keyboard, trackpad, and bluetooth
* Tue Sep 13 2011 Adam Jackson <ajax@redhat.com>
- drm/i915: Shut the fbc messages up when drm.debug & 4