Thread (30 messages) 30 messages, 4 authors, 2021-03-18

Re: Errant readings on LM81 with T2080 SoC

From: Guenter Roeck <linux@roeck-us.net>
Date: 2021-03-10 03:30:28
Also in: linux-hwmon, linux-i2c, lkml

On 3/9/21 3:35 PM, Chris Packham wrote:
On 8/03/21 1:31 pm, Guenter Roeck wrote:
quoted
On 3/7/21 2:52 PM, Chris Packham wrote:
quoted
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.
That is quite unlikely. Many sensor chips are SMBus chips connected to
i2c busses. It is much more likely that there is a bug in the T2080 i2c driver,
that the chip doesn't like the bulk read command issued through regmap, that
the chip has problems with the i2c bus speed, or that the i2c bus is noisy.
I have noticed that with the switch to regmap we end up using plain i2c 
instead of SMBUS. There appears to be no way of saying use SMBUS 
semantics if the i2c adapter reports I2C_FUNC_I2C.
The driver only really supports I2C; SMBUS functions are emulated.
I don't think that makes a real difference.

Guenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help