From: Armin Wolf <W_Armin@gmx.de>
To: Rong Zhang <i@rong.moe>, lee@kernel.org, pavel@kernel.org
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 00/11] leds: class: Support custom sysfs groups on multicolor and flash LEDs
Date: Sat, 21 Nov 2026 13:42:52 +0100 [thread overview]
Message-ID: <9f83d934-9913-4101-b899-0c7c99fa39fc@gmx.de> (raw)
In-Reply-To: <77c77dd13a1cc44416ceb28ee4dacfab51c7c220.camel@rong.moe>
Am 21.11.26 um 12:21 schrieb Rong Zhang:
> Hi Armin,
>
> On Fri, 2026-11-20 at 22:22 +0100, Armin Wolf wrote:
>> Until now drivers are unable to atomically register custom sysfs
>> groups below multicolor and flash LED class devices, because the
>> led_cdev->sysfs_groups field is being overwritten inside the
>> associated initialization functions. This patch series tries to
>> fix this.
>>
>> The first three patches constify the sysfs attributes of all three
>> LED flavors, while the next four patches fix various unrelated issues
>> affecting LED device initialization. The next two patches migrate
>> the multicolor and flash LEDs to use struct device_type for
>> registering their sysfs attributes, so that led_cdev->sysfs_groups is
>> not touched anymore. The last patch contains a minor optimization
>> for multicolor LEDs.
>>
>> All patches have been tested on real hardware, with the flash LED
>> interface being tested using a custom kernel module.
> The series looks good to me (except for PATCH 10, as I am not familiar
> with that driver).
>
> FWIW, for PATCH 1-9,11:
>
> Reviewed-by: Rong Zhang <i@rong.moe>
>
> Thanks,
> Rong
Thank you :)
>> Changes since v2:
>> - fix issue inside KTD202X driver
>>
>> Changes since v1:
>> - use READ_ONCE() inside brightness_hw_changed_show()
>> - fix possible deadlock in led_classdev_notify_brightness_hw_changed()
>> - set led_cdev->dev to NULL when initialization fails
>> - call device_set_node() after device_add()
>>
>> Armin Wolf (11):
>> leds: class: Constify sysfs attributes
>> leds: multicolor: Constify sysfs attributes
>> leds: flash: Constify sysfs attributes
>> leds: class: Create "brightness_hw_changed" attribute atomically
>> leds: class: Fix race condition when creating the device
>> leds: class: Access brightness_hw_changed exactly once
>> leds: class: Use correct type for brightness_hw_changed field
>> leds: class: Split led_classdev_register_ext()
>> leds: Support custom sysfs groups on multicolor and flash LEDs
>> leds: rgb: ktd202x: Initialize max_brightness before registering LED
>> leds: multicolor: Adjust maximum subled intensity during
>> initialization
>>
>> drivers/leds/led-class-flash.c | 153 +++++++++---------
>> drivers/leds/led-class-multicolor.c | 76 ++++-----
>> drivers/leds/led-class.c | 233 +++++++++++++++++++---------
>> drivers/leds/leds.h | 3 +
>> drivers/leds/rgb/leds-ktd202x.c | 4 +-
>> include/linux/led-class-flash.h | 5 -
>> include/linux/leds.h | 2 +-
>> 7 files changed, 278 insertions(+), 198 deletions(-)
prev parent reply other threads:[~2026-11-21 12:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 21:22 Armin Wolf
2026-11-20 21:22 ` [PATCH v3 01/11] leds: class: Constify sysfs attributes Armin Wolf
2026-11-20 21:22 ` [PATCH v3 02/11] leds: multicolor: " Armin Wolf
2026-11-20 21:22 ` [PATCH v3 03/11] leds: flash: " Armin Wolf
2026-11-20 21:22 ` [PATCH v3 04/11] leds: class: Create "brightness_hw_changed" attribute atomically Armin Wolf
2026-11-20 21:22 ` [PATCH v3 05/11] leds: class: Fix race condition when creating the device Armin Wolf
2026-11-20 21:22 ` [PATCH v3 06/11] leds: class: Access brightness_hw_changed exactly once Armin Wolf
2026-11-20 21:22 ` [PATCH v3 07/11] leds: class: Use correct type for brightness_hw_changed field Armin Wolf
2026-11-20 21:22 ` [PATCH v3 08/11] leds: class: Split led_classdev_register_ext() Armin Wolf
2026-11-20 21:22 ` [PATCH v3 09/11] leds: Support custom sysfs groups on multicolor and flash LEDs Armin Wolf
2026-11-20 21:22 ` [PATCH v3 10/11] leds: rgb: ktd202x: Initialize max_brightness before registering LED Armin Wolf
2026-11-21 12:53 ` Armin Wolf
2026-11-20 21:22 ` [PATCH v3 11/11] leds: multicolor: Adjust maximum subled intensity during initialization Armin Wolf
2026-11-21 11:21 ` [PATCH v3 00/11] leds: class: Support custom sysfs groups on multicolor and flash LEDs Rong Zhang
2026-11-21 12:42 ` Armin Wolf [this message]
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=9f83d934-9913-4101-b899-0c7c99fa39fc@gmx.de \
--to=w_armin@gmx.de \
--cc=i@rong.moe \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@kernel.org \
/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®