All of lore.kernel.org
 help / color / mirror / Atom feed
From: khali@linux-fr.org (Jean Delvare)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH 1/3] lm78: No longer use i2c-isa
Date: Mon, 19 Mar 2007 14:02:07 +0000	[thread overview]
Message-ID: <20070319150207.95d2105b.khali@linux-fr.org> (raw)
In-Reply-To: <20070319133231.b2a2a2a0.khali@linux-fr.org>

Hi Hans,

On Mon, 19 Mar 2007 13:44:38 +0100, Hans de Goede wrote:
> I see that you're using a platform here not a isa driver. There was mention of 
> maybe mentioning the isa driver structure/class in the future does this mean 
> that the plan is to keep using platfrom driver for isa sensor chips?

I have been considering an isa driver, but fell back to a platform
driver for two reasons:

1* libsensors would most probably need another update to support yet
another type of hardware monitoring driver. While this could be done,
it would delay my plan to kill i2c-isa by several months, which isn't
really acceptable.

2* isa drivers are only available on some architectures, as the driver
core code for them depends on CONFIG_ISA which cannot be selected on
some architectures. While I suppose that LM78 chips connected on the
ISA bus are only found on x86 systems, LM78 chips connected to the I2C
bus could be found on virtually any system. So, in order to use an isa
driver rather than a platform driver, I would first have had to either
clutter the driver with #ifdef-CONFIG_ISAs to let other architectures
use the I2C part of the driver, or split the driver in two or three
modules. Again, this was not impossible, but it would have taken more
time than I have available, and more time than I think is worth
spending on an otherwise very old driver.

So yes, I admit that going with a platform driver is the easy way and
not necessarily the best absolute technical solution. That being said,
I seem to understand that CONFIG_ISA=y means "the system has ISA slots",
which suggests that isa drivers should only be used for legacy ISA
daughter boards.

> I'm very interested in the work as the PC8374L chip for which I'm planning to 
> write a driver can be accessed through both isa and i2c too.
> 
> I notice that you always register the i2c driver in case of the lm78, for the 
> PC8374L I was thinking about only registering then i2c driver if ISA access is 
> disabled. ISA access can be disabled through the superio config registers, in 
> this case the i2c address can still be read from those superio config registers 
> and one can try to fallback to i2c access. What do you think is best?

Contrary to the LM78 / W83781D, which were dedicated hardware
monitoring chips, the PC8374L is a Super-I/O, so it is very unlikely to
be ever found on a daughter board (while for example the W83781D was
used on graphics adapters). So it is rather unlikely that the ISA
(actually LPC) access will not be available. If I were you, I'd write
an ISA/LPC-only driver to start with, and only think of adding I2C
support later if really needed. As a matter of fact, the Winbond
W83627HF and ITE IT8712F have their hardware monitoring features
exposed on both the LPC bus and the SMBus, and we ended up dropping
SMBus access support entirely from the it87 driver. Dropping support
for the W83627HF SMBus access is somewhere on my TODO list, too.

BTW, the lm78 and w83781d drivers cannot safely disable the I2C access
support when a device is found on the ISA bus. Think of the case where
I plug a graphics adapter with a W83781D chip in a motherboard which
itself has a W83781D chip.

-- 
Jean Delvare


  parent reply	other threads:[~2007-03-19 14:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-19 12:32 [lm-sensors] [PATCH 1/3] lm78: No longer use i2c-isa Jean Delvare
2007-03-19 12:44 ` Hans de Goede
2007-03-19 14:02 ` Jean Delvare [this message]
2007-03-19 14:20 ` Hans de Goede
2007-03-19 19:02 ` Jean Delvare

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=20070319150207.95d2105b.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=lm-sensors@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.