Skip to contentSkip to conversation

leds-class: change back LEDS_CLASS to tristate instead of bool

PATCH Applied Bryan Wu 4 participants 9 messages Sep 5, 2011 – Sep 30, 2011

Subsystems (2)
lore
Share & tools
lore

Bryan Wu

author
#0 lore raw

PATCH 1/2 leds-class: change back LEDS_CLASS to tristate instead of bool

LEDS_CLASS is required by leds and trigger drivers, but we can build it as module. So change this option back as tristate and treak the help message as well.

---
 drivers/leds/Kconfig |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/leds/Kconfig +5 -2
index b591e72..1c35927 100644
@@ -17,10 +17,13 @@ menuconfig NEW_LEDS
 if NEW_LEDS
 
 config LEDS_CLASS
-	bool "LED Class Support"
+	tristate "LED Class Support"
 	help
 	  This option enables the led sysfs class in /sys/class/leds.  You'll
-	  need this to do anything useful with LEDs.  If unsure, say N.
+	  need this to do anything useful with LEDs.  If unsure, say M.
+
+	  Note: don't disable it as N, because plenty of led and trigger drivers
+	  are using this option.
 
 comment "LED drivers"
 
Signature · 1 line
1.7.4.1
author
#1 lore raw

PATCH 2/2 Documentation: leds-class: fix a typo

---
 Documentation/leds/leds-class.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/leds/leds-class.txt +2 -2
index 4996586..79699c2 100644
@@ -61,8 +61,8 @@ 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>). To set an LED to blinking,
-however, it is better to use use the API function led_blink_set(),
-as it will check and implement software fallback if necessary.
+however, it is better to use the API function led_blink_set(), as it
+will check and implement software fallback if necessary.
 
 To turn off blinking again, use the API function led_brightness_set()
 as that will not just set the LED brightness but also stop any software
Signature · 1 line
1.7.4.1
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] Documentation: leds-class: fix a typo

Quoted 1 line · Bryan Wu
Quoted 19 lines
---
 Documentation/leds/leds-class.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/leds/leds-class.txt +2 -2
index 4996586..79699c2 100644
@@ -61,8 +61,8 @@ 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>). To set an LED to blinking,
-however, it is better to use use the API function led_blink_set(),
-as it will check and implement software fallback if necessary.
+however, it is better to use the API function led_blink_set(), as it
+will check and implement software fallback if necessary.
 
 To turn off blinking again, use the API function led_brightness_set()
 as that will not just set the LED brightness but also stop any software
#3 lore raw

Re: [PATCH 2/2] Documentation: leds-class: fix a typo

Quoted 4 lines · Richard Purdie
Quoted 1 line · Bryan Wu

Who are we expecting to merge this patch?

Quoted 23 lines
Quoted 10 lines
---
 Documentation/leds/leds-class.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/leds/leds-class.txt +0 -0
index 4996586..79699c2 100644

Documentation/leds/leds-class.txt Hardware accelerated blink of LEDs · line 68

Quoted 10 lines
Documentation/leds/leds-class.txt +2 -2
@@ -61,8 +61,8 @@ 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>). To set an LED to blinking,
-however, it is better to use use the API function led_blink_set(),
-as it will check and implement software fallback if necessary.
+however, it is better to use the API function led_blink_set(), as it
+will check and implement software fallback if necessary.
 
 To turn off blinking again, use the API function led_brightness_set()
 as that will not just set the LED brightness but also stop any software

--

Signature · 1 line
~Randy
Applied
#4 lore raw

Re: [PATCH 2/2] Documentation: leds-class: fix a typo

In reply to Richard Purdie
Quoted 4 lines · Richard Purdie
Quoted 1 line · Bryan Wu

Applied, thanks.

Quoted 19 lines
Quoted 19 lines
---
 Documentation/leds/leds-class.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/leds/leds-class.txt +2 -2
index 4996586..79699c2 100644
@@ -61,8 +61,8 @@ 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>). To set an LED to blinking,
-however, it is better to use use the API function led_blink_set(),
-as it will check and implement software fallback if necessary.
+however, it is better to use the API function led_blink_set(), as it
+will check and implement software fallback if necessary.
 
 To turn off blinking again, use the API function led_brightness_set()
 as that will not just set the LED brightness but also stop any software
