diff options
author | Rod Whitby <rod@whitby.id.au> | 2008-02-01 18:03:56 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-02-04 08:15:26 -0500 |
commit | 1208ebf25b654a48f075c191de1d6410af7062b0 (patch) | |
tree | fe258e89ed5427d5265ce416f0768cb2df333ae0 /arch/arm/mach-ixp4xx/nslu2-setup.c | |
parent | 78225913709915d02a0a8025a1efcb767c6bdfe0 (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/nslu2-setup.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/nslu2-setup.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index 16d091c98ea6..41d55c84164a 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c | |||
@@ -54,41 +54,37 @@ static struct i2c_board_info __initdata nslu2_i2c_board_info [] = { | |||
54 | }, | 54 | }, |
55 | }; | 55 | }; |
56 | 56 | ||
57 | #ifdef CONFIG_LEDS_IXP4XX | 57 | static struct gpio_led nslu2_led_pins[] = { |
58 | static struct resource nslu2_led_resources[] = { | ||
59 | { | 58 | { |
60 | .name = "ready", /* green led */ | 59 | .name = "ready", /* green led */ |
61 | .start = NSLU2_LED_GRN_GPIO, | 60 | .gpio = NSLU2_LED_GRN_GPIO, |
62 | .end = NSLU2_LED_GRN_GPIO, | ||
63 | .flags = IXP4XX_GPIO_HIGH, | ||
64 | }, | 61 | }, |
65 | { | 62 | { |
66 | .name = "status", /* red led */ | 63 | .name = "status", /* red led */ |
67 | .start = NSLU2_LED_RED_GPIO, | 64 | .gpio = NSLU2_LED_RED_GPIO, |
68 | .end = NSLU2_LED_RED_GPIO, | ||
69 | .flags = IXP4XX_GPIO_HIGH, | ||
70 | }, | 65 | }, |
71 | { | 66 | { |
72 | .name = "disk-1", | 67 | .name = "disk-1", |
73 | .start = NSLU2_LED_DISK1_GPIO, | 68 | .gpio = NSLU2_LED_DISK1_GPIO, |
74 | .end = NSLU2_LED_DISK1_GPIO, | 69 | .active_low = true, |
75 | .flags = IXP4XX_GPIO_LOW, | ||
76 | }, | 70 | }, |
77 | { | 71 | { |
78 | .name = "disk-2", | 72 | .name = "disk-2", |
79 | .start = NSLU2_LED_DISK2_GPIO, | 73 | .gpio = NSLU2_LED_DISK2_GPIO, |
80 | .end = NSLU2_LED_DISK2_GPIO, | 74 | .active_low = true, |
81 | .flags = IXP4XX_GPIO_LOW, | ||
82 | }, | 75 | }, |
83 | }; | 76 | }; |
84 | 77 | ||
78 | static struct gpio_led_platform_data nslu2_led_data = { | ||
79 | .num_leds = ARRAY_SIZE(nslu2_led_pins), | ||
80 | .leds = nslu2_led_pins, | ||
81 | }; | ||
82 | |||
85 | static struct platform_device nslu2_leds = { | 83 | static struct platform_device nslu2_leds = { |
86 | .name = "IXP4XX-GPIO-LED", | 84 | .name = "leds-gpio", |
87 | .id = -1, | 85 | .id = -1, |
88 | .num_resources = ARRAY_SIZE(nslu2_led_resources), | 86 | .dev.platform_data = &nslu2_led_data, |
89 | .resource = nslu2_led_resources, | ||
90 | }; | 87 | }; |
91 | #endif | ||
92 | 88 | ||
93 | static struct platform_device nslu2_i2c_gpio = { | 89 | static struct platform_device nslu2_i2c_gpio = { |
94 | .name = "i2c-gpio", | 90 | .name = "i2c-gpio", |
@@ -151,9 +147,7 @@ static struct platform_device *nslu2_devices[] __initdata = { | |||
151 | &nslu2_i2c_gpio, | 147 | &nslu2_i2c_gpio, |
152 | &nslu2_flash, | 148 | &nslu2_flash, |
153 | &nslu2_beeper, | 149 | &nslu2_beeper, |
154 | #ifdef CONFIG_LEDS_IXP4XX | ||
155 | &nslu2_leds, | 150 | &nslu2_leds, |
156 | #endif | ||
157 | }; | 151 | }; |
158 | 152 | ||
159 | static void nslu2_power_off(void) | 153 | static void nslu2_power_off(void) |