From fc62bccbfb6556081104960c366cf407f61ec727 Mon Sep 17 00:00:00 2001 From: David Cohen Date: Thu, 31 May 2012 06:26:19 -0700 Subject: [PATCH] [PORT FROM R4] [Enzo Support] Revert "atomisp: lc898211: add temporary code for early development stage" BZ: 27947 This reverts commit 99db2b1afac52089c7f71c161094ebeeab1487c7. Change-Id: I0663a5373d5abc00bed975bc8e6d8945029effe6 Orig-Change-Id: I66b49954927956dbdd7b41198460fa4938312b64 Signed-off-by: David Cohen Reviewed-on: http://android.intel.com:8080/51398 Reviewed-by: Niemimuukko, Ukri Reviewed-by: Koski, Anttu Tested-by: Koski, Anttu Reviewed-by: buildbot Tested-by: buildbot --- drivers/media/video/lc898211.c | 56 ------------------------------------------ 1 file changed, 56 deletions(-) diff --git a/drivers/media/video/lc898211.c b/drivers/media/video/lc898211.c index d380504..888e69c 100644 --- a/drivers/media/video/lc898211.c +++ b/drivers/media/video/lc898211.c @@ -35,17 +35,6 @@ #include "lc898211.h" - -/* - * HACK: make driver to work with current 8-bit 3A while a correct 10-bit - * is coming. This is intended for test only. It does not guarantee accurate - * 3A work. - */ -#define LC898211_CONV_8_TO_10BIT - -/* Enable debug messages for development purpose */ -#define LC898211_DEBUG - #define to_lc898211_dev(sd) container_of(sd, struct lc898211_dev, sd) static int @@ -262,18 +251,6 @@ static int lc898211_t_focus_abs(struct v4l2_subdev *sd, s32 value) return ret; } -#ifdef LC898211_DEBUG - { - s16 target; - lc898211_read_reg(client, LC898211_16BIT, - LC898211_REG16_STMVEND, &target); - target = be16_to_cpu(target); - target /= (1 << 6); - - printk(KERN_INFO "%s: focus: cur:%d read:%d applied:%d\n", - __func__, focus, value, target); - } -#endif return 0; } @@ -348,18 +325,6 @@ static int lc898211_t_focus_rel(struct v4l2_subdev *sd, s32 value) struct i2c_client *client = v4l2_get_subdevdata(sd); s16 focus; int ret; -#ifdef LC898211_CONV_8_TO_10BIT - int rate = dev->af_tun.focus_abs_min - dev->af_tun.focus_abs_max; - s32 old_value = value; - - rate /= 256; - value *= rate; - value <<= 1; /* Random hack to make 3A work better */ -#ifdef LC898211_DEBUG - printk(KERN_INFO "%s: rate:%d old_value:%d new_value:%d\n", - __func__, rate, old_value, value); -#endif -#endif ret = __lc898211_q_focus_abs(sd, &focus); if (ret < 0) { @@ -372,11 +337,6 @@ static int lc898211_t_focus_rel(struct v4l2_subdev *sd, s32 value) focus >>= 6; } -#ifdef LC898211_DEBUG - printk(KERN_INFO "%s: cur_focus:%d requesting:%d\n", - __func__, focus, focus + value); -#endif - return lc898211_t_focus_abs(sd, focus + value); } @@ -450,17 +410,6 @@ static int lc898211_q_focus_abs(struct v4l2_subdev *sd, s32 *value) if (ret < 0) return ret; -#ifdef LC898211_CONV_8_TO_10BIT - { - struct lc898211_dev *dev = to_lc898211_dev(sd); - int rate = dev->af_tun.focus_abs_min - - dev->af_tun.focus_abs_max; - rate = rate / 255; - focus -= dev->af_tun.focus_abs_max; - focus *= rate; - } -#endif - *value = focus; return 0; @@ -976,11 +925,6 @@ static int lc898211_probe(struct i2c_client *client, goto err; } -#ifdef LC898211_DEBUG - printk(KERN_INFO "%s: min %d max %d inf %d macro %d\n", __func__, - dev->af_tun.focus_abs_min, dev->af_tun.focus_abs_max, - dev->af_tun.inf_pos, dev->af_tun.mac_pos); -#endif lc898211_power_down(&dev->sd); v4l2_info(client, "LC898211 actuator successfully initialized\n"); -- 2.7.4