aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-integrator/leds.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-10-22 10:05:44 +0200
committerLinus Walleij <linus.walleij@linaro.org>2014-11-13 10:32:04 +0100
commitbcc397de5af74ed31f35c0ca4cbd9faadb775c2e (patch)
tree4113f86508342a66fd18ee684c38365e9624072b /arch/arm/mach-integrator/leds.c
parentARM: integrator: move debug LEDs to syscon LED driver (diff)
downloadlinux-dev-bcc397de5af74ed31f35c0ca4cbd9faadb775c2e.tar.xz
linux-dev-bcc397de5af74ed31f35c0ca4cbd9faadb775c2e.zip
ARM: integrator: move core module LED to device tree
This gets rid of the custom LED driver in the Integrator directory altogether and switches us over to using the syscon LEDs for this. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-integrator/leds.c')
-rw-r--r--arch/arm/mach-integrator/leds.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/arch/arm/mach-integrator/leds.c b/arch/arm/mach-integrator/leds.c
deleted file mode 100644
index 56f243744b98..000000000000
--- a/arch/arm/mach-integrator/leds.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Driver for the 4 user LEDs found on the Integrator AP/CP baseboard
- * Based on Versatile and RealView machine LED code
- *
- * License terms: GNU General Public License (GPL) version 2
- * Author: Bryan Wu <bryan.wu@canonical.com>
- */
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/io.h>
-#include <linux/slab.h>
-#include <linux/leds.h>
-
-#include "hardware.h"
-#include "cm.h"
-
-#if defined(CONFIG_NEW_LEDS) && defined(CONFIG_LEDS_CLASS)
-
-struct integrator_led {
- struct led_classdev cdev;
-};
-
-/*
- * The triggers lines up below will only be used if the
- * LED triggers are compiled in.
- */
-static const struct {
- const char *name;
- const char *trigger;
-} integrator_leds[] = {
- { "integrator:core_module", "cpu0", },
-};
-
-static void cm_led_set(struct led_classdev *cdev,
- enum led_brightness b)
-{
- if (b != LED_OFF)
- cm_control(CM_CTRL_LED, CM_CTRL_LED);
- else
- cm_control(CM_CTRL_LED, 0);
-}
-
-static enum led_brightness cm_led_get(struct led_classdev *cdev)
-{
- u32 reg = cm_get();
-
- return (reg & CM_CTRL_LED) ? LED_FULL : LED_OFF;
-}
-
-static int __init integrator_leds_init(void)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(integrator_leds); i++) {
- struct integrator_led *led;
-
- led = kzalloc(sizeof(*led), GFP_KERNEL);
- if (!led)
- break;
-
- led->cdev.name = integrator_leds[i].name;
- led->cdev.brightness_set = cm_led_set;
- led->cdev.brightness_get = cm_led_get;
- led->cdev.default_trigger = integrator_leds[i].trigger;
-
- if (led_classdev_register(NULL, &led->cdev) < 0) {
- kfree(led);
- break;
- }
- }
-
- return 0;
-}
-
-/*
- * Since we may have triggers on any subsystem, defer registration
- * until after subsystem_init.
- */
-fs_initcall(integrator_leds_init);
-#endif