aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/nas100d-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/nas100d-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/nas100d-setup.c')
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-setup.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index dc782d06c2b1..5801579ae959 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -46,35 +46,34 @@ static struct i2c_board_info __initdata nas100d_i2c_board_info [] = {
46 }, 46 },
47}; 47};
48 48
49#ifdef CONFIG_LEDS_IXP4XX 49static struct gpio_led nas100d_led_pins[] = {
50static struct resource nas100d_led_resources[] = {
51 { 50 {
52 .name = "wlan", /* green led */ 51 .name = "wlan", /* green led */
53 .start = NAS100D_LED_WLAN_GPIO, 52 .gpio = NAS100D_LED_WLAN_GPIO,
54 .end = NAS100D_LED_WLAN_GPIO, 53 .active_low = true,
55 .flags = IXP4XX_GPIO_LOW,
56 }, 54 },
57 { 55 {
58 .name = "power", /* blue power led (off=flashing) */ 56 .name = "power", /* blue power led (off=flashing) */
59 .start = NAS100D_LED_PWR_GPIO, 57 .gpio = NAS100D_LED_PWR_GPIO,
60 .end = NAS100D_LED_PWR_GPIO, 58 .active_low = true,
61 .flags = IXP4XX_GPIO_LOW,
62 }, 59 },
63 { 60 {
64 .name = "disk", /* yellow led */ 61 .name = "disk", /* yellow led */
65 .start = NAS100D_LED_DISK_GPIO, 62 .gpio = NAS100D_LED_DISK_GPIO,
66 .end = NAS100D_LED_DISK_GPIO, 63 .active_low = true,
67 .flags = IXP4XX_GPIO_LOW,
68 }, 64 },
69}; 65};
70 66
67static struct gpio_led_platform_data nas100d_led_data = {
68 .num_leds = ARRAY_SIZE(nas100d_led_pins),
69 .leds = nas100d_led_pins,
70};
71
71static struct platform_device nas100d_leds = { 72static struct platform_device nas100d_leds = {
72 .name = "IXP4XX-GPIO-LED", 73 .name = "leds-gpio",
73 .id = -1, 74 .id = -1,
74 .num_resources = ARRAY_SIZE(nas100d_led_resources), 75 .dev.platform_data = &nas100d_led_data,
75 .resource = nas100d_led_resources,
76}; 76};
77#endif
78 77
79static struct i2c_gpio_platform_data nas100d_i2c_gpio_data = { 78static struct i2c_gpio_platform_data nas100d_i2c_gpio_data = {
80 .sda_pin = NAS100D_SDA_PIN, 79 .sda_pin = NAS100D_SDA_PIN,
@@ -135,9 +134,7 @@ static struct platform_device nas100d_uart = {
135static struct platform_device *nas100d_devices[] __initdata = { 134static struct platform_device *nas100d_devices[] __initdata = {
136 &nas100d_i2c_gpio, 135 &nas100d_i2c_gpio,
137 &nas100d_flash, 136 &nas100d_flash,
138#ifdef CONFIG_LEDS_IXP4XX
139 &nas100d_leds, 137 &nas100d_leds,
140#endif
141}; 138};
142 139
143static void nas100d_power_off(void) 140static void nas100d_power_off(void)