public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Mike Isely <isely@isely.net>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [REVIEWv2 PATCH 12/12] v4l2-framework: update documentation
Date: Mon, 17 Jun 2013 22:14:17 +0200	[thread overview]
Message-ID: <1564484.qyHHENhSMY@avalon> (raw)
In-Reply-To: <1371049262-5799-13-git-send-email-hverkuil@xs4all.nl>

Hi Hans,

Thanks for the patch.

On Wednesday 12 June 2013 17:01:02 Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> 'parent' was renamed to 'dev_parent'. Clarify how/when this should be used.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

with a small comment below.

> ---
>  Documentation/video4linux/v4l2-framework.txt |   17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/video4linux/v4l2-framework.txt
> b/Documentation/video4linux/v4l2-framework.txt index 24353ec..3944d5c
> 100644
> --- a/Documentation/video4linux/v4l2-framework.txt
> +++ b/Documentation/video4linux/v4l2-framework.txt
> @@ -574,9 +574,13 @@ of the video device exits.
>  The default video_device_release() callback just calls kfree to free the
>  allocated memory.
> 
> +There is also a video_device_release_empty() function that does nothing
> +(is empty) and can be used if the struct is embedded and there is nothing
> +to do when it is released.
> +
>  You should also set these fields:
> 
> -- v4l2_dev: set to the v4l2_device parent device.
> +- v4l2_dev: must be set to the v4l2_device parent device.
> 
>  - name: set to something descriptive and unique.
> 
> @@ -613,15 +617,16 @@ You should also set these fields:
>    If you want to have a separate priority state per (group of) device
> node(s), then you can point it to your own struct v4l2_prio_state.
> 
> -- parent: you only set this if v4l2_device was registered with NULL as
> +- dev_parent: you only set this if v4l2_device was registered with NULL as
>    the parent device struct. This only happens in cases where one hardware
>    device has multiple PCI devices that all share the same v4l2_device core.
> 
>    The cx88 driver is an example of this: one core v4l2_device struct, but
> -  it is used by both an raw video PCI device (cx8800) and a MPEG PCI device
> -  (cx8802). Since the v4l2_device cannot be associated with a particular
> -  PCI device it is setup without a parent device. But when the struct
> -  video_device is setup you do know which parent PCI device to use.
> +  it is used by both a raw video PCI device (cx8800) and a MPEG PCI device
> +  (cx8802). Since the v4l2_device cannot be associated with a two PCI

s/a two/two/

> +  devices at the same time it is setup without a parent device. But when
> +  the struct video_device is initialized you *do* know which parent PCI
> +  device to use and  so you set dev_device to the correct PCI device.
> 
>  - flags: optional. Set to V4L2_FL_USE_FH_PRIO if you want to let the
> framework handle the VIDIOC_G/S_PRIORITY ioctls. This requires that you use
> struct
-- 
Regards,

Laurent Pinchart


      reply	other threads:[~2013-06-17 20:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 15:00 [REVIEWv2 PATCH 00/11] Use v4l2_dev instead of parent Hans Verkuil
2013-06-12 15:00 ` [REVIEWv2 PATCH 01/12] v4l2-device: check if already unregistered Hans Verkuil
2013-06-12 17:46   ` Prabhakar Lad
2013-06-12 15:00 ` [REVIEWv2 PATCH 02/12] soc_camera: replace vdev->parent by vdev->v4l2_dev Hans Verkuil
2013-06-18  6:13   ` Hans Verkuil
2013-06-18  7:34   ` Guennadi Liakhovetski
2013-06-12 15:00 ` [REVIEWv2 PATCH 03/12] cx23885-417: use v4l2_dev instead of the deprecated parent field Hans Verkuil
2013-06-12 15:00 ` [REVIEWv2 PATCH 04/12] zoran: " Hans Verkuil
2013-06-12 15:00 ` [REVIEWv2 PATCH 05/12] sn9c102_core: add v4l2_device and replace parent with v4l2_dev Hans Verkuil
2013-06-12 15:00 ` [REVIEWv2 PATCH 06/12] saa7164: " Hans Verkuil
2013-06-12 15:00 ` [REVIEWv2 PATCH 07/12] pvrusb2: use v4l2_dev instead of the deprecated parent field Hans Verkuil
2013-06-12 15:12   ` Mike Isely
2013-06-12 15:00 ` [REVIEWv2 PATCH 08/12] f_uvc: add v4l2_device and replace parent with v4l2_dev Hans Verkuil
2013-06-17 20:12   ` Laurent Pinchart
2013-06-12 15:00 ` [REVIEWv2 PATCH 09/12] omap24xxcam: " Hans Verkuil
2013-06-12 15:01 ` [REVIEWv2 PATCH 10/12] v4l2: always require v4l2_dev, rename parent to dev_parent Hans Verkuil
2013-06-12 15:01 ` [REVIEWv2 PATCH 11/12] cx88: set dev_parent to the correct parent PCI bus Hans Verkuil
2013-06-12 15:01 ` [REVIEWv2 PATCH 12/12] v4l2-framework: update documentation Hans Verkuil
2013-06-17 20:14   ` Laurent Pinchart [this message]

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=1564484.qyHHENhSMY@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=isely@isely.net \
    --cc=linux-media@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox