mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aaron Erhardt <aer@tuxedocomputers.com>
To: Jiri Kosina <jikos@kernel.org>, Benjamin Tissoires <bentiss@kernel.org>
Cc: Cristian Mazzotta <cmmazzo@icloud.com>,
	Armin Wolf <W_Armin@gmx.de>,
	linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	linux-leds@vger.kernel.org,
	Tim Guttzeit <tgu@tuxedocomputers.com>,
	Werner Sembach <wse@tuxedocomputers.com>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Hans de Goede <hansg@kernel.org>, Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH v7 0/3] HID: generic: add LampArray support via hid-lamparray helper
Date: Tue, 1 Dec 2026 12:27:30 +0100	[thread overview]
Message-ID: <a718cd15-8206-443f-bb4b-798f54cafb04@tuxedocomputers.com> (raw)
In-Reply-To: <20261020-hid-lamparray-v7-0-47418b667b47@tuxedocomputers.com>

Am 20.10.26 um 11:51 schrieb Aaron Erhardt:
> Add a new hid-lamparray helper module and integrate it with the
> hid-generic driver.

Since this has been sitting around for a while without any feedback by a
maintainer I think it's valid to raise the question whether this will ever be
merged or what changes would be required to get it merged.

In particular, I would like to know whether this implementation is going into
the right direction and what blockers there are. If the feedback is that
LampArray should rather be handled by userspace, I'd be fine with that. Either
way, I just want some clarity to move forward.

+Cc: Miguel Ojeda, Hans de Goede, Pavel Machek and Werner Sembach who were part
of the original LampArray discussion:
https://lore.kernel.org/all/1fb08a74-62c7-4d0c-ba5d-648e23082dcb@tuxedocomputers.com/

> 
> While more complex lamparray handling should be done in userspace via
> hidraw, providing a small module to add basic lamparray support makes it
> possible for userspace software to interact with lamparrays by simply
> using well-known APIs of the LED subsystem. One use-case would be to
> enable desktop environments to support keyboard backlight control out of
> the box for HID lamparray devices without having to implement the whole
> HID protocol themselves.
> 
> This patch is based on previous discussions:
> https://lore.kernel.org/all/1fb08a74-62c7-4d0c-ba5d-648e23082dcb@tuxedocomputers.com/
> 
> The helper provides basic support for devices exposing a
> Lighting/LampArray application collection (usage page 0x59) and
> registers a single-zone RGB LED representation via the LED subsystem.
> 
> hid-generic now checks for LampArray support after hid_parse() and
> optionally registers a lamparray instance. Failures in the helper do not
> abort device probe to keep the driver logic otherwise unchanged.
> 
> LampArray resources are released on driver remove.
> 
> This commit was successfully tested on the Microsoft MacroPad reference
> implementation (https://github.com/microsoft/RP2040MacropadHidSample
> 1d6c3ad) and in combination with the tuxedo_nb04_wmi driver, albeit only
> fully functional with a recent fix already on
> platform-drivers-x86/for-next
> (https://lore.kernel.org/all/20261007080202.81694-1-aer@tuxedocomputers.com).
> 
> Others reported the driver to work on the Acer Predator PT14-52T and the
> ASUS Prime B650-Plus, with the former requiring some patches on top of
> v5, which should now be included in v6.
> 
> v7:
> - Use white with zero brightness as new default
> - Fix measurements in comments and commit message
> v6:
> - Read attribute reports synchronously (by Cristian Mazotta)
> - Raise log level of fatal probe errors (by Cristian Mazotta)
> - Transfer control when use_leds_uapi changes (by Cristian Mazotta)
> - Blank lamps across suspend and restore on resume (by Cristian Mazotta)
> - Add quirk for devices that ignore intensities (reported by Armin Wolf)
> - Better locking, fixing rare races in uapi registration
> - Use scope guards for locking and allocations where possible
> - Remove obsolete calls to led_mc_calc_color_components and
>   hid_device_io_start/stop
> - Updated and slightly improved documentation
> v5:
> - Proper hardware detection (no quirks necessary anymore)
> - Add documentation for new sysfs knob
> - Pass limits of the device to sysfs (intensities & brightness)
> - More flexible Kconfig (use tristate)
> - Improved locking
> - Several memory leak and (de-)initialization fixes
> - Don't read current color values from hardware (the HID spec does not
>   offer this option)
> - Remove redundant report dump functionality
> v4:
> - Restrict CONFIG_HID_LAMPARRAY to built-in configurations only to fix
>   additional randconfig build errors
> v3:
> - Squash V1 and V2 into one patch
> v2:
> - Fix Kconfig to avoid build errors when LEDS_CLASS_MULTICOLOR is
>   disabled
> 
> ---
> Aaron Erhardt (2):
>       HID: lamparray: add new LampArray helper module
>       HID: generic: add LampArray support via hid-lamparray helper
> 
> Cristian Mazzotta (1):
>       HID: lamparray: blank lamps across suspend and restore on resume
> 
>  .../ABI/testing/sysfs-driver-hid-lamparray         |  15 +
>  drivers/hid/Kconfig                                |  18 +
>  drivers/hid/Makefile                               |   2 +
>  drivers/hid/hid-generic.c                          |  70 +-
>  drivers/hid/hid-lamparray.c                        | 912 +++++++++++++++++++++
>  include/linux/hid-lamparray.h                      | 118 +++
>  6 files changed, 1134 insertions(+), 1 deletion(-)
> ---
> base-commit: f47d223627f80cb7a1eb14c585fe6cb35de5e984
> change-id: 20261020-hid-lamparray-6f76a2791e8b
> 
> Best regards,
> --  
> Aaron Erhardt <aer@tuxedocomputers.com>
> 


  parent reply	other threads:[~2026-12-01 11:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-20  9:51 Aaron Erhardt
2026-10-20  9:51 ` [PATCH v7 1/3] HID: lamparray: add new LampArray helper module Aaron Erhardt
2026-10-20  9:51 ` [PATCH v7 2/3] HID: generic: add LampArray support via hid-lamparray helper Aaron Erhardt
2026-10-20  9:51 ` [PATCH v7 3/3] HID: lamparray: blank lamps across suspend and restore on resume Aaron Erhardt
2026-12-01 11:27 ` Aaron Erhardt [this message]
2026-12-01 11:33   ` [PATCH v7 0/3] HID: generic: add LampArray support via hid-lamparray helper Jiri Kosina
2026-12-01 14:38     ` Benjamin Tissoires
2026-12-01 12:24   ` Miguel Ojeda

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=a718cd15-8206-443f-bb4b-798f54cafb04@tuxedocomputers.com \
    --to=aer@tuxedocomputers.com \
    --cc=W_Armin@gmx.de \
    --cc=bentiss@kernel.org \
    --cc=cmmazzo@icloud.com \
    --cc=hansg@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=pavel@ucw.cz \
    --cc=tgu@tuxedocomputers.com \
    --cc=wse@tuxedocomputers.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 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®