From: David Ellingsworth <david@identd.dyndns.org>
To: Sedji Gaouaou <sedji.gaouaou@atmel.com>
Cc: Andy Walls <awalls@md.metrocast.net>,
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: Tue, 1 Jun 2010 16:56:01 -0400 [thread overview]
Message-ID: <AANLkTil-_h_DwGxRzRqtDQc1Q4weQ2ffNQ9LBoxA1cdk@mail.gmail.com> (raw)
In-Reply-To: <4C05135D.1080108@atmel.com>
On Tue, Jun 1, 2010 at 10:04 AM, Sedji Gaouaou <sedji.gaouaou@atmel.com> wrote:
> Hi,
>
> Sorry to bother you again, but here is the situation:
> I have 2 drivers: an ov2640 driver and my atmel driver.
> Basically the ov2640 driver is the same as the ov7670 driver.
>
> So what I don't know is how to call the ov2640 functions(such as set format)
> in my atmel driver.
>
> In the ov2640 I used the function: v4l2_i2c_subdev_init, and in the atmel
> driver I used v4l2_device_register.
>
> But I don't know where I should use the v4l2_i2c_new_subdev function, and
> how to link my atmel video struct to the i2c sensor.
>
> Is there any examples in linux?
>
> Regards,
> Sedji
>
If I understand what you're saying, ov2640 and ovv7670 are both video
drivers but they have shared functionality. If the shared
functionality is in the form of controlling say an i2c device of some
sorts then you should implement that functionality as a subdev.
Otherwise, you should extract the shared functionality into its own
module that can be utilized by both drivers (there are many examples
of this within the kernel).
Regards,
David Ellingsworth
next prev parent reply other threads:[~2010-06-01 20:56 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
2010-06-01 8:14 ` Sedji Gaouaou
2010-06-01 14:04 ` Sedji Gaouaou
2010-06-01 20:56 ` David Ellingsworth [this message]
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=AANLkTil-_h_DwGxRzRqtDQc1Q4weQ2ffNQ9LBoxA1cdk@mail.gmail.com \
--to=david@identd.dyndns.org \
--cc=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).