aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/dsmg600-setup.c
diff options
context:
space:
mode:
authorRod Whitby <rod@whitby.id.au>2008-02-01 18:03:56 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-02-04 08:15:26 -0500
commit1208ebf25b654a48f075c191de1d6410af7062b0 (patch)
treefe258e89ed5427d5265ce416f0768cb2df333ae0 /arch/arm/mach-ixp4xx/dsmg600-setup.c
parent78225913709915d02a0a8025a1efcb767c6bdfe0 (diff)
[ARM] 4805/1: ixp4xx: Use leds-gpio driver instead of IXP4XX-GPIO-LED driver
These are the only three boards to use the IXP4XX-GPIO-LED driver, and they can all use the new leds-gpio driver instead with no change in functionality. -- Signed-off-by: Rod Whitby <rod@whitby.id.au> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ixp4xx/dsmg600-setup.c')
-rw-r--r--arch/arm/mach-ixp4xx/dsmg600-setup.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
index a1c44efc45f6..d0e129566fbc 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
@@ -14,6 +14,7 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <linux/serial.h> 15#include <linux/serial.h>
16#include <linux/serial_8250.h> 16#include <linux/serial_8250.h>
17#include <linux/leds.h>
17#include <linux/i2c.h> 18#include <linux/i2c.h>
18#include <linux/i2c-gpio.h> 19#include <linux/i2c-gpio.h>
19 20
@@ -58,29 +59,28 @@ static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = {
58 }, 59 },
59}; 60};
60 61
61#ifdef CONFIG_LEDS_CLASS 62static struct gpio_led dsmg600_led_pins[] = {
62static struct resource dsmg600_led_resources[] = {
63 { 63 {
64 .name = "power", 64 .name = "power",
65 .start = DSMG600_LED_PWR_GPIO, 65 .gpio = DSMG600_LED_PWR_GPIO,
66 .end = DSMG600_LED_PWR_GPIO,
67 .flags = IXP4XX_GPIO_HIGH,
68 }, 66 },
69 { 67 {
70 .name = "wlan", 68 .name = "wlan",
71 .start = DSMG600_LED_WLAN_GPIO, 69 .gpio = DSMG600_LED_WLAN_GPIO,
72 .end = DSMG600_LED_WLAN_GPIO, 70 .active_low = true,
73 .flags = IXP4XX_GPIO_LOW,
74 }, 71 },
75}; 72};
76 73
74static struct gpio_led_platform_data dsmg600_led_data = {
75 .num_leds = ARRAY_SIZE(dsmg600_led_pins),
76 .leds = dsmg600_led_pins,
77};
78
77static struct platform_device dsmg600_leds = { 79static struct platform_device dsmg600_leds = {
78 .name = "IXP4XX-GPIO-LED", 80 .name = "leds-gpio",
79 .id = -1, 81 .id = -1,
80 .num_resources = ARRAY_SIZE(dsmg600_led_resources), 82 .dev.platform_data = &dsmg600_led_data,
81 .resource = dsmg600_led_resources,
82}; 83};
83#endif
84 84
85static struct resource dsmg600_uart_resources[] = { 85static struct resource dsmg600_uart_resources[] = {
86 { 86 {
@@ -128,6 +128,7 @@ static struct platform_device dsmg600_uart = {
128static struct platform_device *dsmg600_devices[] __initdata = { 128static struct platform_device *dsmg600_devices[] __initdata = {
129 &dsmg600_i2c_gpio, 129 &dsmg600_i2c_gpio,
130 &dsmg600_flash, 130 &dsmg600_flash,
131 &dsmg600_leds,
131}; 132};
132 133
133static void dsmg600_power_off(void) 134static void dsmg600_power_off(void)
@@ -175,11 +176,6 @@ static void __init dsmg600_init(void)
175 (void)platform_device_register(&dsmg600_uart); 176 (void)platform_device_register(&dsmg600_uart);
176 177
177 platform_add_devices(dsmg600_devices, ARRAY_SIZE(dsmg600_devices)); 178 platform_add_devices(dsmg600_devices, ARRAY_SIZE(dsmg600_devices));
178
179#ifdef CONFIG_LEDS_CLASS
180 /* We don't care whether or not this works. */
181 (void)platform_device_register(&dsmg600_leds);
182#endif
183} 179}
184 180
185MACHINE_START(DSMG600, "D-Link DSM-G600 RevA") 181MACHINE_START(DSMG600, "D-Link DSM-G600 RevA")