From: Armin Wolf <W_Armin@gmx.de>
To: lee@kernel.org, pavel@kernel.org
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 00/10] leds: class: Support custom sysfs groups on multicolor and flash LEDs
Date: Sun, 18 Oct 2026 15:46:19 +0200 [thread overview]
Message-ID: <20261018135339.1109271-1-W_Armin@gmx.de> (raw)
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.
Armin Wolf (10):
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: Take the LED access lock when reading
brightness_hw_changed
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: multicolor: Adjust maximum subled intensity during
initialization
drivers/leds/led-class-flash.c | 154 +++++++++--------
drivers/leds/led-class-multicolor.c | 79 ++++-----
drivers/leds/led-class.c | 245 +++++++++++++++++-----------
drivers/leds/leds.h | 3 +
include/linux/led-class-flash.h | 5 -
include/linux/leds.h | 4 +-
6 files changed, 268 insertions(+), 222 deletions(-)
--
2.56.0
next reply other threads:[~2026-10-18 13:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 13:46 Armin Wolf [this message]
2026-10-18 13:46 ` [PATCH 01/10] leds: class: Constify sysfs attributes Armin Wolf
2026-10-18 13:46 ` [PATCH 02/10] leds: multicolor: " Armin Wolf
2026-10-18 13:46 ` [PATCH 03/10] leds: flash: " Armin Wolf
2026-10-18 13:46 ` [PATCH 04/10] leds: class: Create "brightness_hw_changed" attribute atomically Armin Wolf
2026-10-19 11:51 ` Rong Zhang
2026-10-20 20:55 ` Armin Wolf
2026-10-18 13:46 ` [PATCH 05/10] leds: class: Fix race condition when creating the device Armin Wolf
2026-10-18 13:46 ` [PATCH 06/10] leds: class: Take the LED access lock when reading brightness_hw_changed Armin Wolf
2026-10-18 13:46 ` [PATCH 07/10] leds: class: Use correct type for brightness_hw_changed field Armin Wolf
2026-10-18 13:46 ` [PATCH 08/10] leds: class: Split led_classdev_register_ext() Armin Wolf
2026-10-18 13:46 ` [PATCH 09/10] leds: Support custom sysfs groups on multicolor and flash LEDs Armin Wolf
2026-10-19 11:53 ` Rong Zhang
2026-10-20 20:57 ` Armin Wolf
2026-10-18 13:46 ` [PATCH 10/10] leds: multicolor: Adjust maximum subled intensity during initialization Armin Wolf
2026-10-19 11:54 ` Rong Zhang
2026-10-20 20:59 ` Armin Wolf
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=20261018135339.1109271-1-W_Armin@gmx.de \
--to=w_armin@gmx.de \
--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®