6dfc51b652692e67aa970bc7c9bc92a8460263a0
[openwrt.git] / target / linux / ixp4xx / patches-2.6.25 / 302-avila_gpio_device.patch
1 Index: linux-2.6.25.4/arch/arm/mach-ixp4xx/avila-setup.c
2 ===================================================================
3 --- linux-2.6.25.4.orig/arch/arm/mach-ixp4xx/avila-setup.c
4 +++ linux-2.6.25.4/arch/arm/mach-ixp4xx/avila-setup.c
5 @@ -239,10 +239,28 @@ static struct platform_device avila_latc
6 .dev.platform_data = &avila_latch_leds_data,
7 };
8
9 +static struct resource avila_gpio_resources[] = {
10 + {
11 + .name = "gpio",
12 + /* FIXME: gpio mask should be model specific */
13 + .start = AVILA_GPIO_MASK,
14 + .end = AVILA_GPIO_MASK,
15 + .flags = 0,
16 + },
17 +};
18 +
19 +static struct platform_device avila_gpio = {
20 + .name = "GPIODEV",
21 + .id = -1,
22 + .num_resources = ARRAY_SIZE(avila_gpio_resources),
23 + .resource = avila_gpio_resources,
24 +};
25 +
26 static struct platform_device *avila_devices[] __initdata = {
27 &avila_i2c_gpio,
28 &avila_flash,
29 - &avila_uart
30 + &avila_uart,
31 + &avila_gpio,
32 };
33
34 static void __init avila_gw23xx_setup(void)
35 Index: linux-2.6.25.4/include/asm-arm/arch-ixp4xx/avila.h
36 ===================================================================
37 --- linux-2.6.25.4.orig/include/asm-arm/arch-ixp4xx/avila.h
38 +++ linux-2.6.25.4/include/asm-arm/arch-ixp4xx/avila.h
39 @@ -39,3 +39,6 @@
40 /* User LEDs */
41 #define AVILA_GW23XX_LED_USER_GPIO 3
42 #define AVILA_GW23X7_LED_USER_GPIO 4
43 +
44 +/* gpio mask used by platform device */
45 +#define AVILA_GPIO_MASK (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9)
This page took 0.040809 seconds and 3 git commands to generate.