mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] HID: lg-g15: G15 v2 contrast and game-mode LEDs
@ 2026-11-09 17:17 Torstein Eide
  2026-11-09 17:17 ` [PATCH v2 1/2] HID: lg-g15: add LCD contrast LED Torstein Eide
  2026-11-09 17:17 ` [PATCH v2 2/2] HID: lg-g15: report Super-key-lock state on G15 v2's keyboard interface Torstein Eide
  0 siblings, 2 replies; 3+ messages in thread
From: Torstein Eide @ 2026-11-09 17:17 UTC (permalink / raw)
  To: Jiri Kosina, Benjamin Tissoires
  Cc: Hans de Goede, Maoyi Xie, linux-input, linux-kernel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-09 17:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 17:17 [PATCH v2 0/2] HID: lg-g15: G15 v2 contrast and game-mode LEDs Torstein Eide
2026-11-09 17:17 ` [PATCH v2 1/2] HID: lg-g15: add LCD contrast LED Torstein Eide
2026-11-09 17:17 ` [PATCH v2 2/2] HID: lg-g15: report Super-key-lock state on G15 v2's keyboard interface Torstein Eide

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®