From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] Document existing support for SMSC EMC2300
Date: Thu, 12 May 2011 13:58:55 +0000 [thread overview]
Message-ID: <20110512135855.GA10934@ericsson.com> (raw)
In-Reply-To: <1305037288-16695-1-git-send-email-steve.glendinning@smsc.com>
Hi,
On Thu, May 12, 2011 at 05:34:21AM -0400, Jean Delvare wrote:
> Hi Steve, Guenter,
>
> On Wed, 11 May 2011 20:53:59 +0200, Steve.Glendinning@smsc.com wrote:
> > Hi all,
> >
> > >Datasheet says that 0x20, 0x23, 0x24, 0x43..0x45, and 0x4a..0x4d are
> > >all
> > >zero on the EMC2300. Most interesting would be 0x45, 0x4b, and 0x4d,
> > >which are initialized with 0x00 on the EMC2300 but 0xff for the
> > >EMC6D103S.
> > The datasheet lies :-)
> >
> > They return the same as the EMC6D103S, i.e. 0xff for 0x45, 0x4b, and 0x4d.
>
> 0x43 is somewhat interesting. It corresponds to the VID pins the
> EMC2300 doesn't have, so this register will always return zero for the
> EMC2300. Unfortunately, most recent systems don't use the VID pins anyway
>
> > >> > EMC2300 doesn't have all the voltage inputs that EMC6D103S has,
> > >> > so reports in0, in3 and in4 all as zero.
> > >>
> > >> Wouldn't this be good way to differentiate between the parts? What
> > >> values are returned by the EMC2300 for registers 0x20, 0x23, 0x24,
> > >> 0x44, 0x45, 0x4a, 0x4b 0x4c and 0x4d?
> > I thought of this, yes the missing voltage inputs all always return 0.
>
> This isn't what the dump you just sent shows:
>
> > 20: bf ff ff ff ff ff 00 ff dd 02 ff ff ff ff ff ff ?.......??......
>
> Values are 0xbf, 0xff and 0xff respectively for registers 0x20, 0x23
> and 0x24. 0xbf is odd.
>
> More surprisingly, register 0x22, which contains the voltage of the
> monitoring chip itself, reads 0xff... Ah, I get it. On this dump,
> monitoring isn't enabled (bit 0 of register 0x40 is 0).
>
> Steve, can you please enable monitoring and provide a new dump?
>
> # modprobe i2c-dev
> # i2cset -m 0x01 3 0x2e 0x40 0x01 b
> # sleep 1
> # i2cdump 3 0x2e b
>
> This means that we can't differentiate between EMC6D103S and EMC2300
> before monitoring is started. D'oh. So I'll commit your sensors-detect
> patch right away, as we can't enable the chip there, so your patch it
> the best we can have there (and we don't need anything better anyway -
> both chips are supported by the same driver.)
>
> > I don't have an EMC6D103S handy though, so I'm not able to check its behaviour if those pins are either not connected or connected to ground. Presumably it could also return 0 in some cases so the detection would not be 100% foolproof?
>
> Correct, but OTOH, if inputs are grounded or unconnected, users won't
> care about them, will they? I think there is value in not exporting
> channels which do not exist, to make configuration easier for the user
> (and make runtime somewhat more efficient.) The downside is more
> complex code in the lm85 driver.
>
> > I figured the safe option was to leave the extra inputs visible, as I didn't want to risk blocking access to them on parts where they're present.
>
> This is certainly the easiest option. There's indeed a risk in trying
> to refine the detection and we won't do it if that can't be done
> reliably. But my main concern at this point is the increased driver
> complexity.
>
I suspect that the EMC2300 has the same chip core as the EMC6D103S
with different pinout. Given that, and the complexity of driver changes
necessary to deal with the unsupported sensors, maybe the original patch
is the best way to go after all.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2011-05-12 13:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-10 14:21 [lm-sensors] [PATCH] Document existing support for SMSC EMC2300 fan Steve Glendinning
2011-05-10 14:58 ` [lm-sensors] [PATCH] Document existing support for SMSC EMC2300 Jean Delvare
2011-05-10 15:50 ` Guenter Roeck
2011-05-11 18:53 ` Steve.Glendinning
2011-05-12 8:26 ` Steve.Glendinning
2011-05-12 9:34 ` Jean Delvare
2011-05-12 13:58 ` Guenter Roeck [this message]
2011-05-13 12:59 ` Steve.Glendinning
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=20110512135855.GA10934@ericsson.com \
--to=guenter.roeck@ericsson.com \
--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.