public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Mike Isely <isely@pobox.com>,
	isely@isely.net, LMML <linux-media@vger.kernel.org>,
	Andy Walls <awalls@radix.net>,
	Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model
Date: Sun, 5 Apr 2009 16:05:19 +0200	[thread overview]
Message-ID: <20090405160519.629ee7d0@hyperion.delvare> (raw)
In-Reply-To: <200904050746.47451.hverkuil@xs4all.nl>

Hi Hans,

On Sun, 5 Apr 2009 07:46:47 +0200, Hans Verkuil wrote:
> Let's keep it simple: add a 'load_ir_kbd_i2c' module option for those 
> drivers that did not autoload this module. The driver author can refine 
> things later (I'll definitely will do that for ivtv).

I'd rather name the parameter "disable_ir", to make it consistent with
what other bridge drivers already use, and also because what the
parameter really does is preventing I2C devices from being
instantiated, _not_ preventing the ir-kbd-i2c module from loading.

I have a patch doing that already, it's pretty simple, I'll post it in
a minute.

> It will be interesting if someone can find out whether lirc will work at all 
> once autoprobing is removed from i2c. If it isn't, then perhaps that will 
> wake them up to the realization that they really need to move to the 
> kernel.

lirc_i2c will break, it still uses the legacy binding model. That's
what you get for living outside the kernel tree... Upgrading it
shouldn't be too hard, given that the difficult part is to update the
bridge drivers and I've already taken care of this part (although
lirc_i2c might need to probe more addresses than ir-kbd-i2c does).

> The new mechanism is the right way to do it: the adapter driver has all the 
> information if, where and what IR is used and so should be the one to tell 
> the kernel what to do. Attempting to autodetect and magically figure out 
> what IR might be there is awkward and probably impossible to get right 
> 100%.

I wholeheartedly agree.

> Hell, it's wrong already: if you have another board that already loads 
> ir-kbd-i2c then if you load ivtv or pvrusb2 afterwards you get ir-kbd-i2c 
> whether you like it or not, because ir-kbd-i2c will connect to your i2c 
> adapter like a leech. So with the addition of a module option you at least 
> give back control of this to the user.

Totally correct. The current mess^Wmodel vaguely works when a single TV
card is present, but mixing different TV cards in the same system would
certainly break. Admittedly this is probably not a very common case, I
guess the vast majority of users have a single TV card.

> When this initial conversion is done I'm pretty sure we can improve 
> ir-kbd-i2c to make it easier to let the adapter driver tell it what to do. 
> So we don't need those horrible adapter ID tests and other magic that's 
> going on in that driver. But that's phase two.

Please note that my conversion _already_ no longer makes any use of
adapter IDs. What it still does is probing, except for a few selected
cards (AVerMedia Cardbus and MSI TV@nywhere Plus). The idea is clearly
to turn probing into a fallback and use per-card data for IR device
instantiation the first choice for as many cards as possible in the
future.

Updated patch set is available at:
http://jdelvare.pck.nerim.net/linux/ir-kbd-i2c/

Changes since previous version:
* Dropped cx18 changes on request by Andy Walls.
* Added disable_ir module parameter to all bridge drivers which didn't
  have it.

