HID: magicmouse: Report battery level over USB
authorJosé Expósito <jose.exposito89@gmail.com>
Thu, 18 Nov 2021 16:52:08 +0000 (17:52 +0100)
committerJiri Kosina <jkosina@suse.cz>
Fri, 19 Nov 2021 15:01:39 +0000 (16:01 +0100)
commit0b91b4e4dae63cd43871fc2012370b86ee588f91
treebbabdb4812b68e69685687c1db184f65a1ee777c
parent5af06603c4090617be216a9185193a7be3ca60af
HID: magicmouse: Report battery level over USB

When connected over USB, the Apple Magic Mouse 2 and the Apple Magic
Trackpad 2 register multiple interfaces, one of them is used to report
the battery level.

However, unlike when connected over Bluetooth, the battery level is not
reported automatically and it is required to fetch it manually.

Fix the battery report descriptor and add a timer to fetch the battery
level.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-magicmouse.c