summaryrefslogtreecommitdiffstats
path: root/sound/oss
diff options
context:
space:
mode:
authorShuah Khan <shuahkhan@gmail.com>2012-05-30 00:07:30 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-30 01:22:32 +0200
commit44e1e9f8e70506728b02a18e6d03599a6485d67f (patch)
treecb50e9faaf6017d44faf6bd5224e209df42aa9d8 /sound/oss
parentleds: heartbeat: stop on shutdown (diff)
downloadlinux-44e1e9f8e70506728b02a18e6d03599a6485d67f.tar.xz
linux-44e1e9f8e70506728b02a18e6d03599a6485d67f.zip
leds: add new transient trigger for one shot timer activation
The leds timer trigger does not currently have an interface to activate a one shot timer. The current support allows for setting two timers, one for specifying how long a state to be on, and the second for how long the state to be off. The delay_on value specifies the time period an LED should stay in on state, followed by a delay_off value that specifies how long the LED should stay in off state. The on and off cycle repeats until the trigger gets deactivated. There is no provision for one time activation to implement features that require an on or off state to be held just once and then stay in the original state forever. Without one shot timer interface, user space can still use timer trigger to set a timer to hold a state, however when user space application crashes or goes away without deactivating the timer, the hardware will be left in that state permanently. As a specific example of this use-case, let's look at vibrate feature on phones. Vibrate function on phones is implemented using PWM pins on SoC or PMIC. There is a need to activate one shot timer to control the vibrate feature, to prevent user space crashes leaving the phone in vibrate mode permanently causing the battery to drain. This trigger exports three properties, activate, state, and duration When transient trigger is activated these properties are set to default values. - duration allows setting timer value in msecs. The initial value is 0. - activate allows activating and deactivating the timer specified by duration as needed. The initial and default value is 0. This will allow duration to be set after trigger activation. - state allows user to specify a transient state to be held for the specified duration. Signed-off-by: Shuah Khan <shuahkhan@gmail.com> Cc: Jonas Bonn <jonas@southpole.se> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: NeilBrown <neilb@suse.de> Cc: Bryan Wu <bryan.wu@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/oss')
0 files changed, 0 insertions, 0 deletions