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_sensors2/prog/detect sensors-detect
Date: Thu, 19 May 2005 06:24:53 +0000	[thread overview]
Message-ID: <20040418162748.39e8d754.khali@linux-fr.org> (raw)
In-Reply-To: <20021107235845.0037e195.khali@linux-fr.org>

> the point is that we tell people what's at 0x30, that it's associated
> with what's at 0x50.

If we follow my idea to use reads instead of quick writes for the
0x30-0x37 range, then the user doesn't see 0x30 as holding a device, so
we don't have to tell him what's there.

> I went through the datasheets of the Microchip and ST parts pretty
> carefully yesterday, it's clear that it's a byte-write-data that
> does the write-protect.

And other chips (Fairchild NM34W02) say "byte write". If that's "byte
write" in the SMBus way, then it's a 2-byte command (as opposed to
3-byte byte-write-data). I wouldn't swear that we will never see a chip
for which a quick write would be sufficent.

My point is that I don't see the benefit in telling the user that he has
a write-protectable EEPROM, while I see the potential danger in
quick-writing the eeprom's write-protect address.

I would suggest that we comment out the eeprom with $chip = 2 in
@chips_id by default. We can leave it in if some people happen to need
it, but not do it by default.

BTW, at least one EEPROM model (Catalyst CAT34RC02) can also read byte
from its write-protection address, so your detection method would miss
it.

> Clearly the Vaio detection in eeprom_detect() was being called
> both for chip=0 and chip=1, so I changed it so it was only called
> for chip=1. I didn't realize that you did it for both to
> reduce "noise". IMO not doing things twice is better than
> reducing "noise".

Granted. The global detection scheme is poor but making detection
functions more complex to compensate that isn't the right thing to do, I
admit. I think that my main reason for doing that was because
sensors-detect used to suggest bogus module options in that case. Then I
fixed that but did not revert the detect_eeprom function.

> Perhaps a better long-term solution is to call a detection
> routine once and allow it to return different names,
> rather than calling it multiple times, one for each chip name.

Yes, I think that would be the correct way. But this means much work...

- 
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/

  parent reply	other threads:[~2005-05-19  6:24 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-19  6:23 lm_sensors2/prog/detect sensors-detect Jean Delvare
2005-05-19  6:23 ` Jean Delvare
2005-05-19  6:23 ` Jean Delvare
2005-05-19  6:23 ` Jean Delvare
2005-05-19  6:23 ` Jean Delvare
2005-05-19  6:23 ` Jean Delvare
2005-05-19  6:23 ` Jim Morris
2005-05-19  6:23 ` Jean Delvare
2005-05-19  6:23 ` Jim Morris
2005-05-19  6:24 ` Jim Morris
2005-05-19  6:24 ` Jim Morris
2005-05-19  6:24 ` Jim Morris
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jim Morris
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jim Morris
2005-05-19  6:24 ` Mark D. Studebaker 
2005-05-19  6:24 ` Jim Morris
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Mark M. Hoffman
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Mark M. Hoffman
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` Jean Delvare [this message]
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Jean Delvare
2005-05-19  6:24 ` Mark Studebaker
2005-05-19  6:24 ` 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=20040418162748.39e8d754.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.