diff options
author | Prayas Mohanty <pmohanty@nvidia.com> | 2011-05-18 17:52:29 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-05-18 22:41:36 -0700 |
commit | 7f99ddd6073eb9baf6b5bee4ca403fe74bcd1427 (patch) | |
tree | 7320665ed5ab5b761ff3712a8069738ceb648a7c | |
parent | a602fe1941f5e486b6d8e8191b01b730cbdd4dd2 (diff) |
arm: tegra: sensors: synchronize cam A and cam B
For stereo camera support, both cam A and cam B should
start at the same point of time to be in sync.
bug 787214
bug 786928
Change-Id: I417db0f8ff8c76130b76d8edb4e66189d6b92447
Reviewed-on: http://git-master/r/30004
Tested-by: Prayas Mohanty <pmohanty@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-sensors.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index cedba22a94d6..7948e89b9f99 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -263,10 +263,30 @@ static int cardhu_right_ov5650_power_off(void) return 0; } +static void cardhu_ov5650_synchronize_sensors(void) +{ + if (board_info.board_id == BOARD_E1198) { + gpio_direction_output(CAM1_POWER_DWN_GPIO, 1); + mdelay(50); + gpio_direction_output(CAM1_POWER_DWN_GPIO, 0); + mdelay(50); + } + else if (board_info.board_id == BOARD_E1291) { + gpio_direction_output(CAM1_POWER_DWN_GPIO, 1); + gpio_direction_output(CAM2_POWER_DWN_GPIO, 1); + mdelay(50); + gpio_direction_output(CAM1_POWER_DWN_GPIO, 0); + gpio_direction_output(CAM2_POWER_DWN_GPIO, 0); + mdelay(50); + } + else + pr_err("%s: UnSupported BoardId\n", __func__); +} struct ov5650_platform_data cardhu_right_ov5650_data = { .power_on = cardhu_right_ov5650_power_on, .power_off = cardhu_right_ov5650_power_off, + .synchronize_sensors = cardhu_ov5650_synchronize_sensors, }; static int cardhu_ov2710_power_on(void) |