]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
leds: move LED trigger drivers into new subdirectory
authorKim, Milo <Milo.Kim@ti.com>
Wed, 20 Feb 2013 08:36:01 +0000 (00:36 -0800)
committerBryan Wu <cooloney@gmail.com>
Mon, 1 Apr 2013 18:04:48 +0000 (11:04 -0700)
For better driver management, new subdirectory, 'trigger' is created.
All LED trigger drivers are moved into this directory.

Internal header, 'leds.h' is included in each LED trigger drivers.
Fix the location of header file, "leds.h" -> "../leds.h" in driver files.
One exception is here, 'ledtrig-timer.c'.
There is no need to include 'leds.h'. so '#include "leds.h"' line was removed.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
13 files changed:
drivers/leds/Kconfig
drivers/leds/Makefile
drivers/leds/trigger/Kconfig [new file with mode: 0644]
drivers/leds/trigger/Makefile [new file with mode: 0644]
drivers/leds/trigger/ledtrig-backlight.c [moved from drivers/leds/ledtrig-backlight.c with 99% similarity]
drivers/leds/trigger/ledtrig-cpu.c [moved from drivers/leds/ledtrig-cpu.c with 99% similarity]
drivers/leds/trigger/ledtrig-default-on.c [moved from drivers/leds/ledtrig-default-on.c with 98% similarity]
drivers/leds/trigger/ledtrig-gpio.c [moved from drivers/leds/ledtrig-gpio.c with 99% similarity]
drivers/leds/trigger/ledtrig-heartbeat.c [moved from drivers/leds/ledtrig-heartbeat.c with 99% similarity]
drivers/leds/trigger/ledtrig-ide-disk.c [moved from drivers/leds/ledtrig-ide-disk.c with 100% similarity]
drivers/leds/trigger/ledtrig-oneshot.c [moved from drivers/leds/ledtrig-oneshot.c with 99% similarity]
drivers/leds/trigger/ledtrig-timer.c [moved from drivers/leds/ledtrig-timer.c with 99% similarity]
drivers/leds/trigger/ledtrig-transient.c [moved from drivers/leds/ledtrig-transient.c with 99% similarity]

index c7f755034375245b2245c73cbb2185c7930889b0..d44806d41b4468838fdd151da7dea61fa2e54b14 100644 (file)
@@ -479,106 +479,7 @@ config LEDS_BLINKM
          This option enables support for the BlinkM RGB LED connected
          through I2C. Say Y to enable support for the BlinkM LED.
 
-config LEDS_TRIGGERS
-       bool "LED Trigger support"
-       depends on LEDS_CLASS
-       help
-         This option enables trigger support for the leds class.
-         These triggers allow kernel events to drive the LEDs and can
-         be configured via sysfs. If unsure, say Y.
-
 comment "LED Triggers"
