summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/dw9714.c
diff options
context:
space:
mode:
authorRajmohan Mani <rajmohan.mani@intel.com>2017-08-30 14:48:52 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2017-10-04 17:08:47 -0300
commit1a58fbf5133c0c016decfa85f20b97a69672e315 (patch)
tree4a51624c32797ff74e343616297d2858d76f48ce /drivers/media/i2c/dw9714.c
parentc3d14780249814f200317cfed1e5d288aeefb528 (diff)
[media] dw9714: Set the v4l2 focus ctrl step as 1
Current v4l2 focus ctrl step value of 16, limits the minimum granularity of focus positions to 16. Setting this value as 1, enables more accurate focus positions. Signed-off-by: Rajmohan Mani <rajmohan.mani@intel.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/dw9714.c')
-rw-r--r--drivers/media/i2c/dw9714.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
index 95af4fc99cd0..ed01e8bd4331 100644
--- a/drivers/media/i2c/dw9714.c
+++ b/drivers/media/i2c/dw9714.c
@@ -21,6 +21,11 @@
#define DW9714_NAME "dw9714"
#define DW9714_MAX_FOCUS_POS 1023
/*
+ * This sets the minimum granularity for the focus positions.
+ * A value of 1 gives maximum accuracy for a desired focus position
+ */
+#define DW9714_FOCUS_STEPS 1
+/*
* This acts as the minimum granularity of lens movement.
* Keep this value power of 2, so the control steps can be
* uniformly adjusted for gradual lens movement, with desired
@@ -137,7 +142,7 @@ static int dw9714_init_controls(struct dw9714_device *dev_vcm)
v4l2_ctrl_handler_init(hdl, 1);
v4l2_ctrl_new_std(hdl, ops, V4L2_CID_FOCUS_ABSOLUTE,
- 0, DW9714_MAX_FOCUS_POS, DW9714_CTRL_STEPS, 0);
+ 0, DW9714_MAX_FOCUS_POS, DW9714_FOCUS_STEPS, 0);
if (hdl->error)
dev_err(&client->dev, "%s fail error: 0x%x\n",