On Fri, 2011-12-09 at 00:10 -0800, Jeremy Fitzhardinge wrote:
> Apple keyboards require a FEATURE report to query the battery state,
> even though they list as an input.  Without this, it returns an error.
> 
> Signed-off-by: Jeremy Fitzhardinge <[email protected]>

I'm looking at cherry-picking this and following commits to 3.2:

652aa6a9ac4a hid-input/battery: add FEATURE quirk
0c47935c5b5c HID: add battery quirk for Apple Wireless ANSI
4cc854178214 HID: add battery quirk for Apple 2009_ISO keyboard

What I don't understand about this is:

[...]
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -283,12 +283,12 @@ static enum power_supply_property 
> hidinput_battery_props[] = {
>  };
>  
>  #define HID_BATTERY_QUIRK_PERCENT    (1 << 0) /* always reports percent */
> +#define HID_BATTERY_QUIRK_FEATURE    (1 << 1) /* ask for feature report */
>  
>  static const struct hid_device_id hid_battery_quirks[] = {
> -     { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 
> USB_DEVICE_ID_APPLE_MAGICMOUSE),
> -       HID_BATTERY_QUIRK_PERCENT },
> -     { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, 
> USB_DEVICE_ID_APPLE_MAGICTRACKPAD),
> -       HID_BATTERY_QUIRK_PERCENT },
> +     { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE,
> +                            USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI),
> +       HID_BATTERY_QUIRK_PERCENT | HID_BATTERY_QUIRK_FEATURE },
>       {}
>  };
[...]

why did this also remove quirks for two other device IDs?  Are they all
part of the same physical device so that the other two quirks are
redundant?  Or was this a mistake?

Ben.

-- 
Ben Hutchings
The world is coming to an end.  Please log off.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to