Re: [PATCH] leds: Further document parameters for blink_set()



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@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: {OT:} Glenn Beck REALLY loses it
    ... the caller was pretty much correct on that one. ... care she needed and France footed the bill. ... We will have high costs and poor service. ...
    (alt.autos.toyota)
  • Re: [PATCH 09/22] Calculate the alloc_flags for allocation only once
    ... Without care, this would allow recursion into the allocator via direct ... +static inline int ... Only because it was known there was only one caller. ... Uninline gfp_to_alloc_flagsin the page allocator slow path ...
    (Linux-Kernel)
  • Re: Survey - Cliff & Crossposting Summary 4/21/09
    ... to amc. ... So here is a survey to see how others feel. ... People chose "I don't care either way". ... 19 People Chose "I wish Cliff would stop crossposting. ...
    (alt.machines.cnc)
  • Re: A call for a moderated AUE (was: Re: OT Pounds)
    ... >I was very deliberate in what I chose to write about. ... I was careful to be ... You would like for me to speak to a subject I don't think ... >>It's not necessary that you care or don't care. ...
    (alt.usage.english)
  • Re: ATWT:Casey
    ... about a month ago I got into a long argument with a bunch of his real-life spiritual brothers at another newsgroup. ... They insisted that men should have the right to either force a woman who gets pregnant to have an abortion, or not have any responsibility toward the child. ... They should take care of it. ... Wrap it plastic, buddy, or accept that you chose the consequences. ...
    (rec.arts.tv.soaps.cbs)