Linux LED subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/1] leds: trigger: Add new LED Input events trigger
@ 2024-05-09 14:11 Hans de Goede
  2024-05-09 14:11 ` [PATCH v2 1/1] " Hans de Goede
  0 siblings, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2024-05-09 14:11 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones; +Cc: Hans de Goede, Kate Hsuan, linux-leds

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 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

-- 
2.44.0


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

end of thread, other threads:[~2024-05-31 13:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-09 14:11 [PATCH v2 0/1] leds: trigger: Add new LED Input events trigger Hans de Goede
2024-05-09 14:11 ` [PATCH v2 1/1] " Hans de Goede
2024-05-31 12:36   ` Lee Jones
2024-05-31 13:53     ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox