diff mbox

[RFCv3,API,31/31] Add vfl_dir field documentation.

Message ID 77a2489dac81a471ef53aeffa172b11f676ae3c7.1347619766.git.hans.verkuil@cisco.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hans Verkuil Sept. 14, 2012, 10:57 a.m. UTC
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 Documentation/video4linux/v4l2-framework.txt |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Sylwester Nawrocki Sept. 14, 2012, 5:34 p.m. UTC | #1
On 09/14/2012 12:57 PM, Hans Verkuil wrote:
> Signed-off-by: Hans Verkuil<hans.verkuil@cisco.com>
> ---
>   Documentation/video4linux/v4l2-framework.txt |    9 ++++++++-
>   1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
> index 89318be..20f1c05 100644
> --- a/Documentation/video4linux/v4l2-framework.txt
> +++ b/Documentation/video4linux/v4l2-framework.txt
> @@ -583,11 +583,18 @@ You should also set these fields:
>
>   - name: set to something descriptive and unique.
>
> +- vfl_dir: set to VFL_DIR_TX for output devices and VFL_DIR_M2M for mem2mem
> +  (codec) devices.
> +

No need to document VFL_DIR_RX ?

>   - fops: set to the v4l2_file_operations struct.
>
>   - ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance
>     (highly recommended to use this and it might become compulsory in the
> -  future!), then set this to your v4l2_ioctl_ops struct.
> +  future!), then set this to your v4l2_ioctl_ops struct. The vfl_type and
> +  vfl_dir fields are used to disable ops that do not match the type/dir
> +  combination. E.g. VBI ops are disabled for non-VBI nodes, and output ops
> +  are disabled for a capture device. This makes it possible to provide
> +  just one v4l2_ioctl_ops struct for both vbi and video nodes.
>
>   - lock: leave to NULL if you want to do all the locking in the driver.
>     Otherwise you give it a pointer to a struct mutex_lock and before the

--

Regards,
Sylwester
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hans Verkuil Sept. 14, 2012, 5:59 p.m. UTC | #2
On Fri September 14 2012 19:34:56 Sylwester Nawrocki wrote:
> On 09/14/2012 12:57 PM, Hans Verkuil wrote:
> > Signed-off-by: Hans Verkuil<hans.verkuil@cisco.com>
> > ---
> >   Documentation/video4linux/v4l2-framework.txt |    9 ++++++++-
> >   1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
> > index 89318be..20f1c05 100644
> > --- a/Documentation/video4linux/v4l2-framework.txt
> > +++ b/Documentation/video4linux/v4l2-framework.txt
> > @@ -583,11 +583,18 @@ You should also set these fields:
> >
> >   - name: set to something descriptive and unique.
> >
> > +- vfl_dir: set to VFL_DIR_TX for output devices and VFL_DIR_M2M for mem2mem
> > +  (codec) devices.
> > +
> 
> No need to document VFL_DIR_RX ?

Oops. Just because it is the default doesn't mean that I shouldn't document it.

I'll change this to:

- vfl_dir: set this to VFL_DIR_RX for capture devices (VFL_DIR_RX has value 0,
  so this is normally already the default), set to VFL_DIR_TX for output
  devices and VFL_DIR_M2M for mem2mem (codec) devices.

Thanks for all the reviews/acks!

Regards,

	Hans

> 
> >   - fops: set to the v4l2_file_operations struct.
> >
> >   - ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance
> >     (highly recommended to use this and it might become compulsory in the
> > -  future!), then set this to your v4l2_ioctl_ops struct.
> > +  future!), then set this to your v4l2_ioctl_ops struct. The vfl_type and
> > +  vfl_dir fields are used to disable ops that do not match the type/dir
> > +  combination. E.g. VBI ops are disabled for non-VBI nodes, and output ops
> > +  are disabled for a capture device. This makes it possible to provide
> > +  just one v4l2_ioctl_ops struct for both vbi and video nodes.
> >
> >   - lock: leave to NULL if you want to do all the locking in the driver.
> >     Otherwise you give it a pointer to a struct mutex_lock and before the
> 
> --
> 
> Regards,
> Sylwester
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt
index 89318be..20f1c05 100644
--- a/Documentation/video4linux/v4l2-framework.txt
+++ b/Documentation/video4linux/v4l2-framework.txt
@@ -583,11 +583,18 @@  You should also set these fields:
 
 - name: set to something descriptive and unique.
 
+- vfl_dir: set to VFL_DIR_TX for output devices and VFL_DIR_M2M for mem2mem
+  (codec) devices.
+
 - fops: set to the v4l2_file_operations struct.
 
 - ioctl_ops: if you use the v4l2_ioctl_ops to simplify ioctl maintenance
   (highly recommended to use this and it might become compulsory in the
-  future!), then set this to your v4l2_ioctl_ops struct.
+  future!), then set this to your v4l2_ioctl_ops struct. The vfl_type and
+  vfl_dir fields are used to disable ops that do not match the type/dir
+  combination. E.g. VBI ops are disabled for non-VBI nodes, and output ops
+  are disabled for a capture device. This makes it possible to provide
+  just one v4l2_ioctl_ops struct for both vbi and video nodes.
 
 - lock: leave to NULL if you want to do all the locking in the driver.
   Otherwise you give it a pointer to a struct mutex_lock and before the