Skip to content

leds: add device trigger

Maciek Borzecki linux-leds lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesIn review
  2. v13 patches 5 repliesSuperseded

Changes in v2 from the cover letter

- fixed debugfs user address space access
- added unregister debugfs attribute
- documentation update

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3leds: add device activity LED triggersdrivers/leds/trigger/Kconfig drivers/leds/trigger/Makefile drivers/leds/trigger/ledtrig-device.c +1 more+204 -04 replies
2/3leds: add debugfs to device triggerdrivers/leds/trigger/ledtrig-device.c+143 -20 replies
3/3Documentation: leds: document ledtrig-device triggerDocumentation/leds/00-INDEX Documentation/leds/ledtrig-device.txt+38 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/3] leds: add device trigger

A series of patches that add yet another LED trigger, a device activity trigger.

The motivation is to have a LED trigger that is associated with a device and can be fired from cetrain points in the code that have been chosen by the developer. With this this device activity trigger it is possible for instance to easily hook up a tty driver for a console to blink one LED, yet another serial port to blink a second LED and writes to a block device to trigger a third LED.

The patches have been tested on Wandboard Quad.

The first patch adds the actual trigger. Each device wishing to use the trigger has to be explicitly registered by calling ledtrig_dev_add(), and passing it's dev_t. The intention is that the trigger will be used in scenarios that are impossible to foresee at this moment, and are likely to be approach in a case by case manner anyway.

The second patch adds couple of debugfs helpers.

The third patch adds documentation and notes on debugfs interface.

Example hooks into tty driver can be seen here:
https://github.com/bboozzoo/linux/commit/d8a875673e37b27d9c9066febe7633382f97d8af

Changes since v1:
- fixed debugfs user address space access
- added unregister debugfs attribute
- documentation update

Maciek Borzecki (3):
leds: add device activity LED triggers
leds: add debugfs to device trigger
Documentation: leds: document ledtrig-device trigger

 Documentation/leds/00-INDEX           |   3 +
 Documentation/leds/ledtrig-device.txt |  35 ++++
 drivers/leds/trigger/Kconfig          |   8 +
 drivers/leds/trigger/Makefile         |   1 +
 drivers/leds/trigger/ledtrig-device.c | 326 ++++++++++++++++++++++++++++++++++
 include/linux/leds.h                  |  10 ++
 6 files changed, 383 insertions(+)
 create mode 100644 Documentation/leds/ledtrig-device.txt
 create mode 100644 drivers/leds/trigger/ledtrig-device.c
Signature · 1 line
2.6.0