* [PATCH] [media] dw9714: Set the v4l2 focus ctrl step as 1
@ 2017-08-30 17:48 Rajmohan Mani
2017-08-30 21:28 ` Sakari Ailus
0 siblings, 1 reply; 5+ messages in thread
From: Rajmohan Mani @ 2017-08-30 17:48 UTC (permalink / raw)
To: linux-media
Cc: mchehab, hverkuil, tfiga, sakari.ailus, s.nawrocki,
tuukka.toivonen, Rajmohan Mani
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>
---
drivers/media/i2c/dw9714.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
index 6a607d7..f9212a8 100644
--- a/drivers/media/i2c/dw9714.c
+++ b/drivers/media/i2c/dw9714.c
@@ -22,6 +22,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
@@ -138,7 +143,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",
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] [media] dw9714: Set the v4l2 focus ctrl step as 1
2017-08-30 17:48 [PATCH] [media] dw9714: Set the v4l2 focus ctrl step as 1 Rajmohan Mani
@ 2017-08-30 21:28 ` Sakari Ailus
2017-08-30 21:39 ` Mani, Rajmohan
2017-11-02 4:00 ` Tomasz Figa
0 siblings, 2 replies; 5+ messages in thread
From: Sakari Ailus @ 2017-08-30 21:28 UTC (permalink / raw)
To: Rajmohan Mani
Cc: linux-media, mchehab, hverkuil, tfiga, s.nawrocki, tuukka.toivonen
Hi Rajmohan,
On Wed, Aug 30, 2017 at 10:48:52AM -0700, Rajmohan Mani wrote:
> 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.
Thanks for the patch.
The recommended limit for line length is 75, not 50 (or 25 or whatever) as
it might be in certain Gerrit installations. :-) Please make good use of
lines in the future, I've rewrapped the text this time. Thanks.
>
> Signed-off-by: Rajmohan Mani <rajmohan.mani@intel.com>
> ---
> drivers/media/i2c/dw9714.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
> index 6a607d7..f9212a8 100644
> --- a/drivers/media/i2c/dw9714.c
> +++ b/drivers/media/i2c/dw9714.c
> @@ -22,6 +22,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
> @@ -138,7 +143,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",
--
Regards,
Sakari Ailus
e-mail: sakari.ailus@iki.fi
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] [media] dw9714: Set the v4l2 focus ctrl step as 1
2017-08-30 21:28 ` Sakari Ailus
@ 2017-08-30 21:39 ` Mani, Rajmohan
2017-11-02 4:00 ` Tomasz Figa
1 sibling, 0 replies; 5+ messages in thread
From: Mani, Rajmohan @ 2017-08-30 21:39 UTC (permalink / raw)
To: Sakari Ailus
Cc: linux-media, mchehab, hverkuil, tfiga, s.nawrocki, Toivonen, Tuukka
Hi Sakari,
Thanks for the review.
> Subject: Re: [PATCH] [media] dw9714: Set the v4l2 focus ctrl step as 1
>
> Hi Rajmohan,
>
> On Wed, Aug 30, 2017 at 10:48:52AM -0700, Rajmohan Mani wrote:
> > 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.
>
> Thanks for the patch.
>
> The recommended limit for line length is 75, not 50 (or 25 or whatever) as it
> might be in certain Gerrit installations. :-) Please make good use of lines in the
> future, I've rewrapped the text this time. Thanks.
>
Ack. I have been overly cautious here.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [media] dw9714: Set the v4l2 focus ctrl step as 1
2017-08-30 21:28 ` Sakari Ailus
2017-08-30 21:39 ` Mani, Rajmohan
@ 2017-11-02 4:00 ` Tomasz Figa
2017-11-02 4:06 ` Tomasz Figa
1 sibling, 1 reply; 5+ messages in thread
From: Tomasz Figa @ 2017-11-02 4:00 UTC (permalink / raw)
To: Sakari Ailus
Cc: Rajmohan Mani, Linux Media Mailing List, Mauro Carvalho Chehab,
Hans Verkuil, Sylwester Nawrocki, Toivonen, Tuukka
Hi Sakari,
On Thu, Aug 31, 2017 at 6:28 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
> Hi Rajmohan,
>
> On Wed, Aug 30, 2017 at 10:48:52AM -0700, Rajmohan Mani wrote:
>> 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.
>
> Thanks for the patch.
>
> The recommended limit for line length is 75, not 50 (or 25 or whatever) as
> it might be in certain Gerrit installations. :-) Please make good use of
> lines in the future, I've rewrapped the text this time. Thanks.
Has this patch been applied to your tree? I can't find it on
linux-next or https://git.linuxtv.org/sailus/media_tree.git/ . Just
want to make sure it doesn't get lost in action.
Best regards,
Tomasz
>
>>
>> Signed-off-by: Rajmohan Mani <rajmohan.mani@intel.com>
>> ---
>> drivers/media/i2c/dw9714.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
>> index 6a607d7..f9212a8 100644
>> --- a/drivers/media/i2c/dw9714.c
>> +++ b/drivers/media/i2c/dw9714.c
>> @@ -22,6 +22,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
>> @@ -138,7 +143,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",
>
> --
> Regards,
>
> Sakari Ailus
> e-mail: sakari.ailus@iki.fi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [media] dw9714: Set the v4l2 focus ctrl step as 1
2017-11-02 4:00 ` Tomasz Figa
@ 2017-11-02 4:06 ` Tomasz Figa
0 siblings, 0 replies; 5+ messages in thread
From: Tomasz Figa @ 2017-11-02 4:06 UTC (permalink / raw)
To: Sakari Ailus
Cc: Rajmohan Mani, Linux Media Mailing List, Mauro Carvalho Chehab,
Hans Verkuil, Sylwester Nawrocki, Toivonen, Tuukka
On Thu, Nov 2, 2017 at 1:00 PM, Tomasz Figa <tfiga@chromium.org> wrote:
> Hi Sakari,
>
> On Thu, Aug 31, 2017 at 6:28 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
>> Hi Rajmohan,
>>
>> On Wed, Aug 30, 2017 at 10:48:52AM -0700, Rajmohan Mani wrote:
>>> 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.
>>
>> Thanks for the patch.
>>
>> The recommended limit for line length is 75, not 50 (or 25 or whatever) as
>> it might be in certain Gerrit installations. :-) Please make good use of
>> lines in the future, I've rewrapped the text this time. Thanks.
>
> Has this patch been applied to your tree? I can't find it on
> linux-next or https://git.linuxtv.org/sailus/media_tree.git/ . Just
> want to make sure it doesn't get lost in action.
Okay, my bad. I didn't notice that linux-next is stuck on Oct 18 and
so doesn't include latest media tree.
I confirmed that the patch is indeed present in Mauro's master branch.
Sorry for the noise.
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-02 4:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30 17:48 [PATCH] [media] dw9714: Set the v4l2 focus ctrl step as 1 Rajmohan Mani
2017-08-30 21:28 ` Sakari Ailus
2017-08-30 21:39 ` Mani, Rajmohan
2017-11-02 4:00 ` Tomasz Figa
2017-11-02 4:06 ` Tomasz Figa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.