public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Greg KH <greg@kroah.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	LM Sensors <lm-sensors@lm-sensors.org>
Subject: Re: [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (2/9)
Date: Wed, 20 Jul 2005 23:46:03 +0200	[thread overview]
Message-ID: <20050720234603.2b66560d.khali@linux-fr.org> (raw)
In-Reply-To: <20050720042755.GD26552@kroah.com>

Hi Greg,

> > Convert i2c-isa from a dumb i2c_adapter into a pseudo i2c-core for
> > ISA hardware monitoring drivers. The isa i2c_adapter is no more
> > registered with i2c-core, drivers have to explicitely connect to it
> > using the new i2c_isa_{add,del}_driver interface.
> 
> Ick, when I did this originally it was a hack, and it's still a hack.
> It's sad to see it spreading around, but that's proably my fault...

I didn't know that, I'm sorry. As I don't really know how the driver
core works, I just copied from the nearest working driver, which
happened to be i2c-core. If this isn't good and you want me to do it
differently, just tell me how and I'll tackle this. Actually it might be
more important for i2c-core than i2c-isa, as i2c-isa will die in the
long run.

> Anyway, what are your plans for after this?  How long will this code
> stay around?  What do you want to do next?
> 
> I don't have any real objections to this patch series at all, just
> very curious as to your proposed roadmap after this.

I'm sorry, I thought I had explained it in the first post of the set,
but now I realize that I explained in detail *what* I am doing, not
*why* nor the whole picture.

The whole point is to end with the current state where i2c and hardware
monitoring are the same subsystem. There are more and more non-i2c
hardware monitoring chip, in particular Super-I/O integrated sensors
(IT8712F, W83627HF, PC87366 and all their variants), which have a very
high overhead currently due to being linked to the i2c core for no
reason but historical.

The positive side effect is that there are a few ugly hooks in the
i2c-core (expecially the sensors part) to handle the non-i2c chips, and
we will be able to get rid of them and clean up a few things - as
details in my original post.

The reason why I am going into this now is that a totally different
hardware monitoring driver is in the process of being added to the Linux
kernel: bmcsensors, which is IPMI based. This would be yet another
driver articifially linked to the i2c subsystem, requiring yet other
hooks. So I wanted to clean up the mess first.

Another reason is that I now have a Super-I/O chip with integrated
sensors on one of my systems, as well as a legacy ISA hardware
monitoring chip on another one, so I should be able to test my changes
more efficiently than before in that field (although more hardware would
be even better, as usual).

The major steps in the process are:

1* Define a hardware monitoring class, which all hardware monitoring
drivers would register with. Mark M. Hoffman just did that a few weeks
ago.

2* Separate the non-i2c hardware monitoring drivers from the i2c-core.
This is what I am doing right now.

3* Have the user-space tools (libsensors) search for hardware monitoring
drivers through /sys/class/hwmon rather than (or, for the time being,
additionally to) /sys/bus/i2c. Next on my list.

4* Clean up the i2c core. This isn't directly related, but needs to be
done, and will be much easier now that the isa hooks are gone. This
includes a full rewrite of the way the i2c chip driver module parameters
are handled, and a merge of i2c_probe and i2c_detect, to name only the
two major ones. We might also get rid of some IDs that don't seem to be
strictly needed (in i2c_algorithm and i2c_driver). And maybe split the
SMBus 1 and 2 implementations away from i2c-core, not too sure what it
would take.

5* Really attach the non-i2c drivers to their right location in the
sysfs tree. I don't know exactly where the correct location is, but
we'll have to find. Once the hwmon class is in use, moving the drivers
around in the sysfs tree will not break the user-space compatibility.

Note that 3* depends on 1* and 4* depends on 2*. Also, we will need to
wait some time (6 months? 1 year?) between 3* and 5* so as to not break
user-space compatibility too much. This is the reason why I made 2* and
5* different points even though it would sound saner to do them in a
single step. This approach also lets me parallelize with 4*, which I
want to do now rather than wait for 5* to happen.

So, the approximate timeline would be 1* to 3* right now, 4* after that
as time permits, and 5* when we estimate that 3* happened long enough
ago (roughly 1st half of 2006?)

I hope I explained it correctly this time. If not, just complain ;)

Thanks,
-- 
Jean Delvare

  reply	other threads:[~2005-07-20 21:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-19 21:39 [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (0/9) Jean Delvare
2005-07-19 21:45 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (1/9) Jean Delvare
2005-07-20  4:26   ` Greg KH
2005-07-20 21:03     ` Jean Delvare
2005-07-19 21:48 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (2/9) Jean Delvare
2005-07-20  4:27   ` Greg KH
2005-07-20 21:46     ` Jean Delvare [this message]
2005-07-25  0:35       ` Greg KH
2005-07-25 17:28         ` Jean Delvare
2005-07-26 22:54           ` Greg KH
2005-07-27 20:21             ` Jean Delvare
2005-07-19 21:51 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (3/9) Jean Delvare
2005-07-19 21:53 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (4/9) Jean Delvare
2005-07-19 21:56 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (5/9) Jean Delvare
2005-07-26 22:33   ` patch i2c-hwmon-split-05.patch added to gregkh-2.6 tree gregkh
2005-07-19 21:57 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (6/9) Jean Delvare
2005-07-19 22:02 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (7/9) Jean Delvare
2005-07-19 22:05 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (8/9) Jean Delvare
2005-07-26 22:33   ` patch i2c-hwmon-split-08.patch added to gregkh-2.6 tree gregkh
2005-07-19 22:09 ` [PATCH 2.6] I2C: Separate non-i2c hwmon drivers from i2c-core (9/9) Jean Delvare
2005-07-26 22:33   ` patch i2c-hwmon-split-09.patch added to gregkh-2.6 tree gregkh

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=20050720234603.2b66560d.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.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