Prior to kernel 2.6.23, architecture path was i386, allow that when switching kernel...
[openwrt.git] / target / linux / ixp4xx / patches-2.6.23 / 302-gpio_device.patch
1 Index: linux-2.6.23.17/arch/arm/mach-ixp4xx/avila-setup.c
2 ===================================================================
3 --- linux-2.6.23.17.orig/arch/arm/mach-ixp4xx/avila-setup.c
4 +++ linux-2.6.23.17/arch/arm/mach-ixp4xx/avila-setup.c
5 @@ -183,6 +183,23 @@ static struct platform_device avila_leds
6 };
7 #endif
8
9 +#ifdef CONFIG_GPIO_DEVICE
10 +static struct resource avila_gpio_resources[] = {
11 + {
12 + .name = "gpio",
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 +#endif
26
27 static struct platform_device *avila_devices[] __initdata = {
28 &avila_i2c_gpio,
29 @@ -193,6 +210,9 @@ static struct platform_device *avila_dev
30 #ifdef CONFIG_LEDS_IXP4XX
31 &avila_leds,
32 #endif
33 +#ifdef CONFIG_GPIO_DEVICE
34 + &avila_gpio,
35 +#endif
36 };
37
38 static char avila_rtc_probe[] __initdata = "rtc-ds1672.probe=0,0x68 ";
39 Index: linux-2.6.23.17/include/asm-arm/arch-ixp4xx/avila.h
40 ===================================================================
41 --- linux-2.6.23.17.orig/include/asm-arm/arch-ixp4xx/avila.h
42 +++ linux-2.6.23.17/include/asm-arm/arch-ixp4xx/avila.h
43 @@ -38,3 +38,6 @@
44
45 /* User LED */
46 #define AVILA_LED_USER_GPIO 3
47 +
48 +/* gpio mask used by platform device */
49 +#define AVILA_GPIO_MASK (1 << 1) | (1 << 3) | (1 << 5) | (1 << 7) | (1 << 9)
This page took 0.041586 seconds and 5 git commands to generate.