public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <rpurdie@rpsys.net>
To: "Németh Márton" <nm127@freemail.hu>
Cc: Randy Dunlap <randy.dunlap@oracle.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org, Rodrigo Pereira <rodripe@gmail.com>
Subject: Re: [PATCH 2/3] leds-clevo-mail: hw accelerated LED blink extension
Date: Tue, 23 Oct 2007 22:49:45 +0100	[thread overview]
Message-ID: <1193176185.5709.140.camel@localhost.localdomain> (raw)
In-Reply-To: <471B4BF2.2060205@freemail.hu>

On Sun, 2007-10-21 at 14:54 +0200, Németh Márton wrote:
> From: Márton Németh <nm127@freemail.hu>
> 
> Extends the leds subsystem with a blink_set() callback function which can
> be optionally implemented by a LED driver. If implemented, the driver can use
> the hardware acceleration for blinking a LED.
> 
> Signed-off-by: Márton Németh <nm127@freemail.hu>
> ---
> diff -uprN linux-2.6.23.orig/Documentation/leds-class.txt linux-2.6.23/Documentation/leds-class.txt
> --- linux-2.6.23.orig/Documentation/leds-class.txt	2007-10-09 22:31:38.000000000 +0200
> +++ linux-2.6.23/Documentation/leds-class.txt	2007-10-21 10:45:35.000000000 +0200
> @@ -47,6 +49,19 @@ overhead, I suggest these become part of
>  above leaves scope for further attributes should they be needed.
> 
> 
> +
> +Hardware accelerated blink of LEDs
> +==================================
> +
> +Some LEDs can be programmed to blink without any CPU interaction. To
> +support this feature, a LED driver can optionally implement the
> +blink_set() function (see <linux/leds.h>). If implemeted, the
> +ledtrig-timer tries to use it. The blink_set() function should return
> +0 if the blink setting is supported, or -EINVAL otherwise, which means
> +that the LED will be turned on and off from software by the leds
> +subsystem.

Hardware acceleration of the timer triggers is great to see and worst
case I'll happily apply this patch to the LED tree, thanks.

Before I do, I did wonder if we should enhance the meaning of the
set_blink function a bit. If set_blink is called with delay_on = 0,
delay_off = 0 it could mean "blink with some user friendly value,
hardware assisted". The use for this would be a more generic blink
trigger where you wouldn't need to know about magically hardware
assisted values for blinking, it would simply make an LED blink in a
hardware assisted way.

We also need to document that the brightness_set overrides any blinking
which may or may not be active (which is implied in your driver).

Cheers,

Richard



  reply	other threads:[~2007-10-23 21:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19 18:52 [PATCH 2/3] leds-clevo-mail: hw accelerated LED blink extension Németh Márton
2007-10-21 12:54 ` Németh Márton
2007-10-23 21:49   ` Richard Purdie [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-07-17 10:18 Németh Márton
2007-07-17 13:04 ` Dmitry Torokhov
2007-07-17 18:13 ` Németh Márton

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=1193176185.5709.140.camel@localhost.localdomain \
    --to=rpurdie@rpsys.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm127@freemail.hu \
    --cc=randy.dunlap@oracle.com \
    --cc=rodripe@gmail.com \
    /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