diff options
author | Michael-Luke Jones <mlj28@cam.ac.uk> | 2008-01-27 12:14:46 -0500 |
---|---|---|
committer | Jean Delvare <khali@hyperion.delvare> | 2008-01-27 12:14:46 -0500 |
commit | 5a4a2387717ec57ec2a9154beb281e09c19fc26e (patch) | |
tree | 320f2932100e5b078c88cccade6f995f6876fa72 /arch/arm/mach-ixp4xx/nslu2-setup.c | |
parent | eee87d3196c9a7ac3422f4298e2250ca68d791c1 (diff) |
ixp4xx-i2c-gpio
Migrate all ixp4xx devices to the bitbanging I2C bus driver utilizing
the arch-neutral GPIO API (linux/i2c-gpio.h).
Tested by the nslu2-linux and openwrt projects in public firmware releases.
Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
Acked-by: Rod Whitby <rod@whitby.id.au>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'arch/arm/mach-ixp4xx/nslu2-setup.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/nslu2-setup.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index 9bf8ccbcaccf..77277d27fcc5 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/serial.h> | 18 | #include <linux/serial.h> |
19 | #include <linux/serial_8250.h> | 19 | #include <linux/serial_8250.h> |
20 | #include <linux/leds.h> | 20 | #include <linux/leds.h> |
21 | #include <linux/i2c-gpio.h> | ||
21 | 22 | ||
22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
@@ -41,7 +42,7 @@ static struct platform_device nslu2_flash = { | |||
41 | .resource = &nslu2_flash_resource, | 42 | .resource = &nslu2_flash_resource, |
42 | }; | 43 | }; |
43 | 44 | ||
44 | static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = { | 45 | static struct i2c_gpio_platform_data nslu2_i2c_gpio_data = { |
45 | .sda_pin = NSLU2_SDA_PIN, | 46 | .sda_pin = NSLU2_SDA_PIN, |
46 | .scl_pin = NSLU2_SCL_PIN, | 47 | .scl_pin = NSLU2_SCL_PIN, |
47 | }; | 48 | }; |
@@ -82,11 +83,12 @@ static struct platform_device nslu2_leds = { | |||
82 | }; | 83 | }; |
83 | #endif | 84 | #endif |
84 | 85 | ||
85 | static struct platform_device nslu2_i2c_controller = { | 86 | static struct platform_device nslu2_i2c_gpio = { |
86 | .name = "IXP4XX-I2C", | 87 | .name = "i2c-gpio", |
87 | .id = 0, | 88 | .id = 0, |
88 | .dev.platform_data = &nslu2_i2c_gpio_pins, | 89 | .dev = { |
89 | .num_resources = 0, | 90 | .platform_data = &nslu2_i2c_gpio_data, |
91 | }, | ||
90 | }; | 92 | }; |
91 | 93 | ||
92 | static struct platform_device nslu2_beeper = { | 94 | static struct platform_device nslu2_beeper = { |
@@ -139,7 +141,7 @@ static struct platform_device nslu2_uart = { | |||
139 | }; | 141 | }; |
140 | 142 | ||
141 | static struct platform_device *nslu2_devices[] __initdata = { | 143 | static struct platform_device *nslu2_devices[] __initdata = { |
142 | &nslu2_i2c_controller, | 144 | &nslu2_i2c_gpio, |
143 | &nslu2_flash, | 145 | &nslu2_flash, |
144 | &nslu2_beeper, | 146 | &nslu2_beeper, |
145 | #ifdef CONFIG_LEDS_IXP4XX | 147 | #ifdef CONFIG_LEDS_IXP4XX |