diff mbox

hid: Add battery quirk for USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO keyboard

Message ID 1418744242.3923.1.camel@ntlworld.com (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Karl Relton Dec. 16, 2014, 3:37 p.m. UTC
Apple bluetooth wireless keyboard (sold in UK) has always reported zero
for battery strength no matter what condition the batteries are actually
in. With this patch applied (applying same quirk as other Apple
keyboards), the battery strength is now correctly reported.

Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>
---



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

Comments

Jiri Kosina Dec. 17, 2014, 8:03 a.m. UTC | #1
On Tue, 16 Dec 2014, Karl Relton wrote:

> Apple bluetooth wireless keyboard (sold in UK) has always reported zero
> for battery strength no matter what condition the batteries are actually
> in. With this patch applied (applying same quirk as other Apple
> keyboards), the battery strength is now correctly reported.
> 
> Signed-off-by: Karl Relton <karllinuxtest.relton@ntlworld.com>

Applied to for-3.19/upstream-fixes.

Thanks,
diff mbox

Patch

--- linux-3.16.0.orig/drivers/hid/hid-input.c	2014-12-10 10:59:37.864211493 +0000
+++ linux-3.16.0/drivers/hid/hid-input.c	2014-12-04 17:37:47.145113489 +0000
@@ -312,6 +312,9 @@  static const struct hid_device_id hid_ba
 			       USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI),
 	  HID_BATTERY_QUIRK_PERCENT | HID_BATTERY_QUIRK_FEATURE },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE,
+			       USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO),
+	  HID_BATTERY_QUIRK_PERCENT | HID_BATTERY_QUIRK_FEATURE },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE,
 		USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI),
 	  HID_BATTERY_QUIRK_PERCENT | HID_BATTERY_QUIRK_FEATURE },
 	{}