mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Werner Sembach <wse@tuxedocomputers.com>
To: Cristian Mazzotta <cmmazzo@icloud.com>,
	Aaron Erhardt <aer@tuxedocomputers.com>
Cc: tgu@tuxedocomputers.com, jikos@kernel.org, bentiss@kernel.org,
	hansg@kernel.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org
Subject: Re: [PATCH v4] HID: generic: add LampArray support via hid-lamparray helper
Date: Fri, 28 Aug 2026 00:13:05 +0200	[thread overview]
Message-ID: <d54951b4-8216-49eb-9c3e-ed49ab3d4355@tuxedocomputers.com> (raw)
In-Reply-To: <20260827184715.136843-1-cmmazzo@icloud.com>

Hi,

Am 27.08.26 um 20:47 schrieb Cristian Mazzotta:
> Am 25.03.26 um 11:35 schrieb Werner Sembach:
>> as Tim went on to other endeavors, I'm taking over this patch. I have
>> yet to test it myself, but i was already in the feedback loop while he
>> was writing it, so I'm not unfamiliar with the code.
taking Aaron into the loop who actually ended up taking over the development.
> Hi Werner,
>
> I recently got a new laptop (Acer Predator PT14-52T) with absolutely zero
> support for any RGB outside of Windows 11; while studying the behavior of
> the Windows driver, I found out about LampArray devices and so I ended up
> landing here.
>
> This laptop has 2 LampArray devices: a USB attached keyboard (05AF:767A)
> and an I2C ENE controller (0CF2:5130) for 3 zones in total. The original
> motivation was power draw during s2idle; the lights would stay on and
> constantly draw power. I measured 12.35W drop to 2.84W when I
> blanked the lights and measured with a simple usb power meter, so I've
> been working off of Tim's code for the past little bit.

The plan for the in kernel driver was to intentionally only provide basic 
support. Reason is the current UAPI of the leds subsystem does not offer the 
full flexibility lamp array offers, so it's a challange to map that already. 
Also most current DEs also only support very basic controls interacting with the 
leds subsystem.

If more control is needed a userspace driver should disable the leds subsystem 
control and directly control the device via hidraw. One such driver will 
probably be openRGB in the near future, but it only has initial, currently 
broken support for lamp array.

>
> Getting full support required touching most of the driver:
>
>   - Multi-zone support with individual zone states instead of a single
>     monolithic zone taking every device.
The driver tries to represent every device as one leds device with one zone to 
not confuse the DEs
>   - lamparray_read_lamp_count() used hid_hw_request(), which is
>     asynchronous, so the value was read before the transfer completed.
>     Switched to hid_hw_raw_request()
Probably something Aaron already fixed on his dev branch, but thanks for 
pointing it out.
>   - lamparray_parse_update_report() would bind to the last HID_LAIP_LAMP_COUNT
>     (usage 0x0003) parsed rather than the first, so LampCount ended up
>     being on the wrong field. This has been fixed by binding the first match.
Not familiar enough with the code myself to comment on that, but maybe a hint 
for Aaron
>   - Added suspend and resume hooks, including an autonomous mode refresh
>     on S4 that my laptop needed
Same as above
>   - use_leds_uapi=0 now leaves the LED class devs registered, but ignores
>     all writes rather than unregistering them.
Unregistering is important for userspace to know what happens, otherwise kde for 
example would still offer brightness control while it isn't actually doing 
anything.
>   - Also added ABI documentation since it was missing previously
Thanks, I think Aaron did something there too.
>
> About half of the driver changed, so I don't think it would be easily
> reviewable as a delta from v4.
>
> Would you prefer that I post it as a v5 with Tim's patch as a base, or
> should I just send you the changes that you can add to your own version?
> I don't want to duplicate work if you already have a v5 in progress.
>
> I have hardware in front of me so I can test whatever is useful.

I think it's best for Aaron sending his version first and then you reacting on 
that on the LKML and getting in touch. It's unfortunate that parallel work 
happened here.

Also you might wanna take a look at the openRGB userspace implementation for 
LampArray control. It still needs a lot of work. I too dabbled in there but 
still not quite enough.

Best regards,

Werner

>
> Thank you,
> Cristian Mazzotta

  reply	other threads:[~2026-08-27 22:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23  8:39 Tim Guttzeit
2026-03-25 10:21 ` Werner Sembach
2026-03-25 10:35   ` Werner Sembach
2026-08-27 18:47     ` Cristian Mazzotta
2026-08-27 22:13       ` Werner Sembach [this message]
2026-08-28 14:45         ` Cristian Mazzotta
2026-09-03  9:31           ` Aaron Erhardt

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=d54951b4-8216-49eb-9c3e-ed49ab3d4355@tuxedocomputers.com \
    --to=wse@tuxedocomputers.com \
    --cc=aer@tuxedocomputers.com \
    --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=tgu@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®