Re: [RFC PATCH 1/1] leds: add generic inverted led trigger support
From: Jacek Anaszewski
Date: Sun Mar 08 2020 - 13:35:11 EST
Hi Tobias,
We have already some triggers that accomplish that by introducing
a custom sysfs file. It seems less intrusive to do the same for
ledtrig-disk.c. You could also try to make this a generic feature
for all LED triggers.
On 3/8/20 3:27 PM, Tobias Schramm wrote:
> This commit allows inversion of triggers by appending "-inverted" to the
> name of a trigger.
>
> This can be useful when dealing with device that lack separate LEDs for
> indicating e.g. disk activity. With this commit applied the power LED
> can be used as a disk activity indicator by setting its default state to
> on and using the "disk-activity-inverted" trigger. The LED will then turn
> off briefly when there is disk activity.
>
> Signed-off-by: Tobias Schramm <t.schramm@xxxxxxxxxxx>
--
Best regards,
Jacek Anaszewski