From f230d3f53d72d05bcb5666ab7e2eccd49c8b3a15 Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Mon, 19 Nov 2007 13:47:20 +0100 Subject: [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 Signed-off-by: Andrew Victor Signed-off-by: Russell King --- arch/arm/mach-at91/board-csb337.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'arch/arm/mach-at91/board-csb337.c') diff --git a/arch/arm/mach-at91/board-csb337.c b/arch/arm/mach-at91/board-csb337.c index dde089922e3..d0aa20c9383 100644 --- a/arch/arm/mach-at91/board-csb337.c +++ b/arch/arm/mach-at91/board-csb337.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -85,12 +84,12 @@ static struct at91_udc_data __initdata csb337_udc_data = { }; static struct i2c_board_info __initdata csb337_i2c_devices[] = { - { I2C_BOARD_INFO("rtc-ds1307", 0x68), - .type = "ds1307", + { + I2C_BOARD_INFO("rtc-ds1307", 0x68), + .type = "ds1307", }, }; - static struct at91_cf_data __initdata csb337_cf_data = { /* * connector P4 on the CSB 337 mates to @@ -168,9 +167,7 @@ static void __init csb337_board_init(void) /* USB Device */ at91_add_device_udc(&csb337_udc_data); /* I2C */ - at91_add_device_i2c(); - i2c_register_board_info(0, csb337_i2c_devices, - ARRAY_SIZE(csb337_i2c_devices)); + at91_add_device_i2c(csb337_i2c_devices, ARRAY_SIZE(csb337_i2c_devices)); /* Compact Flash */ at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */ at91_add_device_cf(&csb337_cf_data); -- cgit v1.2.3