]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: magicmouse: fix battery reporting for Apple Magic Trackpad 2
authorJulius Lehmann <lehmanju@devpi.de>
Sat, 14 Feb 2026 19:34:21 +0000 (20:34 +0100)
committerJiri Kosina <jkosina@suse.com>
Tue, 24 Feb 2026 08:41:21 +0000 (09:41 +0100)
commit5f3518d77419255f8b12bb23c8ec22acbeb6bc5b
tree537fb54e014e2949fbf14e9be6126a611891fd13
parent97d5c8f5c09a604c4873c8348f58de3cea69a7df
HID: magicmouse: fix battery reporting for Apple Magic Trackpad 2

Battery reporting does not work for the Apple Magic Trackpad 2 if it is
connected via USB. The current hid descriptor fixup code checks for a
hid descriptor length of exactly 83 bytes. If the hid descriptor is
larger, which is the case for newer apple mice, the fixup is not
applied.

This fix checks for hid descriptor sizes greater/equal 83 bytes which
applies the fixup for newer devices as well.

Signed-off-by: Julius Lehmann <lehmanju@devpi.de>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-magicmouse.c