aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-dk.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-dk.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-dk.c')
-rw-r--r--arch/arm/mach-at91/board-dk.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/board-dk.c b/arch/arm/mach-at91/board-dk.c
index af497896a96c..40c9e4331706 100644
--- a/arch/arm/mach-at91/board-dk.c
+++ b/arch/arm/mach-at91/board-dk.c
@@ -124,6 +124,19 @@ static struct spi_board_info dk_spi_devices[] = {
124#endif 124#endif
125}; 125};
126 126
127static struct i2c_board_info __initdata dk_i2c_devices[] = {
128 {
129 I2C_BOARD_INFO("ics1523", 0x26),
130 },
131 {
132 I2C_BOARD_INFO("x9429", 0x28),
133 },
134 {
135 I2C_BOARD_INFO("at24c", 0x50),
136 .type = "24c1024",
137 }
138};
139
127static struct mtd_partition __initdata dk_nand_partition[] = { 140static struct mtd_partition __initdata dk_nand_partition[] = {
128 { 141 {
129 .name = "NAND Partition 1", 142 .name = "NAND Partition 1",
@@ -185,7 +198,7 @@ static void __init dk_board_init(void)
185 /* Compact Flash */ 198 /* Compact Flash */
186 at91_add_device_cf(&dk_cf_data); 199 at91_add_device_cf(&dk_cf_data);
187 /* I2C */ 200 /* I2C */
188 at91_add_device_i2c(); 201 at91_add_device_i2c(dk_i2c_devices, ARRAY_SIZE(dk_i2c_devices));
189 /* SPI */ 202 /* SPI */
190 at91_add_device_spi(dk_spi_devices, ARRAY_SIZE(dk_spi_devices)); 203 at91_add_device_spi(dk_spi_devices, ARRAY_SIZE(dk_spi_devices));
191#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD 204#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD