aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-cobalt-qube.c
diff options
context:
space:
mode:
authorYoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>2007-09-20 19:02:47 -0400
committerRichard Purdie <rpurdie@rpsys.net>2007-10-11 17:24:00 -0400
commitf3b6b6cd00d294d50e1c3eee85964c69d898de45 (patch)
tree652719f55a8b382317dab0013bfe6bc63b34d465 /drivers/leds/leds-cobalt-qube.c
parentbbf25010f1a6b761914430f5fca081ec8c7accd1 (diff)
leds: Rename leds-cobalt driver
The leds-cobalt driver only supports the Coable Qube series (not included in Cobalt Raq series). Rename the driver and update Kconfig/Makefile. Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> Acked-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'drivers/leds/leds-cobalt-qube.c')
-rw-r--r--drivers/leds/leds-cobalt-qube.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/leds/leds-cobalt-qube.c b/drivers/leds/leds-cobalt-qube.c
new file mode 100644
index 000000000000..d16439ce5da7
--- /dev/null
+++ b/drivers/leds/leds-cobalt-qube.c
@@ -0,0 +1,43 @@
1/*
2 * Copyright 2006 - Florian Fainelli <florian@openwrt.org>
3 *
4 * Control the Cobalt Qube/RaQ front LED
5 */
6
7#include <linux/module.h>
8#include <linux/types.h>
9#include <linux/kernel.h>
10#include <linux/device.h>
11#include <linux/leds.h>
12#include <asm/mach-cobalt/cobalt.h>
13
14static void cobalt_led_set(struct led_classdev *led_cdev, enum led_brightness brightness)
15{
16 if (brightness)
17 COBALT_LED_PORT = COBALT_LED_BAR_LEFT | COBALT_LED_BAR_RIGHT;
18 else
19 COBALT_LED_PORT = 0;
20}
21
22static struct led_classdev cobalt_led = {
23 .name = "cobalt-front-led",
24 .brightness_set = cobalt_led_set,
25 .default_trigger = "ide-disk",
26};
27
28static int __init cobalt_led_init(void)
29{
30 return led_classdev_register(NULL, &cobalt_led);
31}
32
33static void __exit cobalt_led_exit(void)
34{
35 led_classdev_unregister(&cobalt_led);
36}
37
38module_init(cobalt_led_init);
39module_exit(cobalt_led_exit);
40
41MODULE_LICENSE("GPL");
42MODULE_DESCRIPTION("Front LED support for Cobalt Server");
43MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>");