[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>
This commit is contained in:

committed by
Russell King

parent
a95c729b74
commit
f230d3f53d
@@ -91,6 +91,14 @@ static struct at91_mmc_data __initdata eb9200_mmc_data = {
|
||||
.wire4 = 1,
|
||||
};
|
||||
|
||||
static struct i2c_board_info __initdata eb9200_i2c_devices[] = {
|
||||
{
|
||||
I2C_BOARD_INFO("at24c", 0x50),
|
||||
.type = "24c512",
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
static void __init eb9200_board_init(void)
|
||||
{
|
||||
/* Serial */
|
||||
@@ -102,7 +110,7 @@ static void __init eb9200_board_init(void)
|
||||
/* USB Device */
|
||||
at91_add_device_udc(&eb9200_udc_data);
|
||||
/* I2C */
|
||||
at91_add_device_i2c();
|
||||
at91_add_device_i2c(eb9200_i2c_devices, ARRAY_SIZE(eb9200_i2c_devices));
|
||||
/* Compact Flash */
|
||||
at91_add_device_cf(&eb9200_cf_data);
|
||||
/* SPI */
|
||||
|
Reference in New Issue
Block a user