[lkml]   [2012]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH ] leds: add new transient trigger for one shot timer support

    On Mon, 2012-04-23 at 11:56 +1000, NeilBrown wrote:
    > I wonder if we should allow control of the brightness during the "on" time as
    > well.
    > You could set the brightness after enabling the timer, but awkward pauses or
    > races could then leave the "led" permanently on.

    echo transient > trigger
    echo 200 > duration
    echo 1 > activate
    echo 100 > brightness

    Worst case, the brightness doesn't get set and you get a 'bright' LED
    until it expires... but at least it does expire!

    > Possibly we could hook into led_set_brightness() and restart the timer
    > whenever the brightness was set - and remember the setting.

    An easy way to do this might be to check the brightness setting at the
    time the timer expires and save this value. Next time the LED is
    activated, we use this brightness setting instead of FULL_ON. It would
    be nice to keep this trigger self-contained and not have to hook into

    You make interesting point about using the brightness property as the
    actual timer trigger, though. That's pretty elegant, but it does
    require hooking into led_set_brightness.


     \ /
      Last update: 2012-04-23 07:39    [W:0.031 / U:6.100 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site