summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQinggang Zhou <qzhou@nvidia.com>2011-08-22 19:51:03 -0700
committerRyan Wong <ryanw@nvidia.com>2011-08-22 21:09:34 -0700
commit4cac6138d2d7658e779a665c21cd029492f22b61 (patch)
tree409f01b69a763db32147005648b8aca0963ae27c
parent41675653e3f97add13c894699d4ab488bf2e680c (diff)
Revert "media: video: tegra: sh532u: remove focuser init_pos"
This reverts commit 713b0fe85ab640016918062fed8b62486f88f92e. bug 866141 Change-Id: I5c1c9c78fc6a7078d20d0e5e5e2103e78e9211cc Reviewed-on: http://git-master/r/48618 Reviewed-by: Qinggang Zhou <qzhou@nvidia.com> Tested-by: Qinggang Zhou <qzhou@nvidia.com> Reviewed-by: Patrick Shehane <pshehane@nvidia.com> Reviewed-by: Ryan Wong <ryanw@nvidia.com> Tested-by: Ryan Wong <ryanw@nvidia.com>
-rw-r--r--drivers/media/video/tegra/sh532u.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/tegra/sh532u.c b/drivers/media/video/tegra/sh532u.c
index 0038359c79f4..ee3e67f66914 100644
--- a/drivers/media/video/tegra/sh532u.c
+++ b/drivers/media/video/tegra/sh532u.c
@@ -300,6 +300,19 @@ get_rom_info_error:
info->config.pos_low = POS_LOW;
}
+static void init_hvca_pos(struct sh532u_sensor *info)
+{
+ struct i2c_client *client = info->i2c_client;
+ short sBottomLimit, sTopLimit;
+
+ get_rom_info(info);
+ sBottomLimit = (((int)info->config.limit_low * 5) >> 3) & 0xFFC0;
+ lens_move_pulse(client, sBottomLimit);
+ sTopLimit = (((int)info->config.limit_high * 5) >> 3) & 0xFFC0;
+ lens_move_pulse(client, sTopLimit);
+ lens_move_pulse(client, info->config.pos_high);
+}
+
static unsigned int a2buf[] = {
0x0018019c,
0x0018019d,
@@ -463,6 +476,9 @@ static void init_driver(struct sh532u_sensor *info)
}
}
}
+ msleep(300);
+
+ init_hvca_pos(info);
}