All of lore.kernel.org
 help / color / mirror / Atom feed
From: Torstein Eide <torsteine+linux@gmail.com>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: Hans de Goede <hansg@kernel.org>,
	Maoyi Xie <maoyixie.tju@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] HID: lg-g15: G15 v2 contrast and game-mode LEDs
Date: Mon,  9 Nov 2026 18:17:25 +0100	[thread overview]
Message-ID: <20261109171727.2812614-1-torsteine+linux@gmail.com> (raw)

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


             reply	other threads:[~2026-11-09 17:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 17:17 Torstein Eide [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261109171727.2812614-1-torsteine+linux@gmail.com \
    --to=torsteine+linux@gmail.com \
    --cc=bentiss@kernel.org \
    --cc=hansg@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maoyixie.tju@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.