mbox series

[0/3] leds: trigger: Add led trigger for bpf

Message ID cover.1711113657.git.hodges.daniel.scott@gmail.com
Headers show
Series leds: trigger: Add led trigger for bpf | expand

Message

Daniel Hodges March 22, 2024, 2:08 p.m. UTC
This patch set adds a new led trigger that uses the bpf subsystem for
triggering leds. It is designed to be used in conjunction with a bpf
program(s) that can modify led state through the use of bpf kfuncs. This
is useful for providing a physical indication that a some event has
occurred. In the context of bpf this could range from handling a packet
to hitting a tracepoint.

Daniel Hodges (3):
  leds: trigger: legtrig-bpf: Add ledtrig-bpf module
  selftests/bpf: Add selftests for bpf led programs
  leds: trigger: Add documentation for ledtrig-bpf

 Documentation/leds/index.rst                  |  1 +
 Documentation/leds/ledtrig-bpf.rst            | 13 ++++
 drivers/leds/trigger/Kconfig                  | 10 +++
 drivers/leds/trigger/Makefile                 |  1 +
 drivers/leds/trigger/ledtrig-bpf.c            | 72 +++++++++++++++++++
 tools/testing/selftests/bpf/config            |  1 +
 .../testing/selftests/bpf/progs/ledtrig_bpf.c | 28 ++++++++
 7 files changed, 126 insertions(+)
 create mode 100644 Documentation/leds/ledtrig-bpf.rst
 create mode 100644 drivers/leds/trigger/ledtrig-bpf.c
 create mode 100644 tools/testing/selftests/bpf/progs/ledtrig_bpf.c