aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-csb337.c
diff options
context:
space:
mode:
authorAndrew Victor <andrew@sanpeople.com>2007-11-19 07:47:20 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-11-26 14:40:47 -0500
commitf230d3f53d72d05bcb5666ab7e2eccd49c8b3a15 (patch)
tree0d06454868ca879f06a268de71beb0b1ba6a08d7 /arch/arm/mach-at91/board-csb337.c
parenta95c729b7484d2bbb9ab6beef4865641e73deb99 (diff)
[ARM] 4650/1: AT91: New-style init of I2C, support for i2c-gpio
The AT91 I2C driver is currently marked as "broken" due to hardware issues. This patch enables AT91-based platforms to also use the bitbanged GPIO for I2C. This updates platform setup logic (setting up an i2c-gpio device using the same pins as the i2c-at91 device, unless only the BROKEN driver is enabled). Also make use of the new-style initialization of I2C devices using i2c_register_board_info(). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91/board-csb337.c')
-rw-r--r--arch/arm/mach-at91/board-csb337.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c
index dde089922e3b..d0aa20c9383e 100644
--- a/arch/arm/mach-at91/board-csb337.c
+++ b/arch/arm/mach-at91/board-csb337.c
@@ -23,7 +23,6 @@
23#include <linux/mm.h> 23#include <linux/mm.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/i2c.h>
27#include <linux/spi/spi.h> 26#include <linux/spi/spi.h>
28#include <linux/mtd/physmap.h> 27#include <linux/mtd/physmap.h>
29 28
@@ -85,12 +84,12 @@ static struct at91_udc_data __initdata csb337_udc_data = {
85}; 84};
86 85
87static struct i2c_board_info __initdata csb337_i2c_devices[] = { 86static struct i2c_board_info __initdata csb337_i2c_devices[] = {
88 { I2C_BOARD_INFO("rtc-ds1307", 0x68), 87 {
89 .type = "ds1307", 88 I2C_BOARD_INFO("rtc-ds1307", 0x68),
89 .type = "ds1307",
90 }, 90 },
91}; 91};
92 92
93
94static struct at91_cf_data __initdata csb337_cf_data = { 93static struct at91_cf_data __initdata csb337_cf_data = {
95 /* 94 /*
96 * connector P4 on the CSB 337 mates to 95 * connector P4 on the CSB 337 mates to
@@ -168,9 +167,7 @@ static void __init csb337_board_init(void)
168 /* USB Device */ 167 /* USB Device */
169 at91_add_device_udc(&csb337_udc_data); 168 at91_add_device_udc(&csb337_udc_data);
170 /* I2C */ 169 /* I2C */
171 at91_add_device_i2c(); 170 at91_add_device_i2c(csb337_i2c_devices, ARRAY_SIZE(csb337_i2c_devices));
172 i2c_register_board_info(0, csb337_i2c_devices,
173 ARRAY_SIZE(csb337_i2c_devices));
174 /* Compact Flash */ 171 /* Compact Flash */
175 at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */ 172 at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */
176 at91_add_device_cf(&csb337_cf_data); 173 at91_add_device_cf(&csb337_cf_data);