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/nas100d-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/nas100d-setup.c')
-rw-r--r-- | arch/arm/mach-ixp4xx/nas100d-setup.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c index 78a17413ceca..54d884fb2517 100644 --- a/arch/arm/mach-ixp4xx/nas100d-setup.c +++ b/arch/arm/mach-ixp4xx/nas100d-setup.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/serial.h> | 16 | #include <linux/serial.h> |
17 | #include <linux/serial_8250.h> | 17 | #include <linux/serial_8250.h> |
18 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
19 | #include <linux/i2c-gpio.h> | ||
19 | 20 | ||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
@@ -68,16 +69,17 @@ static struct platform_device nas100d_leds = { | |||
68 | }; | 69 | }; |
69 | #endif | 70 | #endif |
70 | 71 | ||
71 | static struct ixp4xx_i2c_pins nas100d_i2c_gpio_pins = { | 72 | static struct i2c_gpio_platform_data nas100d_i2c_gpio_data = { |
72 | .sda_pin = NAS100D_SDA_PIN, | 73 | .sda_pin = NAS100D_SDA_PIN, |
73 | .scl_pin = NAS100D_SCL_PIN, | 74 | .scl_pin = NAS100D_SCL_PIN, |
74 | }; | 75 | }; |
75 | 76 | ||
76 | static struct platform_device nas100d_i2c_controller = { | 77 | static struct platform_device nas100d_i2c_gpio = { |
77 | .name = "IXP4XX-I2C", | 78 | .name = "i2c-gpio", |
78 | .id = 0, | 79 | .id = 0, |
79 | .dev.platform_data = &nas100d_i2c_gpio_pins, | 80 | .dev = { |
80 | .num_resources = 0, | 81 | .platform_data = &nas100d_i2c_gpio_data, |
82 | }, | ||
81 | }; | 83 | }; |
82 | 84 | ||
83 | static struct resource nas100d_uart_resources[] = { | 85 | static struct resource nas100d_uart_resources[] = { |
@@ -124,7 +126,7 @@ static struct platform_device nas100d_uart = { | |||
124 | }; | 126 | }; |
125 | 127 | ||
126 | static struct platform_device *nas100d_devices[] __initdata = { | 128 | static struct platform_device *nas100d_devices[] __initdata = { |
127 | &nas100d_i2c_controller, | 129 | &nas100d_i2c_gpio, |
128 | &nas100d_flash, | 130 | &nas100d_flash, |
129 | #ifdef CONFIG_LEDS_IXP4XX | 131 | #ifdef CONFIG_LEDS_IXP4XX |
130 | &nas100d_leds, | 132 | &nas100d_leds, |