aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-11 13:09:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-11 13:09:45 -0400
commit7cc4e87f912bbefa440a51856b8d076e5d1f554a (patch)
tree1b8df8683f3de37d2e8211ffa8d151f60d59af62 /drivers/leds
parent5ba2f67afb02c5302b2898949ed6fc3b3d37dcf1 (diff)
parent69fc7eed5f56bce15b239e5110de2575a6970df4 (diff)
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (236 commits) [ARM] 5300/1: fixup spitz reset during boot [ARM] 5295/1: make ZONE_DMA optional [ARM] 5239/1: Palm Zire 72 power management support [ARM] 5298/1: Drop desc_handle_irq() [ARM] 5297/1: [KS8695] Fix two compile-time warnings [ARM] 5296/1: [KS8695] Replace macro's with trailing underscores. [ARM] pxa: allow multi-machine PCMCIA builds [ARM] pxa: add preliminary CPUFREQ support for PXA3xx [ARM] pxa: add missing ACCR bit definitions to pxa3xx-regs.h [ARM] pxa: rename cpu-pxa.c to cpufreq-pxa2xx.c [ARM] pxa/zylonite: add support for USB OHCI [ARM] ohci-pxa27x: use ioremap() and offset for register access [ARM] ohci-pxa27x: introduce pxa27x_clear_otgph() [ARM] ohci-pxa27x: use platform_get_{irq,resource} for the resource [ARM] ohci-pxa27x: move OHCI controller specific registers into the driver [ARM] ohci-pxa27x: introduce flags to avoid direct access to OHCI registers [ARM] pxa: move I2S register and bit definitions into pxa2xx-i2s.c [ARM] pxa: simplify DMA register definitions [ARM] pxa: make additional DCSR bits valid for PXA3xx [ARM] pxa: move i2c register and bit definitions into i2c-pxa.c ... Fixed up conflicts in arch/arm/mach-versatile/core.c sound/soc/pxa/pxa2xx-ac97.c sound/soc/pxa/pxa2xx-i2s.c manually.
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/Kconfig14
-rw-r--r--drivers/leds/Makefile2
-rw-r--r--drivers/leds/leds-corgi.c124
-rw-r--r--drivers/leds/leds-spitz.c131
4 files changed, 0 insertions, 271 deletions
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index 9556262dda5a..5b14262af017 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -24,13 +24,6 @@ config LEDS_ATMEL_PWM
24 This option enables support for LEDs driven using outputs 24 This option enables support for LEDs driven using outputs
25 of the dedicated PWM controller found on newer Atmel SOCs. 25 of the dedicated PWM controller found on newer Atmel SOCs.
26 26
27config LEDS_CORGI
28 tristate "LED Support for the Sharp SL-C7x0 series"
29 depends on LEDS_CLASS && PXA_SHARP_C7xx
30 help
31 This option enables support for the LEDs on Sharp Zaurus
32 SL-C7x0 series (C700, C750, C760, C860).
33
34config LEDS_LOCOMO 27config LEDS_LOCOMO
35 tristate "LED Support for Locomo device" 28 tristate "LED Support for Locomo device"
36 depends on LEDS_CLASS && SHARP_LOCOMO 29 depends on LEDS_CLASS && SHARP_LOCOMO
@@ -38,13 +31,6 @@ config LEDS_LOCOMO
38 This option enables support for the LEDs on Sharp Locomo. 31 This option enables support for the LEDs on Sharp Locomo.
39 Zaurus models SL-5500 and SL-5600. 32 Zaurus models SL-5500 and SL-5600.
40 33
41config LEDS_SPITZ
42 tristate "LED Support for the Sharp SL-Cxx00 series"
43 depends on LEDS_CLASS && PXA_SHARP_Cxx00
44 help
45 This option enables support for the LEDs on Sharp Zaurus
46 SL-Cxx00 series (C1000, C3000, C3100).
47
48config LEDS_S3C24XX 34config LEDS_S3C24XX
49 tristate "LED Support for Samsung S3C24XX GPIO LEDs" 35 tristate "LED Support for Samsung S3C24XX GPIO LEDs"
50 depends on LEDS_CLASS && ARCH_S3C2410 36 depends on LEDS_CLASS && ARCH_S3C2410
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
index ff7982b44565..3a8e6a04363c 100644
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -6,9 +6,7 @@ obj-$(CONFIG_LEDS_TRIGGERS) += led-triggers.o
6 6
7# LED Platform Drivers 7# LED Platform Drivers
8obj-$(CONFIG_LEDS_ATMEL_PWM) += leds-atmel-pwm.o 8obj-$(CONFIG_LEDS_ATMEL_PWM) += leds-atmel-pwm.o
9obj-$(CONFIG_LEDS_CORGI) += leds-corgi.o
10obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o 9obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o
11obj-$(CONFIG_LEDS_SPITZ) += leds-spitz.o
12obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o 10obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o
13obj-$(CONFIG_LEDS_AMS_DELTA) += leds-ams-delta.o 11obj-$(CONFIG_LEDS_AMS_DELTA) += leds-ams-delta.o
14obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o 12obj-$(CONFIG_LEDS_NET48XX) += leds-net48xx.o
diff --git a/drivers/leds/leds-corgi.c b/drivers/leds/leds-corgi.c
deleted file mode 100644
index bc2dcd89f635..000000000000
--- a/drivers/leds/leds-corgi.c
+++ /dev/null
@@ -1,124 +0,0 @@
1/*
2 * LED Triggers Core
3 *
4 * Copyright 2005-2006 Openedhand Ltd.
5 *
6 * Author: Richard Purdie <rpurdie@openedhand.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/platform_device.h>
17#include <linux/leds.h>
18#include <mach/corgi.h>
19#include <mach/hardware.h>
20#include <mach/pxa-regs.h>
21#include <asm/hardware/scoop.h>
22
23static void corgiled_amber_set(struct led_classdev *led_cdev,
24 enum led_brightness value)
25{
26 if (value)
27 GPSR0 = GPIO_bit(CORGI_GPIO_LED_ORANGE);
28 else
29 GPCR0 = GPIO_bit(CORGI_GPIO_LED_ORANGE);
30}
31
32static void corgiled_green_set(struct led_classdev *led_cdev,
33 enum led_brightness value)
34{
35 if (value)
36 set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
37 else
38 reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_LED_GREEN);
39}
40
41static struct led_classdev corgi_amber_led = {
42 .name = "corgi:amber:charge",
43 .default_trigger = "sharpsl-charge",
44 .brightness_set = corgiled_amber_set,
45};
46
47static struct led_classdev corgi_green_led = {
48 .name = "corgi:green:mail",
49 .default_trigger = "nand-disk",
50 .brightness_set = corgiled_green_set,
51};
52
53#ifdef CONFIG_PM
54static int corgiled_suspend(struct platform_device *dev, pm_message_t state)
55{
56#ifdef CONFIG_LEDS_TRIGGERS
57 if (corgi_amber_led.trigger &&
58 strcmp(corgi_amber_led.trigger->name, "sharpsl-charge"))
59#endif
60 led_classdev_suspend(&corgi_amber_led);
61 led_classdev_suspend(&corgi_green_led);
62 return 0;
63}
64
65static int corgiled_resume(struct platform_device *dev)
66{
67 led_classdev_resume(&corgi_amber_led);
68 led_classdev_resume(&corgi_green_led);
69 return 0;
70}
71#endif
72
73static int corgiled_probe(struct platform_device *pdev)
74{
75 int ret;
76
77 ret = led_classdev_register(&pdev->dev, &corgi_amber_led);
78 if (ret < 0)
79 return ret;
80
81 ret = led_classdev_register(&pdev->dev, &corgi_green_led);
82 if (ret < 0)
83 led_classdev_unregister(&corgi_amber_led);
84
85 return ret;
86}
87
88static int corgiled_remove(struct platform_device *pdev)
89{
90 led_classdev_unregister(&corgi_amber_led);
91 led_classdev_unregister(&corgi_green_led);
92 return 0;
93}
94
95static struct platform_driver corgiled_driver = {
96 .probe = corgiled_probe,
97 .remove = corgiled_remove,
98#ifdef CONFIG_PM
99 .suspend = corgiled_suspend,
100 .resume = corgiled_resume,
101#endif
102 .driver = {
103 .name = "corgi-led",
104 .owner = THIS_MODULE,
105 },
106};
107
108static int __init corgiled_init(void)
109{
110 return platform_driver_register(&corgiled_driver);
111}
112
113static void __exit corgiled_exit(void)
114{
115 platform_driver_unregister(&corgiled_driver);
116}
117
118module_init(corgiled_init);
119module_exit(corgiled_exit);
120
121MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>");
122MODULE_DESCRIPTION("Corgi LED driver");
123MODULE_LICENSE("GPL");
124MODULE_ALIAS("platform:corgi-led");
diff --git a/drivers/leds/leds-spitz.c b/drivers/leds/leds-spitz.c
deleted file mode 100644
index 178831c64bfb..000000000000
--- a/drivers/leds/leds-spitz.c
+++ /dev/null
@@ -1,131 +0,0 @@
1/*
2 * LED Triggers Core
3 *
4 * Copyright 2005-2006 Openedhand Ltd.
5 *
6 * Author: Richard Purdie <rpurdie@openedhand.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/platform_device.h>
17#include <linux/leds.h>
18#include <asm/hardware/scoop.h>
19#include <asm/mach-types.h>
20#include <mach/hardware.h>
21#include <mach/pxa-regs.h>
22#include <mach/spitz.h>
23
24static void spitzled_amber_set(struct led_classdev *led_cdev,
25 enum led_brightness value)
26{
27 if (value)
28 set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_ORANGE);
29 else
30 reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_ORANGE);
31}
32
33static void spitzled_green_set(struct led_classdev *led_cdev,
34 enum led_brightness value)
35{
36 if (value)
37 set_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_GREEN);
38 else
39 reset_scoop_gpio(&spitzscoop_device.dev, SPITZ_SCP_LED_GREEN);
40}
41
42static struct led_classdev spitz_amber_led = {
43 .name = "spitz:amber:charge",
44 .default_trigger = "sharpsl-charge",
45 .brightness_set = spitzled_amber_set,
46};
47
48static struct led_classdev spitz_green_led = {
49 .name = "spitz:green:hddactivity",
50 .default_trigger = "ide-disk",
51 .brightness_set = spitzled_green_set,
52};
53
54#ifdef CONFIG_PM
55static int spitzled_suspend(struct platform_device *dev, pm_message_t state)
56{
57#ifdef CONFIG_LEDS_TRIGGERS
58 if (spitz_amber_led.trigger &&
59 strcmp(spitz_amber_led.trigger->name, "sharpsl-charge"))
60#endif
61 led_classdev_suspend(&spitz_amber_led);
62 led_classdev_suspend(&spitz_green_led);
63 return 0;
64}
65
66static int spitzled_resume(struct platform_device *dev)
67{
68 led_classdev_resume(&spitz_amber_led);
69 led_classdev_resume(&spitz_green_led);
70 return 0;
71}
72#endif
73
74static int spitzled_probe(struct platform_device *pdev)
75{
76 int ret;
77
78 if (machine_is_akita()) {
79 spitz_green_led.name = "spitz:green:mail";
80 spitz_green_led.default_trigger = "nand-disk";
81 }
82
83 ret = led_classdev_register(&pdev->dev, &spitz_amber_led);
84 if (ret < 0)
85 return ret;
86
87 ret = led_classdev_register(&pdev->dev, &spitz_green_led);
88 if (ret < 0)
89 led_classdev_unregister(&spitz_amber_led);
90
91 return ret;
92}
93
94static int spitzled_remove(struct platform_device *pdev)
95{
96 led_classdev_unregister(&spitz_amber_led);
97 led_classdev_unregister(&spitz_green_led);
98
99 return 0;
100}
101
102static struct platform_driver spitzled_driver = {
103 .probe = spitzled_probe,
104 .remove = spitzled_remove,
105#ifdef CONFIG_PM
106 .suspend = spitzled_suspend,
107 .resume = spitzled_resume,
108#endif
109 .driver = {
110 .name = "spitz-led",
111 .owner = THIS_MODULE,
112 },
113};
114
115static int __init spitzled_init(void)
116{
117 return platform_driver_register(&spitzled_driver);
118}
119
120static void __exit spitzled_exit(void)
121{
122 platform_driver_unregister(&spitzled_driver);
123}
124
125module_init(spitzled_init);
126module_exit(spitzled_exit);
127
128MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>");
129MODULE_DESCRIPTION("Spitz LED driver");
130MODULE_LICENSE("GPL");
131MODULE_ALIAS("platform:spitz-led");