linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <shuahkhan@gmail.com>
To: NeilBrown <neilb@suse.de>, Jonas Bonn <jonas@southpole.se>
Cc: shuahkhan@gmail.com, Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Richard Purdie <richard.purdie@linuxfoundation.org>
Subject: Re: [PATCH ] leds: add new transient trigger for one shot timer support
Date: Mon, 23 Apr 2012 16:22:25 -0600	[thread overview]
Message-ID: <1335219745.2850.7.camel@lorien2> (raw)
In-Reply-To: <20120423154546.415bd6c0@notabene.brown>

On Mon, 2012-04-23 at 15:45 +1000, NeilBrown wrote:
> On Mon, 23 Apr 2012 07:29:59 +0200 Jonas Bonn <jonas@southpole.se> wrote:
> 
> > 
> > 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
> context switch - lots of IO - time passes, 200ms or more, led gets turned of
> and then back to:
> > echo 100 > brightness
> 
> led gets turned on and there is nothing to turn it off.
> 
> Not a likely case I agree, but not impossible.
> 
> The problem is that just setting the brightness will turn the led on
> independent of the start of the trigger (unless you set the brightness to 0 -
> that disables the trigger).
> 
Neil/Jonas,

Thanks for a good discussion and ideas. Are you okay with supporting the
following use-case as a first cut implementation and see how that works
and then add brightness adjustment later?

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

I am taking a look at "safe_delay_show" and "safe_delay_store" in
drivers/md/md.c. I think I can easily change what I have now to do what
these routines do. i.e going with seconds as units based on Neil's
suggestion.

I did make the change to name the properties duration and activate,
dropping the transient pre-fix on both properties.

Thanks,
-- Shuah


  reply	other threads:[~2012-04-23 22:22 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-01 19:53 [PATCH RESEND] LEDS-One-Shot-Timer-Trigger-implementation Shuah Khan
2012-04-03 15:06 ` Shuah Khan
2012-04-06 23:53 ` Andrew Morton
2012-04-07 14:13   ` Shuah Khan
2012-04-07 21:56     ` Dmitry Torokhov
2012-04-08 23:42       ` NeilBrown
2012-04-09  0:06         ` Dmitry Torokhov
2012-04-09 22:25           ` NeilBrown
2012-04-10  8:21             ` Dmitry Torokhov
2012-04-09 16:55       ` Shuah Khan
2012-04-09 17:37         ` Dmitry Torokhov
2012-04-09 18:16           ` Shuah Khan
2012-04-09 18:45             ` Dmitry Torokhov
2012-04-09 20:20               ` Shuah Khan
2012-04-09 20:42                 ` Dmitry Torokhov
2012-04-09 22:40                   ` Shuah Khan
2012-04-10  7:17                     ` Dmitry Torokhov
2012-04-10 18:34                       ` Shuah Khan
2012-04-08 23:58   ` NeilBrown
2012-04-10 13:24 ` Richard Purdie
2012-04-10 15:31   ` Shuah Khan
2012-04-11 10:05     ` Richard Purdie
2012-04-11 15:33       ` Shuah Khan
2012-04-15 16:35   ` Shuah Khan
2012-04-15 22:34     ` [PATCH 1/1] leds: add "kickable" LED trigger Jonas Bonn
2012-04-15 22:37       ` Jonas Bonn
2012-04-16 15:28         ` Shuah Khan
2012-04-16 22:33           ` Jonas Bonn
2012-04-16 23:05             ` Shuah Khan
2012-04-20  4:04     ` [PATCH ] leds: add new transient trigger for one shot timer support Shuah Khan
2012-04-20 21:19       ` Andrew Morton
2012-04-20 22:48         ` Shuah Khan
2012-04-21  4:41       ` Jonas Bonn
2012-04-22 23:51         ` Shuah Khan
2012-04-23  1:56           ` NeilBrown
2012-04-23  5:29             ` Jonas Bonn
2012-04-23  5:45               ` NeilBrown
2012-04-23 22:22                 ` Shuah Khan [this message]
2012-04-25 17:42                   ` [PATCH v2] leds: add new transient trigger for one shot timer activation Shuah Khan
2012-04-26  6:02                     ` NeilBrown
2012-04-26 14:48                       ` Shuah Khan
2012-04-26 23:00                     ` Andrew Morton
2012-04-30 20:33                       ` [PATCH v3] " Shuah Khan
2012-04-23  5:07           ` [PATCH ] leds: add new transient trigger for one shot timer support Jonas Bonn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1335219745.2850.7.camel@lorien2 \
    --to=shuahkhan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=jonas@southpole.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).