[PATCH v2 0/2] HID: lg-g15: G15 v2 contrast and game-mode LEDs
From: Torstein Eide
Date: Mon Nov 09 2026 - 12:26:08 EST
This series adds two LEDs for the Logitech G15 v2 to hid-lg-g15.
Patch 1 exposes the GamePanel LCD contrast as a g15::lcd_contrast LED.
Patch 2 binds the G15 v2's keyboard device (046D:C226), which is
currently handled by hid-generic, and exposes the Super-key-lock
("Game Mode") state as a read-only g15::game_mode LED. Normal key input
on that device is left to hid-input, with the same
HID_QUIRK_INPUT_PER_APP setup hid-generic uses.
Tested on a Logitech G15 v2, together with lcdproc (g15 driver, hidraw
mode) driving the LCD: the LCD output, the contrast LED and the L1-L5
keys all keep working, and the c226 input devices have the same names
as under hid-generic. Also tested across a suspend/resume cycle.
Changes in v2:
- Drop the framebuffer patch; userspace (lcdproc, libg15) drives the
LCD through hidraw instead.
- Drop the remove-path patch: hid-core holds driver_input_lock during
remove(), so raw_event cannot reschedule the work.
- Contrast LED: clamp the brightness before indexing contrast_values[],
and restore the contrast on resume under g15->mutex.
- Game-mode LED: set HID_QUIRK_INPUT_PER_APP like hid-generic, read the
initial lock state before registering the LED, and guard the cached
state with a spinlock so a resume-time GET_REPORT cannot overwrite a
newer input report.
Torstein Eide (2):
HID: lg-g15: add LCD contrast LED
HID: lg-g15: report Super-key-lock state on G15 v2's keyboard
interface
drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-lg-g15.c | 347 ++++++++++++++++++++++++++++++++++++++-
2 files changed, 343 insertions(+), 5 deletions(-)
base-commit: 2c2fe95ab19b09bef7391e3e5cdf8146d09792b6
--
2.53.0