Skip to contentSkip to conversation

leds: Further document parameters for blink_set()

PATCH Superseded Mark Brown 3 participants 3 messages Jun 11, 2009 – Jun 22, 2009 LED

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 leds: Further document parameters for blink_set()

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

---
 include/linux/leds.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
include/linux/leds.h +3 -1
index 376fe07..c7f0b14 100644
@@ -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);
Signature · 1 line
1.6.3.1
#1 lore raw
Quoted 13 lines · 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.

---
 include/linux/leds.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
include/linux/leds.h +0 -0
index 376fe07..c7f0b14 100644

include/linux/leds.h struct led_classdev { · line 53

Quoted 10 lines
include/linux/leds.h +3 -1
@@ -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

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
Quoted 17 lines · Pavel Machek
Quoted 16 lines · 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.

---
 include/linux/leds.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
include/linux/leds.h +0 -0
index 376fe07..c7f0b14 100644
@@ -45,7 +45,9 @@ struct led_classdev {
 	/* Get LED brightness level */
 	enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
 
Quoted 10 lines

include/linux/leds.h struct led_classdev { · line 53

Quoted 7 lines
include/linux/leds.h +3 -1
-	/* 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

Signature · 2 lines
Richard Purdie
Intel Open Source Technology Centre