All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Trent Piepho <xyzzy@speakeasy.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	urishk@yahoo.com, linux-media@vger.kernel.org
Subject: Re: Minimum kernel version supported by v4l-dvb
Date: Sat, 21 Feb 2009 14:11:30 +0100	[thread overview]
Message-ID: <20090221141130.1c4f1265@hyperion.delvare> (raw)
In-Reply-To: <Pine.LNX.4.58.0902210343520.24268@shell2.speakeasy.net>

Hi Trent,

On Sat, 21 Feb 2009 04:06:53 -0800 (PST), Trent Piepho wrote:
> On Fri, 20 Feb 2009, Mauro Carvalho Chehab wrote:
> > On Sat, 21 Feb 2009 02:12:53 +0100
> > Hans Verkuil <hverkuil@xs4all.nl> wrote:
> > > That's what the i2c_new_probed_device() call is for (called through
> > > v4l2_i2c_new_probed_subdev). You pass a list of i2c addresses that the i2c
> > > core will probe for you: but this comes from the adapter driver, not from
> > > the i2c module.
> >
> > This is a problem. The current procedure used by end users will stop working.
> > It is a little worse: as the adapter driver has no means to know that some
> > device could need tvaudio or other similar devices, we would need some hacking
> > to allow the user to pass a parameter to the driver in order to test/load such
> > drivers, since there's no documentation of when such things are needed.
> 
> The new i2c driver interface also supports a ->detect() method and a list
> of address_data to use it with.  This is much more like the legacy model
> than using i2c_new_probed_device().

Correct.

> I think a compatability layer than implements attach_adapter,
> detach_adapter, and detach_client using a new-style driver's detect, probe,
> remove, and address_data should not be that hard.

Well, that's basically what Hans has been doing with
v4l2-i2c-drv-legacy.h for months now, isn't it? This is the easy part
(even though even this wasn't exactly trivial...)

The hard part is when you want to use pure new-style i2c binding (using
i2c_new_device() or i2c_new_probed_device()) in the upstream kernel.
There is simply no equivalent in pre-2.6.22 kernels. So no matter what
amount of compatibility code you add (and it would get _a lot_ of
compatibility code to get there), at best you will get a different
behavior between new and old kernels, worst case the driver will simply
not work in old kernels.

> > > But v4l2-i2c-drv.h is bad enough, and even worse is what it looks like in
> > > the kernel when the compat code has been stripped from it: it's turned into
> > > a completely pointless header. And all the v4l2 i2c modules look peculiar
> > > as well due to that header include.
> 
> As I've said before, the v4l2-i2c headers are lot more complicated than
> they need to be.  I have a tree that's shrunk them greatly.  I don't think
> it's fair to give the current headers as an example of how complicated i2c
> backward compat _must_ be.

Well, why don't send your patches out to Hans and myself for review? If
you came up with simplifications that work, we will be very happy to
apply them.

Thanks,
-- 
Jean Delvare

  parent reply	other threads:[~2009-02-21 13:11 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18  8:55 Minimum kernel version supported by v4l-dvb Hans Verkuil
2009-02-18 10:10 ` Mauro Carvalho Chehab
2009-02-18 13:01   ` Jean Delvare
2009-02-20  3:57     ` hermann pitton
2009-02-20  6:53       ` Hans Verkuil
2009-02-20  9:49         ` Jean Delvare
2009-02-20 10:39           ` hermann pitton
2009-02-21  0:23     ` Mauro Carvalho Chehab
2009-02-21  1:12       ` Hans Verkuil
2009-02-21  2:13         ` Mauro Carvalho Chehab
2009-02-21  2:40           ` hermann pitton
2009-02-21  7:28           ` Hans Verkuil
2009-02-21 11:58             ` Mauro Carvalho Chehab
2009-02-21 12:45               ` Hans Verkuil
2009-02-21 12:56                 ` Mauro Carvalho Chehab
2009-02-21 16:20                   ` hermann pitton
2009-02-21 14:26                 ` Jean Delvare
2009-02-21 12:06           ` Trent Piepho
2009-02-21 13:01             ` Mauro Carvalho Chehab
2009-02-21 13:11             ` Jean Delvare [this message]
2009-02-21 13:28               ` Hans Verkuil
2009-02-21 13:56                 ` Jean Delvare
2009-02-21 13:58               ` Trent Piepho
2009-02-22 10:09                 ` Jean Delvare
2009-02-21  1:30       ` kilgota
2009-02-21  2:18         ` Mauro Carvalho Chehab
2009-02-21 16:42           ` kilgota
2009-02-21 20:04             ` Jean Delvare
2009-02-21  9:32       ` Jean Delvare
  -- strict thread matches above, loose matches on Subject: below --
2009-02-18 10:54 Hans Verkuil
2009-02-18 11:54 ` Mauro Carvalho Chehab
2009-02-17 13:23 Jean Delvare
2009-02-17 22:24 ` Laurent Pinchart
2009-02-17 23:06   ` Hans Verkuil
2009-02-21 11:50     ` Mauro Carvalho Chehab
2009-02-21 12:01       ` Hans Verkuil
2009-02-18  0:08 ` Mauro Carvalho Chehab
2009-02-18  0:18   ` Hans Verkuil
2009-02-18  2:08     ` Mauro Carvalho Chehab
2009-02-18  7:36       ` Hans Verkuil
2009-02-18  8:30         ` Uri Shkolnik

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=20090221141130.1c4f1265@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=urishk@yahoo.com \
    --cc=xyzzy@speakeasy.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.