arm: tegra: cardhu: Added I2C arbitration lost recovery mechanism
Alok Chauhan [Tue, 26 Jul 2011 10:30:32 +0000 (15:30 +0530)]
Added the code for arbitration lost recovery mechanism for i2c
driver and Initialize gpio number for i2c clock and data as
part of platform data.

bug 854305

Original-Change-Id: Icdc243a5025c766d65816542a6d5aabd61e6eee1
Reviewed-on: http://git-master/r/43200
Reviewed-by: Bandi Krishna Chaitanya <bandik@nvidia.com>
Tested-by: Bandi Krishna Chaitanya <bandik@nvidia.com>
Reviewed-by: Alok Chauhan <alokc@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

Rebase-Id: Rd3737d2e59cd58bc1ebee0b33f069cb78d86dcc4

arch/arm/mach-tegra/board-cardhu.c

index c468415..b63f958 100644 (file)
@@ -192,6 +192,9 @@ static struct tegra_i2c_platform_data cardhu_i2c1_platform_data = {
        .adapter_nr     = 0,
        .bus_count      = 1,
        .bus_clk_rate   = { 100000, 0 },
+       .scl_gpio               = TEGRA_GPIO_PC4,
+       .sda_gpio               = TEGRA_GPIO_PC5,
+       .arb_recovery = arb_lost_recovery,
 };
 
 static struct tegra_i2c_platform_data cardhu_i2c2_platform_data = {
@@ -199,24 +202,36 @@ static struct tegra_i2c_platform_data cardhu_i2c2_platform_data = {
        .bus_count      = 1,
        .bus_clk_rate   = { 100000, 0 },
        .is_clkon_always = true,
+       .scl_gpio               = TEGRA_GPIO_PT5,
+       .sda_gpio               = TEGRA_GPIO_PT6,
+       .arb_recovery = arb_lost_recovery,
 };
 
 static struct tegra_i2c_platform_data cardhu_i2c3_platform_data = {
        .adapter_nr     = 2,
        .bus_count      = 1,
        .bus_clk_rate   = { 100000, 0 },
+       .scl_gpio               = TEGRA_GPIO_PBB1,
+       .sda_gpio               = TEGRA_GPIO_PBB2,
+       .arb_recovery = arb_lost_recovery,
 };
 
 static struct tegra_i2c_platform_data cardhu_i2c4_platform_data = {
        .adapter_nr     = 3,
        .bus_count      = 1,
        .bus_clk_rate   = { 100000, 0 },
+       .scl_gpio               = TEGRA_GPIO_PV4,
+       .sda_gpio               = TEGRA_GPIO_PV5,
+       .arb_recovery = arb_lost_recovery,
 };
 
 static struct tegra_i2c_platform_data cardhu_i2c5_platform_data = {
        .adapter_nr     = 4,
        .bus_count      = 1,
        .bus_clk_rate   = { 100000, 0 },
+       .scl_gpio               = TEGRA_GPIO_PZ6,
+       .sda_gpio               = TEGRA_GPIO_PZ7,
+       .arb_recovery = arb_lost_recovery,
 };