arm: tegra: laguna: fix rt5639 i2c failure
Shreshtha Sahu [Mon, 3 Feb 2014 11:52:53 +0000 (16:52 +0530)]
This patch fixes rt5639 i2c failure. Removed i2c
and platform data registration for Laguna ERS-S
boards as it is not present in it.

Bug: 1377308

Change-Id: I1c2def0f0d5176ddfc08783975e7ba882014376d
Signed-off-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/362910
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Vikram Fugro <vfugro@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

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

index 5213b34..b53ba61 100644 (file)
@@ -248,7 +248,8 @@ static void ardbeg_i2c_init(void)
        struct board_info board_info;
        tegra_get_board_info(&board_info);
 
-       i2c_register_board_info(0, &rt5639_board_info, 1);
+       if (board_info.board_id != BOARD_PM359)
+               i2c_register_board_info(0, &rt5639_board_info, 1);
 
        if (board_info.board_id == BOARD_PM359 ||
                        board_info.board_id == BOARD_PM358 ||
@@ -469,7 +470,6 @@ static struct platform_device *ardbeg_devices[] __initdata = {
        &tegra_i2s_device1,
        &tegra_i2s_device3,
        &tegra_i2s_device4,
-       &ardbeg_audio_device_rt5639,
        &tegra_spdif_device,
        &spdif_dit_device,
        &bluetooth_dit_device,
@@ -1185,6 +1185,10 @@ static void __init tegra_ardbeg_late_init(void)
        ardbeg_i2c_init();
        ardbeg_audio_init();
        platform_add_devices(ardbeg_devices, ARRAY_SIZE(ardbeg_devices));
+
+       if (board_info.board_id != BOARD_PM359)
+               platform_device_register(&ardbeg_audio_device_rt5639);
+
        //tegra_ram_console_debug_init();
        tegra_io_dpd_init();
        ardbeg_sdhci_init();