All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin Rubli" <linux1@rubli.info>
To: "'Brandon Philips'" <brandon@ifup.org>
Cc: 'Linux and Kernel Video' <video4linux-list@redhat.com>
Subject: RE: [PATCH] Support for write-only controls
Date: Wed, 16 Apr 2008 17:45:10 +0800	[thread overview]
Message-ID: <000f01c89fa6$96c612d0$c4523870$@info> (raw)
In-Reply-To: <20080415004416.GA11071@plankton.ifup.org>

[-- Attachment #1: Type: text/plain, Size: 1952 bytes --]

Hi Brandon,

> -----Original Message-----
> From: Brandon Philips [mailto:brandon@ifup.org]
> Sent: Tuesday, April 15, 2008 08:44
> To: Martin Rubli; linux1@rubli.info; Laurent Pinchart
> Cc: Linux and Kernel Video
> Subject: Re: [PATCH] Support for write-only controls
> 
> On 15:12 Wed 13 Feb 2008, Brandon Philips wrote:
> > On 01:01 Tue 18 Dec 2007, Martin Rubli wrote:
> > > Thanks a lot for all your feedback and the constructive discussion and
> sorry
> > > for the delay while I was without Internet on the weekend. I'll try to
> > > summarize what we have so far:
> > >
> > > Write-only controls:
> > >
> > > It seems, everybody likes EACCES. Michael, maybe we could get some
> feedback
> > > from you on this? It would be nice to change the spec, so that EACCES
> also
> > > becomes the error for writing read-only controls--it seems
appropriate.
> But
> > > if for some reason we can't change that we should probably make the
> > > write-only controls consistent and return EINVAL as well.
> > >
> > > Unusable controls due to device communication error:
> > >
> > > The easiest solution seems to be to set the V4L2_CTRL_FLAG_DISABLED
> flag as
> > > was suggested. The documentation currently says "permanently disabled
> and
> > > should be ignored by the application" which I think is exactly what
> applies
> > > to the situation. The V4L2_CTRL_FLAG_NEXT_CTRL would still be
> respected by
> > > drivers supporting the extended control enumeration, so no need to the
> spec
> > > is required. But I would still add a short paragraph about the first
part as
> > > a guide for future implementations and a witness of this thread. ;-)
> > >
> > > As soon as everyone agrees on this, I will propose new patches. Let me
> know
> > > what you think ...
> >
> 
> Ping.  I never saw patches come across for this.

Attached the patch for videodev2.h and the documentation sources.

Signed-off-by: Martin Rubli <linux1 rubli info>

Cheers,
Martin

[-- Attachment #2: v4l2_ctrl_flag_write_only.patch --]
[-- Type: application/octet-stream, Size: 578 bytes --]

diff -Naur v4l-dvb-5de66b04c598/linux/include/linux/videodev2.h v4l-dvb-new/linux/include/linux/videodev2.h
--- v4l-dvb-5de66b04c598/linux/include/linux/videodev2.h	2008-04-16 06:22:11.000000000 +0800
+++ v4l-dvb-new/linux/include/linux/videodev2.h	2008-04-16 17:37:38.000000000 +0800
@@ -831,6 +831,7 @@
 #define V4L2_CTRL_FLAG_UPDATE 		0x0008
 #define V4L2_CTRL_FLAG_INACTIVE 	0x0010
 #define V4L2_CTRL_FLAG_SLIDER 		0x0020
+#define V4L2_CTRL_FLAG_WRITE_ONLY 	0x0040
 
 /*  Query flag, to be ORed with the control ID */
 #define V4L2_CTRL_FLAG_NEXT_CTRL	0x80000000

[-- Attachment #3: v4l2_ctrl_flag_write_only-doc.patch --]
[-- Type: application/octet-stream, Size: 960 bytes --]

diff -Naur v4l2spec-0.24/vidioc-queryctrl.sgml v4l2spec-0.24a/vidioc-queryctrl.sgml
--- v4l2spec-0.24/vidioc-queryctrl.sgml	2008-03-06 23:42:13.000000000 +0800
+++ v4l2spec-0.24a/vidioc-queryctrl.sgml	2008-04-16 17:27:36.000000000 +0800
@@ -361,6 +361,15 @@
             <entry>A hint that this control is best represented as a
 slider-like element in a user interface.</entry>
           </row>
+          <row>
+            <entry><constant>V4L2_CTRL_FLAG_WRITE_ONLY</constant></entry>
+            <entry>0x0040</entry>
+            <entry>This control is permanently writable only. Any
+attempt to read the control will result in an EACCES error code. This
+flag is typically present for relative controls or action controls where
+writing a value will cause the device to carry out a given action
+(e. g. motor control) but no meaningful value can be returned.</entry>
+          </row>
         </tbody>
       </tgroup>
     </table>

[-- Attachment #4: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  reply	other threads:[~2008-04-16  9:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <op.t3hn72busxcvug@mrubli-nb.am.logitech.com>
2008-02-13 23:12 ` [PATCH] Support for write-only controls Brandon Philips
2008-04-15  0:44   ` Brandon Philips
2008-04-16  9:45     ` Martin Rubli [this message]
2008-04-21 23:15       ` [PATCH] v4l2-spec: " 'Brandon Philips'
     [not found]     ` <20080415001932.52039d0f@gaivota>
2008-04-16 22:41       ` [PATCH] Support for " Laurent Pinchart
2008-04-16 22:39         ` Mauro Carvalho Chehab
2008-04-22  2:22       ` Brandon Philips
2008-04-22  8:40         ` Laurent Pinchart
2008-04-22 14:25           ` Brandon Philips

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='000f01c89fa6$96c612d0$c4523870$@info' \
    --to=linux1@rubli.info \
    --cc=brandon@ifup.org \
    --cc=video4linux-list@redhat.com \
    /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.