public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jean Delvare" <khali@linux-fr.org>
To: Adrian Cox <adrian@humboldt.co.uk>, Greg KH <greg@kroah.com>
Cc: Michael Hunold <hunold-ml@web.de>,
	linux-kernel@vger.kernel.org, sensors@Stimpy.netroedge.com
Subject: Re: [PATCH][2.6] Add command function to struct i2c_adapter
Date: Fri, 1 Oct 2004 14:57:06 +0100	[thread overview]
Message-ID: <20041001123741.M30026@linux-fr.org> (raw)
In-Reply-To: <1096633365.16121.125.camel@newt>

On Fri, 01 Oct 2004 13:22:45 +0100, Adrian Cox wrote
> Either the i2c devices need to be able to support a list of permitted
> adapters, or the i2c adapters need a list of permitted clients. A single
> class isn't adequate. Consider the following scenario:
> 
> The FooTV123 has multiplexor MX3R0K3 and frontend XYZZY, the TVMatic3000
> has frontend XYZZY and multiplexor MX31337, and the FooTV124 has
> multiplexor MX31337 and frontend FR012. All three cards are 
> installed in the same machine. In the worst case the probe code for 
> MX31337 puts MX3R0K3 into a state that requires a hard reset.
> 
> Manual connection of clients makes it easier to develop a driver outside
> the kernel tree, then merge it when ready, without having to 
> allocate a number from a central authority.

Agreed. Greg's proposal would somehow mean one class per video device adapter,
which doesn't sound good. We have room for only 32 classes anyway. However, I
agree with Greg that a "no probe" flag isn't needed if we already have
well-defined classes.

Basically, probing is something only hardware monitoring chip drivers do (+
eeprom, so we can include the DDC world). Video clients don't probe as far as
I know (because probing just doesn't work here). So, if we were to have a "no
probe" flag, it would always be clear when class is VIDEO and always set when
class is HWMON (I voluntarily simplify, there are a couple more classes), so
it means that the "no probe" flag is redundant. To put it short, simply not
declaring an adapter as class HWMON means it won't be probed ever (the eeprom
case is to be considered separately and may require a class of its own).

> Creating the adapter with a list of permitted clients is also an
> adequate solution for a bus like I2C which doesn't properly support
> probing. The OCP bus on PowerPC has no explicit probing, and uses a
> similar approach of creating the bus with a list of the devices possible
> for that PowerPC model.

This may be fine for the PPC world, but in the i386 world it wont work. To
give you an idea, the MBM database has 1155 motherboards listed, most of which
have hardware monitoring chips on-board. It happens quite often that I don't
find motherboard models I am looking for therein, so a complete base would
have maybe 1500 or 2000 entries. We certainly don't want to have such a base
in the linux kernel tree. It would be unmaintainable, and also would ensure
that new hardware has no chance to work until us developers know about it.
Probing is the way to go there, even if the I2C bus was obviously not designed
for this.

So I2C bus probing won't go away. Classes or flags are what we need (unless we
go for separated I2C adapter lists, but that's a completely different
approach, and obviously we are not interested until someone comes with a solid
patch that really does this.) A working classes system is really next door,
Michael did most of the work already, half of which is already merged into the
kernel tree.

Thanks.

-- 
Jean Delvare
http://khali.linux-fr.org/


  reply	other threads:[~2004-10-01 12:56 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-20 17:19 [PATCH][2.6] Add command function to struct i2c_adapter Michael Hunold
2004-09-21 15:41 ` Greg KH
2004-09-21 17:10   ` Michael Hunold
2004-09-21 17:39     ` Jon Smirl
2004-09-21 18:05       ` Michael Hunold
2004-09-22  8:56         ` Adrian Cox
2004-09-22 12:08           ` Jean Delvare
2004-09-22 11:54             ` Adrian Cox
2004-09-22 13:38               ` Jean Delvare
2004-09-22 13:13                 ` Adrian Cox
2004-09-22 15:40                 ` Jon Smirl
2004-09-22 15:56                   ` Adrian Cox
2004-09-22 16:07                     ` Jon Smirl
2004-09-22 16:51                       ` Adrian Cox
2004-09-22 17:17                         ` Jon Smirl
2004-09-22 18:55                         ` Jean Delvare
2004-09-22 18:32                 ` Adrian Cox
2004-09-22 20:04                   ` Mark M. Hoffman
2004-09-23  7:41                   ` Michael Hunold
2004-09-23  7:48                   ` Michael Hunold
2004-09-23  7:09               ` Michael Hunold
2004-09-23 20:18                 ` Adrian Cox
2004-09-21 20:33       ` Jean Delvare
2004-09-21 21:02         ` Jon Smirl
2004-09-24 17:06   ` Michael Hunold
2004-09-24 18:05     ` Jean Delvare
2004-09-24 20:21       ` Michael Hunold
2004-10-01  6:52         ` Greg KH
2004-10-01 12:22           ` Adrian Cox
2004-10-01 13:57             ` Jean Delvare [this message]
2004-10-01 23:41             ` Greg KH
     [not found] <41500BED.8090607@linuxtv.org>
2004-09-21 13:28 ` Jean Delvare
2004-09-21 14:38   ` Michael Hunold

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=20041001123741.M30026@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=adrian@humboldt.co.uk \
    --cc=greg@kroah.com \
    --cc=hunold-ml@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sensors@Stimpy.netroedge.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