1 Index: linux-2.6.24.7/include/asm-arm/arch-ixp4xx/avila.h
2 ===================================================================
3 --- linux-2.6.24.7.orig/include/asm-arm/arch-ixp4xx/avila.h
4 +++ linux-2.6.24.7/include/asm-arm/arch-ixp4xx/avila.h
6 #define AVILA_PCI_INTC_PIN 9
7 #define AVILA_PCI_INTD_PIN 8
11 +#define AVILA_GW23XX_LED_USER_GPIO 3
12 +#define AVILA_GW23X7_LED_USER_GPIO 4
13 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/avila-setup.c
14 ===================================================================
15 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/avila-setup.c
16 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/avila-setup.c
18 # include <linux/eeprom.h>
21 +#include <linux/leds.h>
22 #include <linux/i2c-gpio.h>
24 #include <asm/types.h>
25 @@ -172,6 +173,25 @@ static struct platform_device avila_npec
26 .dev.platform_data = &avila_npec_data,
29 +static struct gpio_led avila_leds[] = {
31 + .name = "user", /* green led */
32 + .gpio = AVILA_GW23XX_LED_USER_GPIO,
37 +static struct gpio_led_platform_data avila_leds_data = {
42 +static struct platform_device avila_leds_device = {
43 + .name = "leds-gpio",
45 + .dev.platform_data = &avila_leds_data,
48 static struct platform_device *avila_devices[] __initdata = {
51 @@ -182,6 +202,8 @@ static void __init avila_gw23xx_setup(vo
53 platform_device_register(&avila_npeb_device);
54 platform_device_register(&avila_npec_device);
56 + platform_device_register(&avila_leds_device);
59 #ifdef CONFIG_SENSORS_EEPROM
60 @@ -189,6 +211,8 @@ static void __init avila_gw2342_setup(vo
62 platform_device_register(&avila_npeb_device);
63 platform_device_register(&avila_npec_device);
65 + platform_device_register(&avila_leds_device);
68 static void __init avila_gw2345_setup(void)
69 @@ -199,22 +223,30 @@ static void __init avila_gw2345_setup(vo
71 avila_npec_data.phy = 5; /* port 5 of the KS8995 switch */
72 platform_device_register(&avila_npec_device);
74 + platform_device_register(&avila_leds_device);
77 static void __init avila_gw2347_setup(void)
79 platform_device_register(&avila_npeb_device);
81 + avila_leds[0].gpio = AVILA_GW23X7_LED_USER_GPIO;
82 + platform_device_register(&avila_leds_device);
85 static void __init avila_gw2348_setup(void)
87 platform_device_register(&avila_npeb_device);
88 platform_device_register(&avila_npec_device);
90 + platform_device_register(&avila_leds_device);
93 static void __init avila_gw2353_setup(void)
95 platform_device_register(&avila_npeb_device);
96 + platform_device_register(&avila_leds_device);
99 static void __init avila_gw2355_setup(void)
100 @@ -225,11 +257,16 @@ static void __init avila_gw2355_setup(vo
102 avila_npec_data.phy = 16;
103 platform_device_register(&avila_npec_device);
105 + platform_device_register(&avila_leds_device);
108 static void __init avila_gw2357_setup(void)
110 platform_device_register(&avila_npeb_device);
112 + avila_leds[0].gpio = AVILA_GW23X7_LED_USER_GPIO;
113 + platform_device_register(&avila_leds_device);
116 static struct avila_board_info avila_boards[] __initdata = {