mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] leds: Further document parameters for blink_set()
@ 2009-06-11 13:17 Mark Brown
  2009-06-21  6:39 ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2009-06-11 13:17 UTC (permalink / raw)
  To: Richard Purdie; +Cc: linux-kernel, Mark Brown

The documentation for the parameters of blink_set() was a bit hard
to find so put some where I'd expected to find it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 include/linux/leds.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/include/linux/leds.h b/include/linux/leds.h
index 376fe07..c7f0b14 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -45,7 +45,9 @@ struct led_classdev {
 	/* Get LED brightness level */
 	enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
 
-	/* Activate hardware accelerated blink */
+	/* Activate hardware accelerated blink, delays are in
+	 * miliseconds and if none is provided then a sensible default
+	 * should be chosen. */
 	int		(*blink_set)(struct led_classdev *led_cdev,
 				     unsigned long *delay_on,
 				     unsigned long *delay_off);
-- 
1.6.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] leds: Further document parameters for blink_set()
  2009-06-11 13:17 [PATCH] leds: Further document parameters for blink_set() Mark Brown
@ 2009-06-21  6:39 ` Pavel Machek
  2009-06-22 13:51   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2009-06-21  6:39 UTC (permalink / raw)
  To: Mark Brown; +Cc: Richard Purdie, linux-kernel

On Thu 2009-06-11 14:17:48, Mark Brown wrote:
> The documentation for the parameters of blink_set() was a bit hard
> to find so put some where I'd expected to find it.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  include/linux/leds.h |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/include/linux/leds.h b/include/linux/leds.h
> index 376fe07..c7f0b14 100644
> --- a/include/linux/leds.h
> +++ b/include/linux/leds.h
> @@ -45,7 +45,9 @@ struct led_classdev {
>  	/* Get LED brightness level */
>  	enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
>  
> -	/* Activate hardware accelerated blink */
> +	/* Activate hardware accelerated blink, delays are in
> +	 * miliseconds and if none is provided then a sensible default
> +	 * should be chosen. */
>  	int		(*blink_set)(struct led_classdev *led_cdev,
>  				     unsigned long *delay_on,
>  				     unsigned long *delay_off);

What a strange calling convention. Does it return data in
*delay_on/off ? Should that also be documented?
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] leds: Further document parameters for blink_set()
  2009-06-21  6:39 ` Pavel Machek
@ 2009-06-22 13:51   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2009-06-22 13:51 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Mark Brown, linux-kernel

On Sun, 2009-06-21 at 08:39 +0200, Pavel Machek wrote:
> On Thu 2009-06-11 14:17:48, Mark Brown wrote:
> > The documentation for the parameters of blink_set() was a bit hard
> > to find so put some where I'd expected to find it.
> > 
> > Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> > ---
> >  include/linux/leds.h |    4 +++-
> >  1 files changed, 3 insertions(+), 1 deletions(-)
> > 
> > diff --git a/include/linux/leds.h b/include/linux/leds.h
> > index 376fe07..c7f0b14 100644
> > --- a/include/linux/leds.h
> > +++ b/include/linux/leds.h
> > @@ -45,7 +45,9 @@ struct led_classdev {
> >  	/* Get LED brightness level */
> >  	enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
> >  
> > -	/* Activate hardware accelerated blink */
> > +	/* Activate hardware accelerated blink, delays are in
> > +	 * miliseconds and if none is provided then a sensible default
> > +	 * should be chosen. */
> >  	int		(*blink_set)(struct led_classdev *led_cdev,
> >  				     unsigned long *delay_on,
> >  				     unsigned long *delay_off);
> 
> What a strange calling convention. Does it return data in
> *delay_on/off ?

It was done so the caller could find out what timings the underlying
hardware decided to chose if it couldn't match the timings specified
exactly. This should be better documented and I'll take care of that.

Cheers,

Richard

-- 
Richard Purdie
Intel Open Source Technology Centre


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-22 14:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-11 13:17 [PATCH] leds: Further document parameters for blink_set() Mark Brown
2009-06-21  6:39 ` Pavel Machek
2009-06-22 13:51   ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®