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