-
-config LEDS_TRIGGER_TIMER
-       tristate "LED Timer Trigger"
-       depends on LEDS_TRIGGERS
-       help
-         This allows LEDs to be controlled by a programmable timer
-         via sysfs. Some LED hardware can be programmed to start
-         blinking the LED without any further software interaction.
-         For more details read Documentation/leds/leds-class.txt.
-
-         If unsure, say Y.
-
-config LEDS_TRIGGER_ONESHOT
-       tristate "LED One-shot Trigger"
-       depends on LEDS_TRIGGERS
-       help
-         This allows LEDs to blink in one-shot pulses with parameters
-         controlled via sysfs.  It's useful to notify the user on
-         sporadic events, when there are no clear begin and end trap points,
-         or on dense events, where this blinks the LED at constant rate if
-         rearmed continuously.
-
-         It also shows how to use the led_blink_set_oneshot() function.
-
-         If unsure, say Y.
-
-config LEDS_TRIGGER_IDE_DISK
-       bool "LED IDE Disk Trigger"
-       depends on IDE_GD_ATA
-       depends on LEDS_TRIGGERS
-       help
-         This allows LEDs to be controlled by IDE disk activity.
-         If unsure, say Y.
-
-config LEDS_TRIGGER_HEARTBEAT
-       tristate "LED Heartbeat Trigger"
-       depends on LEDS_TRIGGERS
-       help
-         This allows LEDs to be controlled by a CPU load average.
-         The flash frequency is a hyperbolic function of the 1-minute
-         load average.
-         If unsure, say Y.
-
-config LEDS_TRIGGER_BACKLIGHT
-       tristate "LED backlight Trigger"
-       depends on LEDS_TRIGGERS
-       help
-         This allows LEDs to be controlled as a backlight device: they
-         turn off and on when the display is blanked and unblanked.
-
-         If unsure, say N.
-
-config LEDS_TRIGGER_CPU
-       bool "LED CPU Trigger"
-       depends on LEDS_TRIGGERS
-       help
-         This allows LEDs to be controlled by active CPUs. This shows
-         the active CPUs across an array of LEDs so you can see which
-         CPUs are active on the system at any given moment.
-
-         If unsure, say N.
-
-config LEDS_TRIGGER_GPIO
-       tristate "LED GPIO Trigger"
-       depends on LEDS_TRIGGERS
-       depends on GPIOLIB
-       help
-         This allows LEDs to be controlled by gpio events. It's good
-         when using gpios as switches and triggering the needed LEDs
-         from there. One use case is n810's keypad LEDs that could
-         be triggered by this trigger when user slides up to show
-         keypad.
-
-         If unsure, say N.
-
-config LEDS_TRIGGER_DEFAULT_ON
-       tristate "LED Default ON Trigger"
-       depends on LEDS_TRIGGERS
-       help
-         This allows LEDs to be initialised in the ON state.
-         If unsure, say Y.
-
-comment "iptables trigger is under Netfilter config (LED target)"
-       depends on LEDS_TRIGGERS
-
-config LEDS_TRIGGER_TRANSIENT
-       tristate "LED Transient Trigger"
-       depends on LEDS_TRIGGERS
-       help
-         This allows one time activation of a transient state on
-         GPIO/PWM based hardware.
-         If unsure, say Y.
+source "drivers/leds/trigger/Kconfig"
 
 endif # NEW_LEDS
index ab8f5c549ad3816113dc44008e49ba0f62cd0e96..ac2897732b0219c071f4e60ea1dea84047d9c78f 100644 (file)
@@ -58,12 +58,4 @@ obj-$(CONFIG_LEDS_BLINKM)            += leds-blinkm.o
 obj-$(CONFIG_LEDS_DAC124S085)          += leds-dac124s085.o
 
 # LED Triggers
