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] Asus P5B Deluxe / Winbond 83627DHG
Date: Mon, 25 Dec 2006 18:23:55 +0000	[thread overview]
Message-ID: <20061225192355.b4fca03e.khali@linux-fr.org> (raw)
In-Reply-To: <4dfa50520612211313g7906f3b0kbf8d7aebb2ddcda9@mail.gmail.com>

Hi David,

On Sun, 24 Dec 2006 20:58:48 -0800, David Hubbard wrote:
> > The 4 LSB of the Super-I/O chip ID (4 LSB of LPC register 0x21) are
> > subject to change in the future, which is why we mask them out when
> > checking for device ID.
> 
> I updated the comment and replaced the 4 LSB with zeros. There isn't
> room to note that the 4 LSB are ignored in the comment, but the
> implementation uses SIO_ID_MASK = 0xFFF0, so it should be correct. In
> w83627ehf_find(), I thought about masking val when printing the
> KERN_WARNING, but I prefer more information rather than less
> information. Also, I think the it is more readable to mask val in
> switch (val & SIO_ID_MASK).

Agreed, I'm fine with your implementation.

> > Strange choice. You store one specific difference between both chips
> > first, then deduce the chip name again based on this difference. A
> > saner approach would be to store the chip id (or kind) as a global, and
> > then in w83627ehf_detect(), use the value to set the number of voltage
> > inputs as a data structure member. It would be much more flexible that
> > the current approach. This will also make your job easier when
> > converting the driver to a platform driver.
> 
> I agree. I would prefer to store specific values in w83627ehf_data and
> detect the chips only once. However, I went with a compromise and so
> in w83627ehf_find() when I detect the 627ehf, 627ehg, or 627dhg, I
> store one value (w83627ehf_num_in) when I should be storing both
> num_in and name. I consider the creation of a global variable a poor
> solution, and I will change the implementation as quickly as possible.
> I don't want to detect things twice (once in w83627ehf_find() and
> later in w83627ehf_detect()).

Well, you do detect things twice in the current implementation too.
There's no way around it as long as the driver is based on i2c-isa.

> > You can take a look at the it87 driver, it does exactly this.
> 
> I will, in a future patch.

OK, I'm looking forward to it :) If you do it at the same time you
convert the driver to a platform driver, f71805f will be a better
example though.

> > This last paragraph isn't particularly helpful, "test" and "reserved"
> > really mean the same.
> 
> Yes, but I feel the information is still worth adding, for
> completeness. (It could be argued that all the information in this
> section isn't particularly helpful; one should just read the driver. I
> would argue that it is still worth having.) I have left it in the
> patch, but if you feel strongly about it, I'll delete it.

No, I don't. It's your patch after all ;)

So, your patch is applied, and will be in the next -mm kernel, and will
then go in kernel 2.6.21:
http://khali.linux-fr.org/devel/linux-2.6/jdelvare-hwmon/hwmon-w83627ehf-add-w83627dhg-support.patch

Thanks for your contribution.

-- 
Jean Delvare


  parent reply	other threads:[~2006-12-25 18:23 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-21 21:13 [lm-sensors] Asus P5B Deluxe / Winbond 83627DHG David Hubbard
2006-12-22 14:58 ` Jean Delvare
2006-12-25  4:58 ` David Hubbard
2006-12-25 18:23 ` Jean Delvare [this message]
2006-12-26  8:02 ` David Hubbard
2006-12-26 10:31 ` Hamlet
2006-12-26 23:14 ` David Hubbard
2006-12-27  1:10 ` Hamlet
2006-12-28 22:53 ` Hamlet
2006-12-29  2:35 ` David Hubbard
2006-12-29 14:37 ` Hamlet
2006-12-30  2:54 ` David Hubbard
2007-01-02 18:46 ` Rudolf Marek
2007-01-02 18:46 ` David Holl
2007-01-19  6:02 ` Daniel Ceregatti
2007-01-19  6:31 ` David Hubbard
2007-01-19  7:42 ` David Hubbard
2007-01-19 22:04 ` David Holl
2007-01-19 22:11 ` Daniel Ceregatti
2007-01-19 22:27 ` David Holl
2007-01-20  5:37 ` Daniel Ceregatti
2007-01-20 19:01 ` David Hubbard
2007-01-22 15:51 ` David Holl
2007-01-31  1:36 ` Joe Harvell
2007-02-04 16:49 ` Rudolf Marek
2007-02-05 18:43 ` Joe Harvell
2007-02-06  3:54 ` Joe Harvell
2007-02-06 17:11 ` Joe Harvell
2007-02-07 18:41 ` David Hubbard
2007-02-08 19:44 ` Rudolf Marek
2007-02-12  9:04 ` Brett King

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=20061225192355.b4fca03e.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.