linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next 0/2] leds: add substitutes for /sys/class/leds/<led>/trigger
@ 2019-10-02 15:12 Akinobu Mita
  2019-10-02 15:13 ` [PATCH -next 1/2] leds: add /sys/devices/virtual/led-trigger/ Akinobu Mita
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Akinobu Mita @ 2019-10-02 15:12 UTC (permalink / raw)
  To: linux-leds, linux-kernel
  Cc: Akinobu Mita, Greg Kroah-Hartman, Rafael J. Wysocki,
	Jacek Anaszewski, Pavel Machek, Dan Murphy

Reading /sys/class/leds/<led>/trigger returns all available LED triggers.
However, this violates the "one value per file" rule of sysfs.

This series provides a new /sys/devices/virtual/led-trigger/ directory and
/sys/class/leds/<led>/current-trigger. The new api follows the "one value
per file" rule of sysfs.

This series was previously developed as a part of the series "leds: fix
/sys/class/leds/<led>/trigger and add new api" [1].  Now this version
only contains the new api part.

[1] https://lore.kernel.org/r/1567946472-10075-1-git-send-email-akinobu.mita@gmail.com

Akinobu Mita (2):
  leds: add /sys/devices/virtual/led-trigger/
  leds: add /sys/class/leds/<led>/current-trigger

 Documentation/ABI/testing/sysfs-class-led          | 13 +++
 .../ABI/testing/sysfs-devices-virtual-led-trigger  |  8 ++
 drivers/leds/led-class.c                           | 10 +++
 drivers/leds/led-triggers.c                        | 95 +++++++++++++++++++++-
 drivers/leds/leds.h                                |  5 ++
 include/linux/leds.h                               |  3 +
 6 files changed, 130 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-devices-virtual-led-trigger

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Dan Murphy <dmurphy@ti.com>
-- 
2.7.4


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-10-02 18:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 15:12 [PATCH -next 0/2] leds: add substitutes for /sys/class/leds/<led>/trigger Akinobu Mita
2019-10-02 15:13 ` [PATCH -next 1/2] leds: add /sys/devices/virtual/led-trigger/ Akinobu Mita
2019-10-02 15:27   ` Greg Kroah-Hartman
2019-10-02 15:28   ` Greg Kroah-Hartman
2019-10-02 15:13 ` [PATCH -next 2/2] leds: add /sys/class/leds/<led>/current-trigger Akinobu Mita
2019-10-02 15:30   ` Greg Kroah-Hartman
2019-10-02 15:47   ` Dan Murphy
2019-10-02 17:46     ` Jacek Anaszewski
2019-10-02 17:57       ` Dan Murphy
2019-10-02 18:06         ` Pavel Machek
2019-10-02 18:03 ` [PATCH -next 0/2] leds: add substitutes for /sys/class/leds/<led>/trigger Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).