diff options
author | Eric Miao <eric.miao@marvell.com> | 2008-09-05 06:36:21 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-09-23 17:04:39 -0400 |
commit | 60cf711d47d995c3d61e222502fde3c11cedc434 (patch) | |
tree | 1f8daaaa055454691e123a091ac668590dfc0365 /drivers/leds | |
parent | 6168cda927ecdf3347537e0d01618ca2a2272007 (diff) |
[ARM] pxa/corgi: use leds-gpio for led driving and drop leds-corgi
Now as the scoop pins are covered by the generic gpio API,
we can use leds-gpio driver instead of special leds-corgi
Drop leds-corgi.c and remove the declaration of now un-referenced
corgiscoop_device.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/Kconfig | 7 | ||||
-rw-r--r-- | drivers/leds/Makefile | 1 | ||||
-rw-r--r-- | drivers/leds/leds-corgi.c | 124 |
3 files changed, 0 insertions, 132 deletions
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index 9556262dda5a..27c60daa73fe 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 | ||
27 | config 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 | |||
34 | config LEDS_LOCOMO | 27 | config 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 |
diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile index ff7982b44565..556f8d2e7bba 100644 --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile | |||
@@ -6,7 +6,6 @@ obj-$(CONFIG_LEDS_TRIGGERS) += led-triggers.o | |||
6 | 6 | ||
7 | # LED Platform Drivers | 7 | # LED Platform Drivers |
8 | obj-$(CONFIG_LEDS_ATMEL_PWM) += leds-atmel-pwm.o | 8 | obj-$(CONFIG_LEDS_ATMEL_PWM) += leds-atmel-pwm.o |
9 | obj-$(CONFIG_LEDS_CORGI) += leds-corgi.o | ||
10 | obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o | 9 | obj-$(CONFIG_LEDS_LOCOMO) += leds-locomo.o |
11 | obj-$(CONFIG_LEDS_SPITZ) += leds-spitz.o | 10 | obj-$(CONFIG_LEDS_SPITZ) += leds-spitz.o |
12 | obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o | 11 | obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.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 | |||
23 | static 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 | |||
32 | static 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 | |||
41 | static struct led_classdev corgi_amber_led = { | ||
42 | .name = "corgi:amber:charge", | ||
43 | .default_trigger = "sharpsl-charge", | ||
44 | .brightness_set = corgiled_amber_set, | ||
45 | }; | ||
46 | |||
47 | static 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 | ||
54 | static 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 | |||
65 | static 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 | |||
73 | static 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 | |||
88 | static 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 | |||
95 | static 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 | |||
108 | static int __init corgiled_init(void) | ||
109 | { | ||
110 | return platform_driver_register(&corgiled_driver); | ||
111 | } | ||
112 | |||
113 | static void __exit corgiled_exit(void) | ||
114 | { | ||
115 | platform_driver_unregister(&corgiled_driver); | ||
116 | } | ||
117 | |||
118 | module_init(corgiled_init); | ||
119 | module_exit(corgiled_exit); | ||
120 | |||
121 | MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>"); | ||
122 | MODULE_DESCRIPTION("Corgi LED driver"); | ||
123 | MODULE_LICENSE("GPL"); | ||
124 | MODULE_ALIAS("platform:corgi-led"); | ||