public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] Add generic inverted led triggers
@ 2020-03-08 14:27 Tobias Schramm
  2020-03-08 14:27 ` [RFC PATCH 1/1] leds: add generic inverted led trigger support Tobias Schramm
  2020-03-08 21:26 ` [RFC PATCH 0/1] Add generic inverted led triggers Pavel Machek
  0 siblings, 2 replies; 6+ messages in thread
From: Tobias Schramm @ 2020-03-08 14:27 UTC (permalink / raw)
  To: Jacek Anaszewski, Pavel Machek, Dan Murphy
  Cc: linux-leds, linux-kernel, Tobias Schramm

This patch adds generic inverted LED triggers. With this patch applied
any trigger can be used with inverted brightness levels by appending
"-inverted" to the name of a trigger.

This is can be useful for devices that do not have dedicated LEDs for e.g.
disk activity indication. With this patch applied the power led can be set
 to default-state = on and trigger = disk-activity-inverted. Then the led
will be on by default, indicating the power state of the device but it
will turn off briefly whenever there is disk activity.

I think dual-use of LEDs might come in handy for quite a few devices since
a lot of embedded boards and upcoming ARM based notebooks do only have one
or two LEDs.


Best regards,

Tobias

Tobias Schramm (1):
  leds: add generic inverted led trigger support

 drivers/leds/led-triggers.c | 148 +++++++++++++++++++++++++++---------
 include/linux/leds.h        |   1 +
 2 files changed, 111 insertions(+), 38 deletions(-)

-- 
2.24.1


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

end of thread, other threads:[~2020-03-09 14:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-08 14:27 [RFC PATCH 0/1] Add generic inverted led triggers Tobias Schramm
2020-03-08 14:27 ` [RFC PATCH 1/1] leds: add generic inverted led trigger support Tobias Schramm
2020-03-08 17:35   ` Jacek Anaszewski
2020-03-09 13:46     ` Tobias Schramm
2020-03-08 21:26 ` [RFC PATCH 0/1] Add generic inverted led triggers Pavel Machek
2020-03-09 14:05   ` Tobias Schramm

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