From: Martin Samuelsson <sam.linux.kernel@gmail.com>
To: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben@fluff.org>,
linux-dvb@linuxtv.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
i2c@lm-sensors.org
Subject: Re: Multiple Zoran MJPEG cards and i2c misattachments
Date: Tue, 10 Jun 2008 19:48:50 +0200 [thread overview]
Message-ID: <20080610194850.71b30d73.sam.linux.kernel@gmail.com> (raw)
In-Reply-To: <20080609085110.65de75ae@hyperion.delvare>
On Mon, 9 Jun 2008 08:51:10 +0200
Jean Delvare <khali@linux-fr.org> wrote:
Hi, Jean!
> > I'd say yes, they do. zoran_card.c contain lists detailing chips, and those
> > are available for reference at bus creation time. Would you know of any
> > driver I can look at to see how this new style stuff works? The "new style"
> > i2c things I've encountered so far is the 2.6 i2c subsystem as used when 2.4
> > style drivers are converted with a minimum amount of work involved.
>
> "New-style" i2c drivers are drivers which follow the device driver
> model and do not create their own devices (i2c_client). As opposed to
> "legacy" i2c drivers in 2.4 kernels and early 2.6 kernels (and still a
> lot of drivers in the current 2.6 kernel) which create their own
> i2c_client.
That explains things. Good, then that should be the route to take.
> Ben wrote a guide about converting legacy drivers to new-style drivers:
> http://marc.info/?l=i2c&m=121250094017709&w=2
Excellent, it looks simple enough.
> If you want to go that route for the zoran driver, you'll have to
> convert some of the chip drivers (at least bt866 and saa7185 if they
> are the ones causing trouble), and also modify the main zoran driver to
> create these devices (using i2c_new_device or i2c_new_probed_device) and
> remove them (using i2c_unregister_device) as needed.
bt866 belongs to the avs6eyes part of the zoran driver, while saa7185 belongs to the buz one.
> One problem may be if some of the chip drivers are shared with other
> V4L adapters (apparently the bt866 driver is zoran-only, but I'm not
> sure about the saa7185 driver). In that case you can't just convert
> them to new-style, or you would break the other adapters which expect
> the legacy drivers. So you'd have to make hybrid chip drivers, keeping
> the legacy driver (for other adapters) and adding a new-style driver
> (for zoran.)
>
> In that case, you probably want to look at what Hans Verkuil did for
> the ivtv and cx18 adapters, and maybe talk to him. He wrote helper
> wrappers to write such hybrid chip drivers easily.
That sounds good, too. Breaking other people's drivers isn't nice.
> Note that I have a DC10+ somewhere in a drawer, so if you're going to
> convert the zoran drivers to the new-style model, I can help you with
> testing. And if you have questions in the process, feel free to ask.
> I'll be happy to review your patches.
Very good indeed. I'd work on some other chips, too, but there should be people that can test those not on the DC10+.
> P.S.: I don't know how much energy you are going to put in the zoran
> driver, but I have a number of patches for it, which never made it
> upstream, if you're interested.
I'm not going to commit myself to it full time. Not even half time or anything resembling that, because I seldom get away from life long enough for serious hacking. Zoran improvements are good, though, and if you don't have the time to commit them, I might do.
Regards,
/Sam
prev parent reply other threads:[~2008-06-10 17:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-31 18:39 Multiple Zoran MJPEG cards and i2c misattachments Martin Samuelsson
2008-06-01 21:28 ` Ben Dooks
2008-06-02 9:32 ` Martin Samuelsson
2008-06-09 6:51 ` Jean Delvare
2008-06-10 17:48 ` Martin Samuelsson [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=20080610194850.71b30d73.sam.linux.kernel@gmail.com \
--to=sam.linux.kernel@gmail.com \
--cc=ben@fluff.org \
--cc=i2c@lm-sensors.org \
--cc=khali@linux-fr.org \
--cc=linux-dvb@linuxtv.org \
--cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.