-obj-$(CONFIG_LEDS_TRIGGER_TIMER)       += ledtrig-timer.o
-obj-$(CONFIG_LEDS_TRIGGER_ONESHOT)     += ledtrig-oneshot.o
-obj-$(CONFIG_LEDS_TRIGGER_IDE_DISK)    += ledtrig-ide-disk.o
-obj-$(CONFIG_LEDS_TRIGGER_HEARTBEAT)   += ledtrig-heartbeat.o
-obj-$(CONFIG_LEDS_TRIGGER_BACKLIGHT)   += ledtrig-backlight.o
-obj-$(CONFIG_LEDS_TRIGGER_GPIO)                += ledtrig-gpio.o
-obj-$(CONFIG_LEDS_TRIGGER_CPU)         += ledtrig-cpu.o
-obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON)  += ledtrig-default-on.o
-obj-$(CONFIG_LEDS_TRIGGER_TRANSIENT)   += ledtrig-transient.o
+obj-$(CONFIG_LEDS_TRIGGERS)            += trigger/
diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
new file mode 100644 (file)
index 0000000..eaa286d
--- /dev/null
@@ -0,0 +1,103 @@
+menuconfig LEDS_TRIGGERS
+       bool "LED Trigger support"
+       depends on LEDS_CLASS
+       help
+         This option enables trigger support for the leds class.
+         These triggers allow kernel events to drive the LEDs and can
+         be configured via sysfs. If unsure, say Y.
+
+if LEDS_TRIGGERS
+
+config LEDS_TRIGGER_TIMER
+       tristate "LED Timer Trigger"
+       depends on LEDS_TRIGGERS
+       help
+         This allows LEDs to be controlled by a programmable timer
+         via sysfs. Some LED hardware can be programmed to start
+         blinking the LED without any further software interaction.
+         For more details read Documentation/leds/leds-class.txt.
+
+         If unsure, say Y.
+
+config LEDS_TRIGGER_ONESHOT
+       tristate "LED One-shot Trigger"
+       depends on LEDS_TRIGGERS
+       help
+         This allows LEDs to blink in one-shot pulses with parameters
+         controlled via sysfs.  It's useful to notify the user on
+         sporadic events, when there are no clear begin and end trap points,
+         or on dense events, where this blinks the LED at constant rate if
+         rearmed continuously.
+
+         It also shows how to use the led_blink_set_oneshot() function.
+
+         If unsure, say Y.
+
+config LEDS_TRIGGER_IDE_DISK
+       bool "LED IDE Disk Trigger"
+       depends on IDE_GD_ATA
+       depends on LEDS_TRIGGERS
+       help
+         This allows LEDs to be controlled by IDE disk activity.
+         If unsure, say Y.
+
+config LEDS_TRIGGER_HEARTBEAT
+       tristate "LED Heartbeat Trigger"
+       depends on LEDS_TRIGGERS
+       help
+         This allows LEDs to be controlled by a CPU load average.
+         The flash frequency is a hyperbolic function of the 1-minute
+         load average.
+         If unsure, say Y.
+
+config LEDS_TRIGGER_BACKLIGHT
+       tristate "LED backlight Trigger"
+       depends on LEDS_TRIGGERS
+       help
+         This allows LEDs to be controlled as a backlight device: they
+         turn off and on when the display is blanked and unblanked.
+
+         If unsure, say N.
+
+config LEDS_TRIGGER_CPU
+       bool "LED CPU Trigger"
+       depends on LEDS_TRIGGERS
+       help
+         This allows LEDs to be controlled by active CPUs. This shows
+         the active CPUs across an array of LEDs so you can see which
+         CPUs are active on the system at any given moment.
+
+         If unsure, say N.
+
+config LEDS_TRIGGER_GPIO
+       tristate "LED GPIO Trigger"
+       depends on LEDS_TRIGGERS
+       depends on GPIOLIB
+       help
+         This allows LEDs to be controlled by gpio events. It's good
+         when using gpios as switches and triggering the needed LEDs
+         from there. One use case is n810's keypad LEDs that could
+         be triggered by this trigger when user slides up to show
+         keypad.
+
+         If unsure, say N.
+
+config LEDS_TRIGGER_DEFAULT_ON
+       tristate "LED Default ON Trigger"
+       depends on LEDS_TRIGGERS
+       help
+         This allows LEDs to be initialised in the ON state.
+         If unsure, say Y.
+
+comment "iptables trigger is under Netfilter config (LED target)"
+       depends on LEDS_TRIGGERS
+
+config LEDS_TRIGGER_TRANSIENT
+       tristate "LED Transient Trigger"
+       depends on LEDS_TRIGGERS
+       help
+         This allows one time activation of a transient state on
+         GPIO/PWM based hardware.
+         If unsure, say Y.
+
+endif # LEDS_TRIGGERS
diff --git a/drivers/leds/trigger/Makefile b/drivers/leds/trigger/Makefile
new file mode 100644 (file)
index 0000000..554e46e
--- /dev/null
@@ -0,0 +1,9 @@
+obj-$(CONFIG_LEDS_TRIGGER_TIMER)       += ledtrig-timer.o
+obj-$(CONFIG_LEDS_TRIGGER_ONESHOT)     += ledtrig-oneshot.o
+obj-$(CONFIG_LEDS_TRIGGER_IDE_DISK)    += ledtrig-ide-disk.o
+obj-$(CONFIG_LEDS_TRIGGER_HEARTBEAT)   += ledtrig-heartbeat.o
+obj-$(CONFIG_LEDS_TRIGGER_BACKLIGHT)   += ledtrig-backlight.o
+obj-$(CONFIG_LEDS_TRIGGER_GPIO)                += ledtrig-gpio.o
+obj-$(CONFIG_LEDS_TRIGGER_CPU)         += ledtrig-cpu.o
+obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON)  += ledtrig-default-on.o
+obj-$(CONFIG_LEDS_TRIGGER_TRANSIENT)   += ledtrig-transient.o
similarity index 99%
rename from drivers/leds/ledtrig-backlight.c
rename to drivers/leds/trigger/ledtrig-backlight.c
index 027a2b15d7d873d09b510209bdf95dcf72a45ddd..3c9c88a07eb8e45b42e78704940feb3ce4ff804c 100644 (file)
@@ -16,7 +16,7 @@
 #include <linux/init.h>
 #include <linux/fb.h>
 #include <linux/leds.h>
