From: Andy Walls <awalls@md.metrocast.net>
To: Sedji Gaouaou <sedji.gaouaou@atmel.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
linux-input@vger.kernel.org
Subject: Re: question about v4l2_subdev
Date: Mon, 31 May 2010 14:19:07 -0400 [thread overview]
Message-ID: <1275329947.2261.19.camel@localhost> (raw)
In-Reply-To: <4C03D80B.5090009@atmel.com>
On Mon, 2010-05-31 at 17:38 +0200, Sedji Gaouaou wrote:
> Hi,
>
> I am currently working on the atmel video driver, and I am facing a issue.
> I have written a driver for the ov2640 omnivison sensor(enclosed). In
> the ov2640 driver I am using the v4l2_subdev API. The point is I don't
> how how can I access it in my video driver?
> How to register the subdev struct in the atmel driver, so I could access
> the s_ftm function for instance.
That depends. Is the atmel video driver instantiating a v4l_device for
itself, or is it using some frame work that instantiates one for it?
The details of using the v4l2 framework are in
linux/Documentation/video4linux/v4l2-framework.txt
but, typically
1. Something first should call v4l2_device_register() on a v4l2_device
object. (Typically there is only one v4l2_device object per "bridge"
chip between the PCI, PCIe, or USB bus and the subdevices, even if that
bridge chip has more than one I2C master implementation.)
2. Then, for subdevices connected to the bridge chip via I2C, something
needs to call v4l2_i2c_new_subdev() with the v4l2_device pointer as one
of the arguments, to get back a v4l2_subdevice instance pointer.
3. After that, v4l2_subdev_call() with the v4l2_subdev pointer as one of
the arguments can be used to invoke the subdevice methods.
TV Video capture drivers do this work themselves. Drivers using a
camera framework may have the framework doing some of the work for them.
Regards,
Andy
next prev parent reply other threads:[~2010-05-31 18:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 15:38 question about v4l2_subdev Sedji Gaouaou
2010-05-31 18:19 ` Andy Walls [this message]
2010-06-01 8:14 ` Sedji Gaouaou
2010-06-01 14:04 ` Sedji Gaouaou
2010-06-01 20:56 ` David Ellingsworth
2010-06-05 1:27 ` Andy Walls
2010-06-07 10:01 ` Sedji Gaouaou
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=1275329947.2261.19.camel@localhost \
--to=awalls@md.metrocast.net \
--cc=g.liakhovetski@gmx.de \
--cc=linux-input@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sedji.gaouaou@atmel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).