diff mbox

[Natty/SRU] HID: hid-apple: add device ID of another wireless aluminium

Message ID 1330448258-8458-1-git-send-email-herton.krzesinski@canonical.com
State New
Headers show

Commit Message

Herton Ronaldo Krzesinski Feb. 28, 2012, 4:57 p.m. UTC
From: Andreas Krist <andreas.krist@gmail.com>

I've recently bought a Apple wireless aluminum keyboard (model 2011) which is
not yet supported by the kernel - it seems they just changed the device id.
After applying the attached patch, the device is fully functional.

Signed-off-by: Andreas Krist <andreas.krist@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
BugLink: http://bugs.launchpad.net/bugs/942184
(cherry picked from commit ad734bc1565364f9e4b70888d3ce5743b3c1030a upstream)
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
---
 drivers/hid/hid-apple.c |    3 +++
 drivers/hid/hid-core.c  |    1 +
 drivers/hid/hid-ids.h   |    1 +
 3 files changed, 5 insertions(+), 0 deletions(-)

Comments

Tim Gardner Feb. 28, 2012, 5:05 p.m. UTC | #1

Colin Ian King Feb. 28, 2012, 5:23 p.m. UTC | #2
On 28/02/12 16:57, Herton R. Krzesinski wrote:
> From: Andreas Krist<andreas.krist@gmail.com>
>
> I've recently bought a Apple wireless aluminum keyboard (model 2011) which is
> not yet supported by the kernel - it seems they just changed the device id.
> After applying the attached patch, the device is fully functional.
>
> Signed-off-by: Andreas Krist<andreas.krist@gmail.com>
> Signed-off-by: Jiri Kosina<jkosina@suse.cz>
> BugLink: http://bugs.launchpad.net/bugs/942184
> (cherry picked from commit ad734bc1565364f9e4b70888d3ce5743b3c1030a upstream)
> Signed-off-by: Herton Ronaldo Krzesinski<herton.krzesinski@canonical.com>
> ---
>   drivers/hid/hid-apple.c |    3 +++
>   drivers/hid/hid-core.c  |    1 +
>   drivers/hid/hid-ids.h   |    1 +
>   3 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
> index b85744f..163c624 100644
> --- a/drivers/hid/hid-apple.c
> +++ b/drivers/hid/hid-apple.c
> @@ -449,6 +449,9 @@ static const struct hid_device_id apple_devices[] = {
>   	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
>   		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
>   			APPLE_ISO_KEYBOARD },
> +	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO),
> +		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
> +			APPLE_ISO_KEYBOARD },
>   	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
>   		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
>   	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 9477b2a..44723b0 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1306,6 +1306,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
>   	{ 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) },
> +	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) },
>   	{ 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_ASUS, USB_DEVICE_ID_ASUS_T91MT) },
> diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
> index 090bf48..39d1bdf 100644
> --- a/drivers/hid/hid-ids.h
> +++ b/drivers/hid/hid-ids.h
> @@ -109,6 +109,7 @@
>   #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI  0x0239
>   #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO   0x023a
>   #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS   0x023b
> +#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO   0x0256
>   #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

Seems sane to me.

Acked-by: Colin Ian King <colin.king@canonical.com>
Stefan Bader Feb. 29, 2012, 8:45 a.m. UTC | #3
Applied to natty/master-next
diff mbox

Patch

diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c
index b85744f..163c624 100644
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -449,6 +449,9 @@  static const struct hid_device_id apple_devices[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO),
 		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
 			APPLE_ISO_KEYBOARD },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO),
+		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
+			APPLE_ISO_KEYBOARD },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS),
 		.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI),
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 9477b2a..44723b0 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1306,6 +1306,7 @@  static const struct hid_device_id hid_have_special_driver[] = {
 	{ 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) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) },
 	{ 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_ASUS, USB_DEVICE_ID_ASUS_T91MT) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 090bf48..39d1bdf 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -109,6 +109,7 @@ 
 #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI  0x0239
 #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO   0x023a
 #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS   0x023b
+#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO   0x0256
 #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