[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c009a2b7-b15c-b9e6-a7d6-98d6b1039512@roeck-us.net>
Date: Tue, 9 Mar 2021 19:29:23 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Chris Packham <Chris.Packham@...iedtelesis.co.nz>,
"jdelvare@...e.com" <jdelvare@...e.com>
Cc: "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
Subject: Re: Errant readings on LM81 with T2080 SoC
On 3/9/21 3:35 PM, Chris Packham wrote:
>
> On 8/03/21 1:31 pm, Guenter Roeck wrote:
>> On 3/7/21 2:52 PM, Chris Packham wrote:
>>> 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
Powered by blists - more mailing lists