ARM: tegra: dont register unavailable sensors
Bibek Basu [Wed, 19 Mar 2014 06:48:59 +0000 (11:48 +0530)]
PM375 does not have mpu, bmp, akm, wifi sensors.
So dont register those i2c devices

Bug 1483432

Change-Id: Ic91049b35ad65e558f5a4a292f36550eca51fd1c
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/383692
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>

arch/arm/mach-tegra/board-ardbeg-sdhci.c
arch/arm/mach-tegra/board-ardbeg-sensors.c
arch/arm/mach-tegra/board-laguna-power.c

index 35d84a8..5d7d2fb 100644 (file)
@@ -445,8 +445,12 @@ int __init ardbeg_sdhci_init(void)
 
        platform_device_register(&tegra_sdhci_device3);
        platform_device_register(&tegra_sdhci_device2);
-       platform_device_register(&tegra_sdhci_device0);
-       ardbeg_wifi_init();
+       if (board_info.board_id != BOARD_PM359 &&
+                       board_info.board_id != BOARD_PM375 &&
+                       board_info.board_id != BOARD_PM377) {
+               platform_device_register(&tegra_sdhci_device0);
+               ardbeg_wifi_init();
+       }
 
        return 0;
 }
index 5016e3b..640132a 100644 (file)
@@ -1641,10 +1641,12 @@ int __init ardbeg_sensors_init(void)
 {
        struct board_info board_info;
        tegra_get_board_info(&board_info);
-       /* PM363 and PM359 don't have mpu 9250 mounted */
+       /* PM363 and PM359 , PM375, PM377 don't have mpu 9250 mounted */
        /* TN8 sensors use Device Tree */
        if (board_info.board_id != BOARD_PM363 &&
                board_info.board_id != BOARD_PM359 &&
+               board_info.board_id != BOARD_PM375 &&
+               board_info.board_id != BOARD_PM377 &&
                !of_machine_is_compatible("nvidia,tn8"))
                mpuirq_init();
        ardbeg_camera_init();
@@ -1659,9 +1661,11 @@ int __init ardbeg_sensors_init(void)
        } else
                ardbeg_nct72_init();
 
-       /* TN8 and PM359 don't have ALS CM32181 */
+       /* TN8 and PM359, PM375, PM377 don't have ALS CM32181 */
        if (!of_machine_is_compatible("nvidia,tn8") &&
-           board_info.board_id != BOARD_PM359)
+           board_info.board_id != BOARD_PM359 &&
+           board_info.board_id != BOARD_PM375 &&
+           board_info.board_id != BOARD_PM377)
                i2c_register_board_info(0, ardbeg_i2c_board_info_cm32181,
                        ARRAY_SIZE(ardbeg_i2c_board_info_cm32181));
 
index 89f9fca..409e55b 100644 (file)
@@ -548,6 +548,7 @@ static struct regulator_consumer_supply fixed_reg_3v3_supply[] = {
        REGULATOR_SUPPLY("vdd_dtv_3v3", NULL),
        REGULATOR_SUPPLY("vdd_modem_3v3", NULL),
        REGULATOR_SUPPLY("vdd", "1-004c"),
+       REGULATOR_SUPPLY("vdd", "0-004c"),
        REGULATOR_SUPPLY("vdd", "0-0048"),
        REGULATOR_SUPPLY("vdd", "0-0069"),
        REGULATOR_SUPPLY("vdd", "0-000c"),