8917050a613b5e751f2905638d83576c514ddd89
[openwrt/svn-archive/archive.git] / target / linux / ixp4xx / patches-2.6.23 / 021-nslu2_i2c_gpio_driver_support.patch
1 diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
2 index 9bf8ccb..77277d2 100644
3 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c
4 +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
5 @@ -18,6 +18,7 @@
6 #include <linux/serial.h>
7 #include <linux/serial_8250.h>
8 #include <linux/leds.h>
9 +#include <linux/i2c-gpio.h>
10
11 #include <asm/mach-types.h>
12 #include <asm/mach/arch.h>
13 @@ -41,7 +42,7 @@ static struct platform_device nslu2_flash = {
14 .resource = &nslu2_flash_resource,
15 };
16
17 -static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = {
18 +static struct i2c_gpio_platform_data nslu2_i2c_gpio_data = {
19 .sda_pin = NSLU2_SDA_PIN,
20 .scl_pin = NSLU2_SCL_PIN,
21 };
22 @@ -82,11 +83,12 @@ static struct platform_device nslu2_leds = {
23 };
24 #endif
25
26 -static struct platform_device nslu2_i2c_controller = {
27 - .name = "IXP4XX-I2C",
28 +static struct platform_device nslu2_i2c_gpio = {
29 + .name = "i2c-gpio",
30 .id = 0,
31 - .dev.platform_data = &nslu2_i2c_gpio_pins,
32 - .num_resources = 0,
33 + .dev = {
34 + .platform_data = &nslu2_i2c_gpio_data,
35 + },
36 };
37
38 static struct platform_device nslu2_beeper = {
39 @@ -139,7 +141,7 @@ static struct platform_device nslu2_uart = {
40 };
41
42 static struct platform_device *nslu2_devices[] __initdata = {
43 - &nslu2_i2c_controller,
44 + &nslu2_i2c_gpio,
45 &nslu2_flash,
46 &nslu2_beeper,
47 #ifdef CONFIG_LEDS_IXP4XX