Re: [PATCH v4] HID: logitech-headset: add a battery driver for the PRO X 2
From: Jiri Kosina
Date: Thu Nov 19 2026 - 16:40:26 EST
On Fri, 16 Oct 2026, Méven Car wrote:
> The PRO X 2 LIGHTSPEED receiver does not speak HID++, so
> hid-logitech-hidpp cannot read its battery. Its report descriptor has a
> consumer collection for the media keys and two vendor collections, and
> no report 0x10 or 0x11.
>
> The battery answers on usage page 0xffa0. A single 64 byte frame on
> report 0x51 asks for it, with no handshake, and the reply gives the
> level and whether the headset is charging. The driver asks every 120
> seconds. It also reads the power frames that the headset sends on its
> own. A switch-off frame marks the headset absent at once, and a
> switch-on frame moves the next request to one second later, so the level
> appears without waiting for the poll.
>
> hid-generic sets HID_QUIRK_INPUT_PER_APP, so this receiver had one input
> device per application collection, among them the Consumer Control node
> for the media keys. A driver does not inherit that quirk, so probe sets
> it and the input devices stay as they were.
>
> The power supply is registered with POWER_SUPPLY_SCOPE_DEVICE. The
> headset is present from a reply until the next switch-off frame, and
> capacity returns -ENODATA while it is absent, so a headset that is off
> when the driver binds reports no level.
>
> The G522 LIGHTSPEED uses the same vendor protocol with a different frame
> layout. That device is left out until someone can test it.
>
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Méven Car <meven@xxxxxxx>
> ---
> Changes in v4:
> - Make HID_LOGITECH_HEADSET a hidden option, selected by
> HID_LOGITECH_DJ in the same way as HID_LOGITECH_HIDPP, as suggested by
> Jiri Kosina.
Applied, thanks.
--
Jiri Kosina
SUSE Labs