diff options
author | Rod Whitby <rod@whitby.id.au> | 2008-02-02 00:03:56 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-02-04 14:15:26 +0100 |
commit | 1208ebf25b654a48f075c191de1d6410af7062b0 (patch) | |
tree | fe258e89ed5427d5265ce416f0768cb2df333ae0 /arch/arm/mach-ixp4xx/nas100d-setup.c | |
parent | [ARM] 4715/2: Ethernet support for IXDP425 boards (diff) | |
download | linux-1208ebf25b654a48f075c191de1d6410af7062b0.tar.xz linux-1208ebf25b654a48f075c191de1d6410af7062b0.zip |
[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.c | 31 |
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 [] = { }, }; -#ifdef CONFIG_LEDS_IXP4XX -static struct resource nas100d_led_resources[] = { +static struct gpio_led nas100d_led_pins[] = { { .name = "wlan", /* green led */ - .start = NAS100D_LED_WLAN_GPIO, - .end = NAS100D_LED_WLAN_GPIO, - .flags = IXP4XX_GPIO_LOW, + .gpio = NAS100D_LED_WLAN_GPIO, + .active_low = true, }, { .name = "power", /* blue power led (off=flashing) */ - .start = NAS100D_LED_PWR_GPIO, - .end = NAS100D_LED_PWR_GPIO, - .flags = IXP4XX_GPIO_LOW, + .gpio = NAS100D_LED_PWR_GPIO, + .active_low = true, }, { .name = "disk", /* yellow led */ - .start = NAS100D_LED_DISK_GPIO, - .end = NAS100D_LED_DISK_GPIO, - .flags = IXP4XX_GPIO_LOW, + .gpio = NAS100D_LED_DISK_GPIO, + .active_low = true, }, }; +static struct gpio_led_platform_data nas100d_led_data = { + .num_leds = ARRAY_SIZE(nas100d_led_pins), + .leds = nas100d_led_pins, +}; + static struct platform_device nas100d_leds = { - .name = "IXP4XX-GPIO-LED", + .name = "leds-gpio", .id = -1, - .num_resources = ARRAY_SIZE(nas100d_led_resources), - .resource = nas100d_led_resources, + .dev.platform_data = &nas100d_led_data, }; -#endif static struct i2c_gpio_platform_data nas100d_i2c_gpio_data = { .sda_pin = NAS100D_SDA_PIN, @@ -135,9 +134,7 @@ static struct platform_device nas100d_uart = { static struct platform_device *nas100d_devices[] __initdata = { &nas100d_i2c_gpio, &nas100d_flash, -#ifdef CONFIG_LEDS_IXP4XX &nas100d_leds, -#endif }; static void nas100d_power_off(void) |