All of lore.kernel.org
 help / color / mirror / Atom feed
* v4l2_subdev_queryctrl and friends
@ 2017-05-16 14:31 Patrick Doyle
  2017-05-16 16:13 ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick Doyle @ 2017-05-16 14:31 UTC (permalink / raw)
  To: Linux Media Mailing List

There is a statement in the v4l2-controls.txt in my 4.4.55 kernel that
v4l2_subdev_queryctrl and friends will be removed "Once all the V4L2
drivers that depend on subdev drivers are converted to the control
framework".

How would I be able to tell if my driver (isc-atmel.c) has been
converted to the control framework?  I would have expected that to be
the case, given that I have backported the driver (from linux-media in
the last week or two), but I am not seeing controls that I create in
my subdev.

As long as I am backporting the driver, I may as well do it right.
Unless there is some reason why the control framework is known to be
broken in 4.4.

Any thoughts?

--wpd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: v4l2_subdev_queryctrl and friends
  2017-05-16 14:31 v4l2_subdev_queryctrl and friends Patrick Doyle
@ 2017-05-16 16:13 ` Hans Verkuil
  2017-05-16 17:01   ` Patrick Doyle
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Verkuil @ 2017-05-16 16:13 UTC (permalink / raw)
  To: Patrick Doyle, Linux Media Mailing List

On 16/05/17 16:31, Patrick Doyle wrote:
> There is a statement in the v4l2-controls.txt in my 4.4.55 kernel that
> v4l2_subdev_queryctrl and friends will be removed "Once all the V4L2
> drivers that depend on subdev drivers are converted to the control
> framework".
> 
> How would I be able to tell if my driver (isc-atmel.c) has been
> converted to the control framework?  I would have expected that to be
> the case, given that I have backported the driver (from linux-media in
> the last week or two), but I am not seeing controls that I create in
> my subdev.

Yes, atmel-isc.c has been converted. If a driver has a v4l2_ctrl_handler
struct, then it's OK.

However, it seems it never inherits the controls from the subdev.

It needs something like this (taken from rcar-vin.c):

        ret = v4l2_ctrl_add_handler(&vin->ctrl_handler, sd->ctrl_handler, NULL);
        if (ret < 0)
                return ret;

to do this.

Regards,

	Hans

> As long as I am backporting the driver, I may as well do it right.
> Unless there is some reason why the control framework is known to be
> broken in 4.4.
> 
> Any thoughts?
> 
> --wpd
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: v4l2_subdev_queryctrl and friends
  2017-05-16 16:13 ` Hans Verkuil
@ 2017-05-16 17:01   ` Patrick Doyle
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Doyle @ 2017-05-16 17:01 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Linux Media Mailing List

On Tue, May 16, 2017 at 12:13 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> It needs something like this (taken from rcar-vin.c):
>
>         ret = v4l2_ctrl_add_handler(&vin->ctrl_handler, sd->ctrl_handler, NULL);
>         if (ret < 0)
>                 return ret;
>
Thank you .
That did the trick.

Continuing on the topic of backporting the driver the 4.12 driver to
4.4... should I submit my modified version of the driver to this list
for review and possible inclusion in the 4.4 kernel tree?

--wpd

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-16 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-16 14:31 v4l2_subdev_queryctrl and friends Patrick Doyle
2017-05-16 16:13 ` Hans Verkuil
2017-05-16 17:01   ` Patrick Doyle

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.