From d9920c08abb43a90d2d28c424ed1bafddd00cefe Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 20 Feb 2009 09:55:39 +0100 Subject: v4l2: add V4L2_CTRL_FLAG_WRITE_ONLY flag. From: Hans Verkuil Priority: normal Signed-off-by: Hans Verkuil --- linux/include/linux/videodev2.h | 1 + v4l2-spec/compat.sgml | 3 +++ v4l2-spec/vidioc-queryctrl.sgml | 15 +++++++++++++++ 3 files changed, 19 insertions(+) diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h index 6969c3086..4167a0b44 100644 --- a/linux/include/linux/videodev2.h +++ b/linux/include/linux/videodev2.h @@ -830,6 +830,7 @@ struct v4l2_querymenu { #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 diff --git a/v4l2-spec/compat.sgml b/v4l2-spec/compat.sgml index 1ee7c4a82..94713023d 100644 --- a/v4l2-spec/compat.sgml +++ b/v4l2-spec/compat.sgml @@ -2286,6 +2286,9 @@ was renamed to v4l2_chip_ident_old V4L2 in Linux 2.6.30 + + New control flag V4L2_CTRL_FLAG_WRITE_ONLY was added. + New control V4L2_CID_COLORFX was added. diff --git a/v4l2-spec/vidioc-queryctrl.sgml b/v4l2-spec/vidioc-queryctrl.sgml index 20c4147eb..9908a964d 100644 --- a/v4l2-spec/vidioc-queryctrl.sgml +++ b/v4l2-spec/vidioc-queryctrl.sgml @@ -361,6 +361,15 @@ control. A hint that this control is best represented as a slider-like element in a user interface. + + V4L2_CTRL_FLAG_WRITE_ONLY + 0x0040 + 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 +(⪚ motor control) but no meaningful value can be returned. + @@ -378,6 +387,12 @@ is invalid. The &v4l2-querymenu; id or index is invalid. + + EACCES + + An attempt was made to read a write-only control. + + -- cgit v1.2.3