Skip to content

HID: lg-g15: G15 v2 contrast and game-mode LEDs

Torstein Eide linux-input lkml 2 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v14 patches 2 repliesSuperseded

Changes in v2 from the cover letter

- 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.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2HID: lg-g15: add LCD contrast LEDdrivers/hid/hid-lg-g15.c+117 -20 replies
2/2HID: lg-g15: report Super-key-lock state on G15 v2's keyboard interfacedrivers/hid/hid-ids.h drivers/hid/hid-lg-g15.c+227 -40 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchPhilip LawatschAlex IbradoAnthony J. MirabellaMike Lampard
1/2Based-on-work-by Based-on-work-by Based-on-work-by Based-on-work-by
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/2] HID: lg-g15: G15 v2 contrast and game-mode LEDs

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

Signature · 1 line
2.53.0