aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/nslu2-setup.c
diff options
context:
space:
mode:
authorMichael-Luke Jones <mlj28@cam.ac.uk>2008-01-27 12:14:46 -0500
committerJean Delvare <khali@hyperion.delvare>2008-01-27 12:14:46 -0500
commit5a4a2387717ec57ec2a9154beb281e09c19fc26e (patch)
tree320f2932100e5b078c88cccade6f995f6876fa72 /arch/arm/mach-ixp4xx/nslu2-setup.c
parenteee87d3196c9a7ac3422f4298e2250ca68d791c1 (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.c14
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
44static struct ixp4xx_i2c_pins nslu2_i2c_gpio_pins = { 45static 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
85static struct platform_device nslu2_i2c_controller = { 86static 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
92static struct platform_device nslu2_beeper = { 94static struct platform_device nslu2_beeper = {
@@ -139,7 +141,7 @@ static struct platform_device nslu2_uart = {
139}; 141};
140 142
141static struct platform_device *nslu2_devices[] __initdata = { 143static 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