From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH RESEND] hwmon: lm70: TI TMP121 support.
Date: Thu, 23 Oct 2008 17:53:34 +0000 [thread overview]
Message-ID: <20081023195334.240014c5@hyperion.delvare> (raw)
In-Reply-To: <20081022080423.GB11169@roarinelk.homelinux.net>
On Thu, 23 Oct 2008 10:46:29 -0700, David Brownell wrote:
> On Thursday 23 October 2008, Jean Delvare wrote:
> >
> > > For SPI, everything is MSB first ... else insist (spi->mode & SPI_LSB_FIRST)
> > > is true. Please strike the comment implying it might not be MSB first.
> >
> > Except that the LM70 transmits the LSB first, so it seems valuable to
> > underline that the TMP121 behaves differently.
>
> If true, then this driver has a bug ... it should require
> SPI_LSB_FIRST as well as SPI_3WIRE in spi->mode, for lm70.
>
> But no, I checked the data sheet and it shows MSB first.
> See the table in section 1.5.2 (MSB = D15) and the figures
> in section 2 (D15 first).
>
>
> See what confusion comes from implying things which are
> contrary-to-fact? :)
I didn't assume anything, I simply read the code:
+ switch (p_lm70->chip) {
+ case LM70_CHIP_LM70:
+ raw = (rxbuf[1] << 8) + rxbuf[0];
+ val = ((int)raw/32) * 250;
+ break;
+
+ case LM70_CHIP_TMP121:
+ raw = (rxbuf[0] << 8) + rxbuf[1];
+ val = (raw / 8) * 625 / 10;
+ break;
+ }
Does it look to you like both chips expect the same byte order? Me not.
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2008-10-23 17:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 8:04 [lm-sensors] [PATCH RESEND] hwmon: lm70: TI TMP121 support Manuel Lauss
2008-10-23 12:57 ` Jean Delvare
2008-10-23 13:13 ` Manuel Lauss
2008-10-23 13:20 ` Jean Delvare
2008-10-23 13:30 ` Manuel Lauss
2008-10-23 14:00 ` Manuel Lauss
2008-10-23 16:53 ` David Brownell
2008-10-23 17:09 ` Jean Delvare
2008-10-23 17:46 ` David Brownell
2008-10-23 17:53 ` Jean Delvare [this message]
2008-10-23 18:37 ` David Brownell
2008-10-24 8:26 ` Kaiwan N Billimoria
2008-10-24 9:21 ` David Brownell
2008-10-24 14:04 ` Kaiwan N Billimoria
2008-10-28 8:04 ` Kaiwan N Billimoria
2008-10-28 10:43 ` David Brownell
2008-10-30 6:44 ` Kaiwan N Billimoria
2008-10-30 6:49 ` David Brownell
2008-11-11 6:59 ` Kaiwan N Billimoria
2008-11-12 7:49 ` Kaiwan N Billimoria
2008-11-12 20:39 ` Jean Delvare
2008-11-12 22:06 ` Manuel Lauss
2008-11-13 10:05 ` Jean Delvare
2008-11-13 11:54 ` Manuel Lauss
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=20081023195334.240014c5@hyperion.delvare \
--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.