Skip to content

leds: trigger: Add new LED Input events trigger

Hans de Goede linux-leds 3 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest1 patch 1 replyApplied
  2. v21 patch 2 repliesSuperseded
  3. v11 patch 1 replySuperseded

Changes in v3 from the cover letter

- Rebase on v6.10-rc1
- Use kzalloc(sizeof(*handle), ...)

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/1leds: trigger: Add new LED Input events triggerdrivers/leds/trigger/Kconfig drivers/leds/trigger/Makefile drivers/leds/trigger/ledtrig-input-events.c+250 -01 reply

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/1] leds: trigger: Add new LED Input events trigger

Hi All,

While looking into a driver for the backlight for the 3 menu / home / back capacitive-touch buttons found on the bottom bezel of the Xiaomi Pad 2 tablet I decided rather then to write a custom driver just for this it would be better to solve this in a generic way which can be reused on other devices since having such capactive touch buttons on the bottom bezel is quite normal for somewhat older phones and tablets.

So here is a patch adding a new trigger which turns LEDs on when there is input (/dev/input/event*) activity and turns them back off again after there has been no activity for 5 seconds. This trigger can then be used to control the LEDs backlighting these kind of capactive touch buttons and it may also be useful to control keyboard backlighting in some cases.

Changes in v3:
- Rebase on v6.10-rc1
- Use kzalloc(sizeof(*handle), ...)

Changes in v2:
- Add MODULE_ALIAS() for module auto-loading
- Stop using the led-trigger.c private trigger->led_cdevs list

Regards,

Hans

Hans de Goede (1):
leds: trigger: Add new LED Input events trigger

 drivers/leds/trigger/Kconfig                |  16 ++
 drivers/leds/trigger/Makefile               |   1 +
 drivers/leds/trigger/ledtrig-input-events.c | 233 ++++++++++++++++++++
 3 files changed, 250 insertions(+)
 create mode 100644 drivers/leds/trigger/ledtrig-input-events.c
Signature · 1 line
2.45.1