All of lore.kernel.org
 help / color / mirror / Atom feed
* Errant readings on LM81 with T2080 SoC
@ 2021-03-07 22:52 ` Chris Packham
  0 siblings, 0 replies; 57+ messages in thread
From: Chris Packham @ 2021-03-07 22:52 UTC (permalink / raw)
  To: jdelvare, Guenter Roeck
  Cc: linux-hwmon, linux-kernel, linux-i2c, linuxppc-dev

Hi,

I've got a system using a PowerPC T2080 SoC and among other things has 
an LM81 hwmon chip.

Under a high CPU load we see errant readings from the LM81 as well as 
actual failures. It's the errant readings that cause the most concern 
since we can easily ignore the read errors in our monitoring application 
(although it would be better if they weren't there at all).

I'm able to reproduce this with a test application[0] that artificially 
creates a high CPU load then by repeatedly checking for the all-1s 
values from the LM81 datasheet[1](page 17). The all-1s readings stick 
out as they are obviously higher than the voltage rails that are 
connected and disagree with measurements taken with a multimeter.

Here's the output from my device

[root@linuxbox ~]# cpuload 90&
[root@linuxbox ~]# (while true; do cat /sys/class/hwmon/hwmon0/in*_input 
| grep '3320\|4383\|6641\|15930\|3586'; sleep 1; done)&
3586
3586
cat: read error: No such device or address
cat: read error: No such device or address
3320
3320
3586
3586
6641
6641
4383
4383

Fundamentally I think this is a problem with the fact that the LM81 is 
an SMBus device but the T2080 (and other Freescale SoCs) uses i2c and we 
emulate SMBus. I suspect the errant readings are when we don't get round 
to completing the read within the timeout specified by the SMBus 
specification. Depending on when that happens we either fail the 
transfer or interpret the result as all-1s.

[0] - https://gist.github.com/cpackham/6356a3a943accebb228135dc10daf721
[1] - https://www.ti.com/lit/ds/symlink/lm81.pdf

^ permalink raw reply	[flat|nested] 57+ messages in thread

end of thread, other threads:[~2021-03-18  5:45 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-07 22:52 Errant readings on LM81 with T2080 SoC Chris Packham
2021-03-07 22:52 ` Chris Packham
2021-03-08  0:31 ` Guenter Roeck
2021-03-08  0:31   ` Guenter Roeck
2021-03-08  2:27   ` Chris Packham
2021-03-08  2:27     ` Chris Packham
2021-03-08  4:37     ` Chris Packham
2021-03-08  4:37       ` Chris Packham
2021-03-08  4:59       ` Guenter Roeck
2021-03-08  4:59         ` Guenter Roeck
2021-03-08 20:27         ` Chris Packham
2021-03-08 20:27           ` Chris Packham
2021-03-08 22:39           ` Guenter Roeck
2021-03-08 22:39             ` Guenter Roeck
2021-03-10  2:19           ` Chris Packham
2021-03-10  2:19             ` Chris Packham
2021-03-10  5:06             ` Guenter Roeck
2021-03-10  5:06               ` Guenter Roeck
2021-03-10 21:48               ` Chris Packham
2021-03-10 21:48                 ` Chris Packham
2021-03-11  7:41                 ` Guenter Roeck
2021-03-11  7:41                   ` Guenter Roeck
2021-03-11  8:18                   ` Wolfram Sang
2021-03-11  8:18                     ` Wolfram Sang
2021-03-11 15:19                     ` Guenter Roeck
2021-03-11 15:19                       ` Guenter Roeck
2021-03-11 21:17                     ` Chris Packham
2021-03-11 21:17                       ` Chris Packham
2021-03-11 21:34                       ` Guenter Roeck
2021-03-11 21:34                         ` Guenter Roeck
2021-03-11 23:47                         ` Chris Packham
2021-03-11 23:47                           ` Chris Packham
2021-03-12  0:07                           ` Guenter Roeck
2021-03-12  0:07                             ` Guenter Roeck
2021-03-12  0:19                             ` Chris Packham
2021-03-12  0:19                               ` Chris Packham
2021-03-12  9:25                         ` David Laight
2021-03-14 21:26                           ` Chris Packham
2021-03-15  9:46                             ` David Laight
2021-03-18  5:44                             ` Wolfram Sang
2021-03-18  5:44                               ` Wolfram Sang
2021-03-18  3:46                         ` Chris Packham
2021-03-18  3:46                           ` Chris Packham
2021-03-18  4:02                           ` Guenter Roeck
2021-03-18  4:02                             ` Guenter Roeck
2021-03-18  5:39                             ` Wolfram Sang
2021-03-18  5:39                               ` Wolfram Sang
2021-03-08 22:10         ` Chris Packham
2021-03-08 22:10           ` Chris Packham
2021-03-09  4:36           ` Chris Packham
2021-03-09  4:36             ` Chris Packham
2021-03-09  5:24             ` Guenter Roeck
2021-03-09  5:24               ` Guenter Roeck
2021-03-09 23:35   ` Chris Packham
2021-03-09 23:35     ` Chris Packham
2021-03-10  3:29     ` Guenter Roeck
2021-03-10  3:29       ` Guenter Roeck

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.