All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Echtler <floe@butterbrot.org>
To: Hans Verkuil <hverkuil@xs4all.nl>
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:36:53 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.10.1802052234090.18874@butterbrot> (raw)
In-Reply-To: <4835be2b-238c-bb27-e9e5-98642ae76733@xs4all.nl>

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?

Best regards, Florian
-- 
"_Nothing_ brightens up my morning. Coffee simply provides a shade of
grey just above the pitch-black of the infinite depths of the _abyss_."

  reply	other threads:[~2018-02-05 21:36 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 [this message]
2018-02-05 21:40       ` Hans Verkuil
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=alpine.DEB.2.10.1802052234090.18874@butterbrot \
    --to=floe@butterbrot.org \
    --cc=hverkuil@xs4all.nl \
    --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.