[kernel] 2.6.26: fix gpio_dev compile error
[openwrt.git] / target / linux / ixp4xx / patches-2.6.24 / 020-ixp4xx_rtc_info.patch
1 From 88721db37ead2212a54c1392e2e65bae78d2604b Mon Sep 17 00:00:00 2001
2 From: Rod Whitby <rod@whitby.id.au>
3 Date: Tue, 29 Jan 2008 10:05:48 +1030
4 Subject: ixp4xx: Register nslu2 rtc i2c_board_info (Patch #4772)
5
6 Register the i2c board info related to the RTC chip on the nslu2 board
7 to allow it to be found automatically on boot.
8
9 Signed-off-by: Rod Whitby <rod@whitby.id.au>
10 Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
11
12 PATCH FOLLOWS
13 KernelVersion: 2.6.24-git5
14
15 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/nslu2-setup.c
16 ===================================================================
17 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/nslu2-setup.c
18 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/nslu2-setup.c
19 @@ -18,6 +18,7 @@
20 #include <linux/serial.h>
21 #include <linux/serial_8250.h>
22 #include <linux/leds.h>
23 +#include <linux/i2c.h>
24 #include <linux/i2c-gpio.h>
25
26 #include <asm/mach-types.h>
27 @@ -47,6 +48,12 @@ static struct i2c_gpio_platform_data nsl
28 .scl_pin = NSLU2_SCL_PIN,
29 };
30
31 +static struct i2c_board_info __initdata nslu2_i2c_board_info [] = {
32 + {
33 + I2C_BOARD_INFO("rtc-x1205", 0x6f),
34 + },
35 +};
36 +
37 #ifdef CONFIG_LEDS_IXP4XX
38 static struct resource nslu2_led_resources[] = {
39 {
40 @@ -183,6 +190,9 @@ static void __init nslu2_init(void)
41
42 pm_power_off = nslu2_power_off;
43
44 + i2c_register_board_info(0, nslu2_i2c_board_info,
45 + ARRAY_SIZE(nslu2_i2c_board_info));
46 +
47 /*
48 * This is only useful on a modified machine, but it is valuable
49 * to have it first in order to see debug messages, and so that
50 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/nas100d-setup.c
51 ===================================================================
52 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/nas100d-setup.c
53 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/nas100d-setup.c
54 @@ -16,6 +16,7 @@
55 #include <linux/serial.h>
56 #include <linux/serial_8250.h>
57 #include <linux/leds.h>
58 +#include <linux/i2c.h>
59 #include <linux/i2c-gpio.h>
60
61 #include <asm/mach-types.h>
62 @@ -39,6 +40,12 @@ static struct platform_device nas100d_fl
63 .resource = &nas100d_flash_resource,
64 };
65
66 +static struct i2c_board_info __initdata nas100d_i2c_board_info [] = {
67 + {
68 + I2C_BOARD_INFO("rtc-pcf8563", 0x51),
69 + },
70 +};
71 +
72 #ifdef CONFIG_LEDS_IXP4XX
73 static struct resource nas100d_led_resources[] = {
74 {
75 @@ -157,6 +164,9 @@ static void __init nas100d_init(void)
76
77 pm_power_off = nas100d_power_off;
78
79 + i2c_register_board_info(0, nas100d_i2c_board_info,
80 + ARRAY_SIZE(nas100d_i2c_board_info));
81 +
82 /*
83 * This is only useful on a modified machine, but it is valuable
84 * to have it first in order to see debug messages, and so that
85 Index: linux-2.6.24.7/arch/arm/mach-ixp4xx/dsmg600-setup.c
86 ===================================================================
87 --- linux-2.6.24.7.orig/arch/arm/mach-ixp4xx/dsmg600-setup.c
88 +++ linux-2.6.24.7/arch/arm/mach-ixp4xx/dsmg600-setup.c
89 @@ -14,6 +14,7 @@
90 #include <linux/kernel.h>
91 #include <linux/serial.h>
92 #include <linux/serial_8250.h>
93 +#include <linux/i2c.h>
94 #include <linux/i2c-gpio.h>
95
96 #include <asm/mach-types.h>
97 @@ -51,6 +52,12 @@ static struct platform_device dsmg600_i2
98 },
99 };
100
101 +static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = {
102 + {
103 + I2C_BOARD_INFO("rtc-pcf8563", 0x51),
104 + },
105 +};
106 +
107 #ifdef CONFIG_LEDS_CLASS
108 static struct resource dsmg600_led_resources[] = {
109 {
110 @@ -158,6 +165,9 @@ static void __init dsmg600_init(void)
111
112 pm_power_off = dsmg600_power_off;
113
114 + i2c_register_board_info(0, dsmg600_i2c_board_info,
115 + ARRAY_SIZE(dsmg600_i2c_board_info));
116 +
117 /* The UART is required on the DSM-G600 (Redboot cannot use the
118 * NIC) -- do it here so that it does *not* get removed if
119 * platform_add_devices fails!
This page took 0.060623 seconds and 5 git commands to generate.