-#include "leds.h"
+#include "../leds.h"
 
 #define BLANK          1
 #define UNBLANK                0
similarity index 99%
rename from drivers/leds/ledtrig-cpu.c
rename to drivers/leds/trigger/ledtrig-cpu.c
index 4239b3955ff08f27edacbc4311bb09f93231bd69..118335eccc563d6944c4dd5a99409e744b5f6018 100644 (file)
@@ -26,7 +26,7 @@
 #include <linux/percpu.h>
 #include <linux/syscore_ops.h>
 #include <linux/rwsem.h>
-#include "leds.h"
+#include "../leds.h"
 
 #define MAX_NAME_LEN   8
 
similarity index 98%
rename from drivers/leds/ledtrig-default-on.c
rename to drivers/leds/trigger/ledtrig-default-on.c
index eac1f1b1adac97fb96e514be5d8d0e18d447ca2a..81a91be8e18dc884e293f5942eae02b4eb3346f9 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/leds.h>
-#include "leds.h"
+#include "../leds.h"
 
 static void defon_trig_activate(struct led_classdev *led_cdev)
 {
similarity index 99%
rename from drivers/leds/ledtrig-gpio.c
rename to drivers/leds/trigger/ledtrig-gpio.c
index 72e3ebfc281f2fb18b8223b6ae0936f378f40c7b..35812e3a37f24edfd4a7694e40c705b0ea6054f6 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/workqueue.h>
 #include <linux/leds.h>
 #include <linux/slab.h>
-#include "leds.h"
+#include "../leds.h"
 
 struct gpio_trig_data {
        struct led_classdev *led;
similarity index 99%
rename from drivers/leds/ledtrig-heartbeat.c
rename to drivers/leds/trigger/ledtrig-heartbeat.c
index 1edc7463ce8381141d1d23abc779e4c5af9aa19d..5c8464a3317236d891392e7fd522dad361533b1e 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/sched.h>
 #include <linux/leds.h>
 #include <linux/reboot.h>
-#include "leds.h"
+#include "../leds.h"
 
 static int panic_heartbeats;
 
similarity index 99%
rename from drivers/leds/ledtrig-oneshot.c
rename to drivers/leds/trigger/ledtrig-oneshot.c
index 2c029aa5c4f1eea89a7ba5a733401324f783ac92..cb4c7466692ae5700756ccc742826d21aee3b261 100644 (file)
@@ -18,7 +18,7 @@
 #include <linux/ctype.h>
 #include <linux/slab.h>
 #include <linux/leds.h>
-#include "leds.h"
+#include "../leds.h"
 
 #define DEFAULT_DELAY 100
 
similarity index 99%
rename from drivers/leds/ledtrig-timer.c
rename to drivers/leds/trigger/ledtrig-timer.c
index f774d05922042a69fd470b9ede566423a736c846..8d09327b5719382da9da6b0f844232c699dacca2 100644 (file)
@@ -17,7 +17,6 @@
 #include <linux/device.h>
 #include <linux/ctype.h>
 #include <linux/leds.h>
-#include "leds.h"
 
 static ssize_t led_delay_on_show(struct device *dev,
                struct device_attribute *attr, char *buf)
similarity index 99%
rename from drivers/leds/ledtrig-transient.c
rename to drivers/leds/trigger/ledtrig-transient.c
index 398f1042c43ef7193beb48c1e37ed4297906789b..e5abc00bb00cb981faba882761c3a46c714f3563 100644 (file)
@@ -25,7 +25,7 @@
 #include <linux/slab.h>
 #include <linux/timer.h>
 #include <linux/leds.h>
-#include "leds.h"
+#include "../leds.h"
 
 struct transient_trig_data {
        int activate;