From: Andreas Werner <andreas.werner@men.de>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Andreas Werner <andreas.werner@men.de>,
linux-kernel@vger.kernel.org, jdelvare@suse.com,
lm-sensors@lm-sensors.org, wni@nvidia.com
Subject: Re: [lm-sensors] LM90 driver and ti tmp461 detection
Date: Thu, 10 Dec 2015 18:03:14 +0000 [thread overview]
Message-ID: <20151210180314.GB28022@awelinux> (raw)
In-Reply-To: <5669B9D9.9050908@roeck-us.net>
...
> On Thu, Dec 10, 2015 at 09:43:53AM -0800, Guenter Roeck wrote:
> >
> >There is one difference. The temperature ranges differ:
> >
> >TMP451:
> >Standard Mode: 0 to +127
> >Extended Mode: -64 to +191
> >
> >TMP461:
> >Standard Mode: -40 to +127
> >Extended Mode: -64 to +191
> >
> >Therefore the calcualtion is different then the tmp451 one.
> >
> Not really. The tmp451 will return 0 for negative temperatures in standard mode,
> the tmp461 will return negative (signed) values. Temperatures are stored
> as signed values, so the code should be ok as is. Am I missing something ?
>
It will work to read the local and external temperature yes, but not
for setting the temperatur.
If setting in standard mode, the tmp451 part fix the value to 0-127
but for the tmp461 we have -40 to 127.
I'v currently no chip here in the office to test it, hopefully I will
get one next week.
> >I also aggree with you with the magical ID register. I hate such
> >kind of register with are not documented and may have a value.
> >
> >I have a DT based board yes, but i have also planed to submit my changes
> >and also wanted to implement the autodetection of the chip.
>
> I don't think auto-detection (other than handling the chip as tmp451)
> will be possible, but I am looking forward to seeing your patch(es).
>
Yes, i think autodetection makes it very crapy. May be i will find
another solution.
> >
> >I have also planned (or need) to implement the "n-Factor Correction" for the
> >CPU diodes. There is a register to set this value in the tmp451 and tmp461.
> >Would that make sense to add a DT property for the driver to be able
> >to set this value? What do you think?
> >
> Yes, since this is a board (hardware) property. Other chips have similar
> registers. We'll just have to find a good set of property names and descriptions.
>
Ok, I will find a way to do it :-)
> Thanks,
> Guenter
>
Regards
Andy
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
WARNING: multiple messages have this Message-ID (diff)
From: Andreas Werner <andreas.werner@men.de>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Andreas Werner <andreas.werner@men.de>,
<linux-kernel@vger.kernel.org>, <jdelvare@suse.com>,
<lm-sensors@lm-sensors.org>, <wni@nvidia.com>
Subject: Re: LM90 driver and ti tmp461 detection
Date: Thu, 10 Dec 2015 19:03:14 +0100 [thread overview]
Message-ID: <20151210180314.GB28022@awelinux> (raw)
In-Reply-To: <5669B9D9.9050908@roeck-us.net>
...
> On Thu, Dec 10, 2015 at 09:43:53AM -0800, Guenter Roeck wrote:
> >
> >There is one difference. The temperature ranges differ:
> >
> >TMP451:
> >Standard Mode: 0 to +127
> >Extended Mode: -64 to +191
> >
> >TMP461:
> >Standard Mode: -40 to +127
> >Extended Mode: -64 to +191
> >
> >Therefore the calcualtion is different then the tmp451 one.
> >
> Not really. The tmp451 will return 0 for negative temperatures in standard mode,
> the tmp461 will return negative (signed) values. Temperatures are stored
> as signed values, so the code should be ok as is. Am I missing something ?
>
It will work to read the local and external temperature yes, but not
for setting the temperatur.
If setting in standard mode, the tmp451 part fix the value to 0-127
but for the tmp461 we have -40 to 127.
I'v currently no chip here in the office to test it, hopefully I will
get one next week.
> >I also aggree with you with the magical ID register. I hate such
> >kind of register with are not documented and may have a value.
> >
> >I have a DT based board yes, but i have also planed to submit my changes
> >and also wanted to implement the autodetection of the chip.
>
> I don't think auto-detection (other than handling the chip as tmp451)
> will be possible, but I am looking forward to seeing your patch(es).
>
Yes, i think autodetection makes it very crapy. May be i will find
another solution.
> >
> >I have also planned (or need) to implement the "n-Factor Correction" for the
> >CPU diodes. There is a register to set this value in the tmp451 and tmp461.
> >Would that make sense to add a DT property for the driver to be able
> >to set this value? What do you think?
> >
> Yes, since this is a board (hardware) property. Other chips have similar
> registers. We'll just have to find a good set of property names and descriptions.
>
Ok, I will find a way to do it :-)
> Thanks,
> Guenter
>
Regards
Andy
next prev parent reply other threads:[~2015-12-10 18:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-10 12:08 [lm-sensors] LM90 driver and ti tmp461 detection Andreas Werner
2015-12-10 12:08 ` Andreas Werner
2015-12-10 16:41 ` Guenter Roeck
2015-12-10 17:12 ` [lm-sensors] " Andreas Werner
2015-12-10 17:12 ` Andreas Werner
2015-12-10 17:43 ` Guenter Roeck
2015-12-10 18:03 ` Andreas Werner [this message]
2015-12-10 18:03 ` Andreas Werner
2015-12-10 17:49 ` Guenter Roeck
2015-12-10 18:09 ` [lm-sensors] " Andreas Werner
2015-12-10 18:09 ` Andreas Werner
2015-12-12 10:08 ` [lm-sensors] " Jean Delvare
2015-12-12 10:08 ` Jean Delvare
2015-12-15 15:11 ` Andreas Werner
2015-12-15 15:11 ` Andreas Werner
2015-12-17 11:48 ` Jean Delvare
2015-12-17 11:48 ` Jean Delvare
2015-12-17 11:54 ` Andreas Werner
2015-12-17 11:54 ` Andreas Werner
2015-12-17 14:57 ` Guenter Roeck
2015-12-17 14:57 ` Guenter Roeck
2015-12-18 8:18 ` Andreas Werner
2015-12-18 8:18 ` Andreas Werner
2015-12-12 11:42 ` Andreas Werner
2015-12-12 11:42 ` Andreas Werner
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=20151210180314.GB28022@awelinux \
--to=andreas.werner@men.de \
--cc=jdelvare@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lm-sensors@lm-sensors.org \
--cc=wni@nvidia.com \
/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.