All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Florian Echtler <floe@butterbrot.org>
Cc: linux-media@vger.kernel.org, linux-input@vger.kernel.org, modin@yuri.at
Subject: Re: [PATCH 4/5] add V4L2 control functions
Date: Mon, 5 Feb 2018 22:40:10 +0100	[thread overview]
Message-ID: <a968db4a-bce8-423b-ccca-d9a613acec99@xs4all.nl> (raw)
In-Reply-To: <alpine.DEB.2.10.1802052234090.18874@butterbrot>

On 02/05/2018 10:36 PM, Florian Echtler wrote:
> Hello Hans,
> 
> On Mon, 5 Feb 2018, Hans Verkuil wrote:
>> On 02/05/2018 03:29 PM, Florian Echtler wrote:
>>> +
>>> +static int sur40_vidioc_queryctrl(struct file *file, void *fh,
>>> +			       struct v4l2_queryctrl *qc)
>>
>> Sorry, but this is very wrong. Use the control framework instead. See
>> https://hverkuil.home.xs4all.nl/spec/kapi/v4l2-controls.html and pretty much all
>> media drivers (with the exception of uvc). See for example this driver:
>> drivers/media/pci/tw68/tw68-video.c (randomly chosen).
>>
>> It actually makes life a lot easier for you as you don't have to perform any
>> range checks and all control ioctls are automatically supported for you.
> 
> thanks for the quick reply, I wasn't aware of that framework at all :-) 
> Will certainly use it.
> 
> What's the earliest kernel version this is supported on, in case we want 
> to backport this for our standalone module, too?

Initial commit was in August 2010, so it's been around for quite some time :-)

Regards,

	Hans

  reply	other threads:[~2018-02-05 21:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-05 14:29 [PATCH 0/5] [RFC] add video controls to SUR40 driver Florian Echtler
2018-02-05 14:29 ` [PATCH 1/5] add missing blob structure tag field Florian Echtler
2018-02-05 14:29 ` [PATCH 2/5] add video control register definitions Florian Echtler
2018-02-05 14:29 ` [PATCH 3/5] add video control register handlers Florian Echtler
2018-02-05 14:29 ` [PATCH 4/5] add V4L2 control functions Florian Echtler
2018-02-05 14:54   ` Hans Verkuil
2018-02-05 21:36     ` Florian Echtler
2018-02-05 21:40       ` Hans Verkuil [this message]
2018-02-05 14:29 ` [PATCH 5/5] add default control values as module parameters Florian Echtler
2018-02-05 14:56   ` Hans Verkuil
2018-02-06  9:18     ` Florian Echtler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a968db4a-bce8-423b-ccca-d9a613acec99@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=floe@butterbrot.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=modin@yuri.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.