Skip to content

leds: fix /sys/class/leds/<led>/trigger

Akinobu Mita linux-leds lkml 3 versions – Applied

Status from this message: Applied to the for-next branch of linux-leds.git

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest1 patch 2 repliesApplied
  2. v21 patch 7 repliesSuperseded
  3. v11 patch 3 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/1leds: remove PAGE_SIZE limit of /sys/class/leds/<led>/triggerdrivers/leds/led-class.c drivers/leds/led-triggers.c drivers/leds/leds.h +1 more+78 -312 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchGreg Kroah-Hartman
1/1R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/1] leds: fix /sys/class/leds/<led>/trigger

Reading /sys/class/leds/<led>/trigger returns all available LED triggers. However, the size of this file is limited to PAGE_SIZE because of the limitation for sysfs attribute.

Enabling LED CPU trigger on systems with thousands of CPUs easily hits PAGE_SIZE limit, and makes it impossible to see all available LED triggers and which trigger is currently activated.

This patch converts /sys/class/leds/<led>/trigger to bin attribute and removes the PAGE_SIZE limitation.

The first version of this seris provided the new api that follows the "one value per file" rule of sysfs. The second version dropped it because there have been a number of problems and it turns out that the new api should be submitted separately.

* v3
- Remove "query" parameters from led_trigger_snprintf() and led_trigger_format()
- Return -ENOMEM immediately if memory allocation fails
- Drop Acked-by: tag due to a certain amount of changes

* v2
- Update commit message
- Drop patches for new api

Akinobu Mita (1):
leds: remove PAGE_SIZE limit of /sys/class/leds/<led>/trigger

 drivers/leds/led-class.c    |  8 ++--
 drivers/leds/led-triggers.c | 90 ++++++++++++++++++++++++++++++++++-----------
 drivers/leds/leds.h         |  6 +++
 include/linux/leds.h        |  5 ---
 4 files changed, 78 insertions(+), 31 deletions(-)
Cc Greg Kroah-Hartman <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc Jacek Anaszewski <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Dan Murphy <[email protected]>
Signature · 1 line
2.7.4