-- 
Jean Delvare

  parent reply	other threads:[~2009-04-05 14:06 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-04 12:24 [PATCH 0/6] ir-kbd-i2c conversion to the new i2c binding model Jean Delvare
2009-04-04 12:26 ` [PATCH 1/6] cx18: Fix the handling of i2c bus registration error Jean Delvare
2009-04-04 12:46   ` Andy Walls
2009-04-04 14:23     ` Jean Delvare
2009-04-04 22:30       ` Andy Walls
2009-04-07  9:31     ` Jean Delvare
2009-04-07 12:14       ` Andy Walls
2009-04-04 12:27 ` [PATCH 2/6] ir-kbd-i2c: Don't use i2c_client.name for our own needs Jean Delvare
2009-04-04 12:28 ` [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model Jean Delvare
2009-04-04 13:42   ` Andy Walls
2009-04-04 16:05     ` Mike Isely
2009-04-04 22:24       ` Andy Walls
2009-04-04 22:39         ` Andy Walls
2009-04-04 22:51     ` Jean Delvare
2009-04-05  1:50       ` Andy Walls
2009-04-05 13:08         ` Jean Delvare
2009-04-05 18:13           ` Andy Walls
2009-04-04 15:51   ` Mike Isely
2009-04-04 23:05     ` Jean Delvare
2009-04-04 23:29       ` Mike Isely
2009-04-05 14:18         ` Jean Delvare
2009-04-05 18:33           ` Mike Isely
2009-04-05 20:19             ` Andy Walls
2009-04-06  3:48               ` Trent Piepho
2009-04-06  3:53             ` pvrusb2 IR changes coming [was: [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model] Mike Isely
2009-04-05  5:46       ` [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model Hans Verkuil
2009-04-05  9:14         ` Mauro Carvalho Chehab
2009-04-05 12:44           ` Andy Walls
2009-04-06 13:08             ` Mauro Carvalho Chehab
2009-04-05 14:05         ` Jean Delvare [this message]
2009-04-05 19:35           ` Andy Walls
2009-04-06  9:04             ` Jean Delvare
2009-04-06 12:06               ` Andy Walls
2009-04-05 14:37         ` Janne Grunau
2009-04-05 16:37           ` Jean Delvare
2009-04-05 16:58             ` Janne Grunau
2009-04-05 17:39           ` Andy Walls
2009-04-05 18:31             ` Janne Grunau
2009-04-05 18:58               ` Andy Walls
2009-04-05 20:22                 ` Jean Delvare
2009-04-05 21:22                   ` hermann pitton
2009-04-05 22:00                     ` Andy Walls
2009-04-05 22:21                       ` hermann pitton
2009-04-06  1:49                       ` hermann pitton
2009-04-06  1:51                       ` Mauro Carvalho Chehab
2009-04-06  2:52                         ` Mike Isely
2009-04-06  3:26                           ` hermann pitton
2009-04-06  4:44                           ` Trent Piepho
2009-04-06 12:31                           ` Mauro Carvalho Chehab
2009-04-06  8:40                     ` Jean Delvare
2009-04-06 21:10                       ` hermann pitton
2009-04-07  9:27                         ` Jean Delvare
2009-04-08  3:02                           ` CityK
2009-04-08 11:31                             ` Mauro Carvalho Chehab
2009-04-12 17:37                               ` CityK
2009-04-12 23:35                                 ` hermann pitton
2009-04-09 19:15                         ` Oldrich Jedlicka
2009-04-17 13:42                           ` Jean Delvare
2009-04-06 13:13               ` Jarod Wilson
2009-04-05 18:48         ` Mike Isely
2009-04-06 10:54           ` Mauro Carvalho Chehab
2009-04-04 12:29 ` [PATCH 4/6] ir-kbd-i2c: Use initialization data Jean Delvare
2009-04-04 12:30 ` [PATCH 5/6] saa7134: Simplify handling of IR on MSI TV@nywhere Plus Jean Delvare
2009-04-04 12:31 ` [PATCH 6/6] saa7134: Simplify handling of IR on AVerMedia Cardbus Jean Delvare
2009-04-04 15:58 ` [PATCH 0/6] ir-kbd-i2c conversion to the new i2c binding model Mike Isely
2009-04-05 10:01 ` Mauro Carvalho Chehab
2009-04-05 14:40   ` Jean Delvare
2009-04-05 18:40     ` Mike Isely
2009-04-06  0:22     ` Test results for ir-kbd-i2c.c changes (Re: [PATCH 0/6] ir-kbd-i2c conversion to the new i2c binding model) Andy Walls
2009-04-06  8:54       ` Jean Delvare
2009-04-06 11:56         ` Andy Walls
2009-04-06 11:11           ` Jean Delvare
  -- strict thread matches above, loose matches on Subject: below --
2009-04-06  5:35 [PATCH 3/6] ir-kbd-i2c: Switch to the new-style device binding model Uri Shkolnik
2009-04-06 10:45 ` Mauro Carvalho Chehab

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=20090405160519.629ee7d0@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=awalls@radix.net \
    --cc=hverkuil@xs4all.nl \
    --cc=isely@isely.net \
    --cc=isely@pobox.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.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