]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita93e86e6362d3ee4aef505bc1b00c5be1a357e39
treebbabdb4812b68e69685687c1db184f65a1ee777c
parent143956bb5345e3fbe7933bd560442343a17b3f04
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