media: tegra_camera: clear MIPI_CAL flag
Bryan Wu [Wed, 3 Jun 2015 21:59:36 +0000 (14:59 -0700)]
MIPI calibration should be done when power on the VI/CSI hardware. So
clear the MIPI_CAL flag to trigger MIPI calibration for next power on
operation.

Bug 1648875

Change-Id: Ic0689a331a6058e4d54d5b41869f2e81feb4158c
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/752129
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Arun Kannan <akannan@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Arun Kannan <akannan@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>

drivers/media/platform/soc_camera/tegra_camera/common.c
drivers/media/platform/soc_camera/tegra_camera/vi2.c

index 3bbcece..370035f 100644 (file)
@@ -199,6 +199,7 @@ static void tegra_camera_deactivate(struct tegra_camera_dev *cam)
        nvhost_module_idle_ext(cam->ndev);
 
        cam->sof = 0;
+       cam->cal_done = 0;
 }
 
 static int tegra_camera_capture_frame(struct tegra_camera_dev *cam)
index 3f3b8bf..6825de9 100644 (file)
@@ -1100,7 +1100,7 @@ static int vi2_mipi_calibration(struct tegra_camera_dev *cam)
        regmap_update_bits(regs, CILC_MIPI_CAL_CONFIG_2, CLKSELC, 0);
        regmap_update_bits(regs, CILD_MIPI_CAL_CONFIG, SELD, 0);
        regmap_update_bits(regs, CILD_MIPI_CAL_CONFIG_2, CLKSELD, 0);
-       regmap_update_bits(regs, CILC_MIPI_CAL_CONFIG, SELE, 0);
+       regmap_update_bits(regs, CILE_MIPI_CAL_CONFIG, SELE, 0);
        regmap_update_bits(regs, CSIE_MIPI_CAL_CONFIG_2, CLKSELE, 0);
 
        /* Select the CIL pad for auto calibration */