]> git.baikalelectronics.ru Git - kernel.git/commit
leds: add output inversion option to backlight trigger
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Thu, 13 Jan 2011 00:59:20 +0000 (16:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 16:03:06 +0000 (08:03 -0800)
commit2070fd349cc32a32446e1f6f77d915bc28ae5d64
tree6ce8c8b1d8a4fb58d85484555ea25b2a6d298796
parent1954eef09c8cdba7edf7304261dc87344b524edf
leds: add output inversion option to backlight trigger

Extend the LED backlight tirgger driver with an option that allows for
inverting the trigger output polarity.

With the invertion option provided, I (ab)use the backlight trigger for
driving a LED that indicates LCD display blank condtition on my Amstrad
Delta videophone.  Since the machine has no dedicated power LED, it was
not possible to distinguish if the display was blanked, or the machine was
turned off, without touching it.

The invert sysfs control is patterned after a similiar function of the GPIO
trigger driver.

[akpm@linux-foundation.org: make output match input, tighten input checking]
[akpm@linux-foundation.org: make output match input, tighten input checking]
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/ABI/testing/sysfs-class-led
drivers/leds/ledtrig-backlight.c