Signature · 2 lines
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
Acked-by on v1 1/2
#5 lore raw
In reply to Bryan Wu
Quoted 5 lines · Bryan Wu

LEDS_CLASS is required by leds and trigger drivers, but we can build it as module. So change this option back as tristate and treak the help message as well.

Quoted 24 lines
---
 drivers/leds/Kconfig |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/leds/Kconfig +5 -2
index b591e72..1c35927 100644
@@ -17,10 +17,13 @@ menuconfig NEW_LEDS
 if NEW_LEDS
 
 config LEDS_CLASS
-	bool "LED Class Support"
+	tristate "LED Class Support"
 	help
 	  This option enables the led sysfs class in /sys/class/leds.  You'll
-	  need this to do anything useful with LEDs.  If unsure, say N.
+	  need this to do anything useful with LEDs.  If unsure, say M.
+
+	  Note: don't disable it as N, because plenty of led and trigger drivers
+	  are using this option.
 
 comment "LED drivers"
 
author
#6 lore raw
Quoted 9 lines · Richard Purdie
Quoted 5 lines · Bryan Wu

LEDS_CLASS is required by leds and trigger drivers, but we can build it as module. So change this option back as tristate and treak the help message as well.

Thanks a lot, Richard.

I also suggest we set LEDS_TRIGGERS as tristate, because it should be a module when CONFIG_LEDS_CLASS=m.

-Bryan

#7 lore raw
In reply to Richard Purdie
Quoted 20 lines · Richard Purdie
Quoted 5 lines · Bryan Wu

LEDS_CLASS is required by leds and trigger drivers, but we can build it as module. So change this option back as tristate and treak the help message as well.

Quoted 11 lines
---
 drivers/leds/Kconfig |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/leds/Kconfig +0 -0
index b591e72..1c35927 100644
@@ -17,10 +17,13 @@ menuconfig NEW_LEDS
 if NEW_LEDS
 
Quoted 10 lines

drivers/leds/Kconfig menuconfig NEW_LEDS · line 26

Quoted 10 lines
drivers/leds/Kconfig +5 -2
 config LEDS_CLASS
-	bool "LED Class Support"
+	tristate "LED Class Support"
 	help
 	  This option enables the led sysfs class in /sys/class/leds.  You'll
-	  need this to do anything useful with LEDs.  If unsure, say N.
+	  need this to do anything useful with LEDs.  If unsure, say M.
+
+	  Note: don't disable it as N, because plenty of led and trigger drivers
+	  are using this option.

This is crap - putting a dependency in the help for an option is unacceptable when we have things like randconfig etc which are expected to work.

If this must be 'm' or 'y', then make it depend on m to force the minimum setting.

author
#8 lore raw
Quoted 36 lines · Russell King - ARM Linux
Quoted 20 lines · Richard Purdie
Quoted 5 lines · Bryan Wu

LEDS_CLASS is required by leds and trigger drivers, but we can build it as module. So change this option back as tristate and treak the help message as well.

Quoted 11 lines

---
 drivers/leds/Kconfig |    7 +++++--

 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/leds/Kconfig +0 -0
index b591e72..1c35927 100644
@@ -17,10 +17,13 @@ menuconfig NEW_LEDS

 if NEW_LEDS

Quoted 10 lines
Quoted 10 lines

 config LEDS_CLASS
-   bool "LED Class Support"
+   tristate "LED Class Support"
    help
      This option enables the led sysfs class in /sys/class/leds.  You'll
-     need this to do anything useful with LEDs.  If unsure, say N.
+     need this to do anything useful with LEDs.  If unsure, say M. +
+     Note: don't disable it as N, because plenty of led and trigger drivers
+     are using this option.

This is crap - putting a dependency in the help for an option is unacceptable when we have things like randconfig etc which are expected to work.

Quoted 3 lines

If this must be 'm' or 'y', then make it depend on m to force the minimum setting.

I will remove the pointless help message and try to fix all compiling error then, and send out the patch again.

Thanks,

Signature · 5 lines
Bryan Wu <[email protected]>
Kernel Developer    +86.138-1617-6545 Mobile
Ubuntu Kernel Team
Canonical Ltd.      www.canonical.com
Ubuntu - Linux for human beings | www.ubuntu.com