arm: tegra: cardhu: Adding cam-AF power rails
Laxman Dewangan [Mon, 2 May 2011 09:28:16 +0000 (14:28 +0530)]
Adding the camera autofocus power rail infomration.
Removing non-existant peripheral entry from i2c4 bus.
Adding deselect mux option after each i2c transfer
through mux i2c.

bug 802264

Original-Change-Id: Id87178666e4d8c4c5db3f8be708fc5fc85b3e2e4
Reviewed-on: http://git-master/r/29998
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Rd791771ddf72c52686de86ce1f1aa99cf03ab877

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

index e982514..07e2fe8 100644 (file)
@@ -461,12 +461,14 @@ static int gpio_switch_en_vdd_pnl1_voltages[] = { 3300};
 /* CAM1_LDO_EN from AP GPIO KB_ROW6 R06*/
 static struct regulator_consumer_supply gpio_switch_cam1_ldo_en_supply[] = {
        REGULATOR_SUPPLY("vdd_2v8_cam1", NULL),
+       REGULATOR_SUPPLY("vdd_2v8_cam1_af", NULL),
 };
 static int gpio_switch_cam1_ldo_en_voltages[] = { 2800};
 
 /* CAM2_LDO_EN from AP GPIO KB_ROW7 R07*/
 static struct regulator_consumer_supply gpio_switch_cam2_ldo_en_supply[] = {
        REGULATOR_SUPPLY("vdd_2v8_cam2", NULL),
+       REGULATOR_SUPPLY("vdd_2v8_cam2_af", NULL),
 };
 static int gpio_switch_cam2_ldo_en_voltages[] = { 2800};
 
index 8fca8ea..90231f7 100644 (file)
@@ -48,19 +48,17 @@ static struct regulator *cardhu_vdd_cam3 = NULL;
 
 static struct board_info board_info;
 
-#ifdef CONFIG_I2C_MUX_PCA954x
 static struct pca954x_platform_mode cardhu_pca954x_modes[] = {
-       { .adap_id = PCA954x_I2C_BUS0, },
-       { .adap_id = PCA954x_I2C_BUS1, },
-       { .adap_id = PCA954x_I2C_BUS2, },
-       { .adap_id = PCA954x_I2C_BUS3, },
+       { .adap_id = PCA954x_I2C_BUS0, .deselect_on_exit = true, },
+       { .adap_id = PCA954x_I2C_BUS1, .deselect_on_exit = true, },
+       { .adap_id = PCA954x_I2C_BUS2, .deselect_on_exit = true, },
+       { .adap_id = PCA954x_I2C_BUS3, .deselect_on_exit = true, },
 };
 
 static struct pca954x_platform_data cardhu_pca954x_data = {
        .modes    = cardhu_pca954x_modes,
        .num_modes      = ARRAY_SIZE(cardhu_pca954x_modes),
 };
-#endif
 
 static int cardhu_camera_init(void)
 {
@@ -397,12 +395,10 @@ struct ov2710_platform_data cardhu_ov2710_data = {
 };
 
 static const struct i2c_board_info cardhu_i2c3_board_info[] = {
-#ifdef CONFIG_I2C_MUX_PCA954x
        {
                I2C_BOARD_INFO("pca9546", 0x70),
                .platform_data = &cardhu_pca954x_data,
        },
-#endif
 };
 static struct i2c_board_info cardhu_i2c6_board_info[] = {
        {
@@ -640,10 +636,6 @@ int __init cardhu_sensors_init(void)
        cardhu_mpuirq_init();
 #endif
 
-       if (ARRAY_SIZE(cardhu_i2c3_board_info))
-               i2c_register_board_info(3, cardhu_i2c3_board_info,
-                       ARRAY_SIZE(cardhu_i2c3_board_info));
-
 #ifdef CONFIG_SENSORS_MPU3050
        i2c_register_board_info(2, mpu3050_i2c0_boardinfo,
                ARRAY_SIZE(mpu3050_i2c0_boardinfo));