diff options
author | Qinggang Zhou <qzhou@nvidia.com> | 2011-08-22 19:51:03 -0700 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-08-25 17:04:19 -0700 |
commit | 9c088eb8818a6fe4f62877880ce87af242af1f54 (patch) | |
tree | 489d4dfcd7728e347887d06e29637a2624caccbe /drivers | |
parent | e6c9a8d0f9ac779f14b09fdf80732615b41f878f (diff) |
Revert "media: video: tegra: sh532u: remove focuser init_pos"
This reverts commit 713b0fe85ab640016918062fed8b62486f88f92e.
The reverted commit removed reading pre-calibrated INF and MAC,
which caused the AF moves focuser to an invalid INF.
The original change is at
http://git-master/r/47657
bug 866141
Change-Id: Ib4c25ea241b6ea06a3abe80cff9c7d9554314948
Reviewed-on: http://git-master/r/48606
Reviewed-by: Qinggang Zhou <qzhou@nvidia.com>
Tested-by: Qinggang Zhou <qzhou@nvidia.com>
Reviewed-by: Gary Zhang <garyz@nvidia.com>
Reviewed-by: Daniel Willemsen <dwillemsen@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/tegra/sh532u.c | 16 |
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); } |