summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorPhil Breczinski <pbreczinski@nvidia.com>2013-05-06 18:53:27 -0700
committerRiham Haidar <rhaidar@nvidia.com>2013-06-27 21:15:38 -0700
commit6746d5b0f923c83b63080b5f4ec0b1740bbc22b7 (patch)
tree0d82c65d642dc4ffe439d5705de49f5622b9474a /drivers/media
parentf6c60cef8e6707e06c5057a43ecf280902eb1cce (diff)
media: video: tegra: sh532u: fix physical range
Previously, physical range returned different every time. Hardcode to the known desired physical range to allow focuser to pass more stringent focuser tests to be added to automated testing. Bug 1279178 Change-Id: Ic838860a18e2d1961a08396dd45e37790bbb1378 Signed-off-by: Phil Breczinski <pbreczinski@nvidia.com> Reviewed-on: http://git-master/r/225976 (cherry picked from commit 9f3a34494d10048f8a4c9d32468342131474f66b) Reviewed-on: http://git-master/r/242561 Reviewed-by: Brian Bamsch <bbamsch@nvidia.com> Tested-by: Brian Bamsch <bbamsch@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/tegra/sh532u.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/tegra/sh532u.c b/drivers/media/video/tegra/sh532u.c
index b9ab1f096d9d..fb61145644d9 100644
--- a/drivers/media/video/tegra/sh532u.c
+++ b/drivers/media/video/tegra/sh532u.c
@@ -1,7 +1,7 @@
/*
* SH532U focuser driver.
*
- * Copyright (C) 2011-2012 NVIDIA Corporation.
+ * Copyright (C) 2011-2013 NVIDIA Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -116,6 +116,8 @@
#define SH532U_TIMEOUT_MS 200
#define SH532U_POS_LOW_DEFAULT 0xA000
#define SH532U_POS_HIGH_DEFAULT 0x6000
+#define SH532U_POS_PHYSICAL_MIN (~0x7FFF)
+#define SH532U_POS_PHYSICAL_MAX (0x7FFF)
#define SH532U_SLEW_RATE 1
#define SH532U_POS_TRANSLATE 0
#define SH532U_POS_SIGN_CHANGER (-1)
@@ -1376,10 +1378,8 @@ static void sh532u_get_focuser_capabilities(struct sh532u_info *info)
info->config.pos_working_low = AF_POS_INVALID_VALUE;
info->config.pos_working_high = AF_POS_INVALID_VALUE;
- info->config.pos_actual_low = info->cfg.limit_high *
- SH532U_POS_SIGN_CHANGER;
- info->config.pos_actual_high = info->cfg.limit_low *
- SH532U_POS_SIGN_CHANGER;
+ info->config.pos_actual_low = SH532U_POS_PHYSICAL_MIN;
+ info->config.pos_actual_high = SH532U_POS_PHYSICAL_MAX;
info->config.slew_rate = info->cap.slew_rate;
info->config.circle_of_confusion = -1;