[PATCH ] leds: add new transient trigger for one shot timer support

From: Shuah Khan
Date: Fri Apr 20 2012 - 00:05:20 EST


This patch adds a new transient trigger for one shot timer support and is
to be used for the following example use cases:

- Control of vibrate (phones, tablets etc.) hardware by userspace app.
- Use of LED by userspace app as activity indicator.
- Use of LED by userspace app as a kind of watchdog indicator -- as
long as the app is alive, it can keep the LED illuminated, if it dies
the LED will be extinguished automatically.
- Use by any userspace app that needs a transient GPIO output

Transient trigger exports two attributes:
transient_enabled - one shot timer enable mechanism.
1 when enabled, 0 when disabled.
enabled state indicates a timer
with a value of transient_time running.
disabled state indicates no active timer
running.
transient_time - one shot timer value. When transient_enabled
is set, transient_time value is used to start
a timer that runs once.
When timer expires transient_enabled goes back to disabled state,
transient_time is left at the set value to be used when transient
is enabled at a future time. This will allow user app to set the
time once and enable it to run it once for the specified value as
needed.