Skip to content
Commit 7fc68653 authored by Jason Gerecke's avatar Jason Gerecke Committed by Jiri Kosina
Browse files

HID: wacom: Lazy-init batteries

Rather than creating batteries as part of the initial device probe, let's
make the process lazy. This gives us the opportunity to prevent batteries
from being created in situations where they are unnecessary.

There are two cases in particular where batteries are being unnecessarily
created at initialization. These are AES sensors (for which we don't know
any battery status information until a battery-powered pen actually comes
into prox) peripheral tablets which share HID descriptors between the
wired-only and wireless-capable SKUs of a family of devices.

This patch will delay battery initialization of the former until a pen
actually comes into prox. It will delay battery initialization of the
latter until either a pen comes into prox or a "heartbeat" packet is
processed.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=217062
Link: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/2354


Signed-off-by: default avatarJason Gerecke <jason.gerecke@wacom.com>
Tested-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 08a46b41
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment