All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Sluggish AT91 I2C driver causes SMBus timeouts
@ 2017-10-13  9:27 ` Peter Rosin
  0 siblings, 0 replies; 27+ messages in thread
From: Peter Rosin @ 2017-10-13  9:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Peter Rosin, Rob Herring, Mark Rutland, Nicolas Ferre,
	Alexandre Belloni, Russell King, Guenter Roeck, Jean Delvare,
	devicetree, linux-arm-kernel, linux-hwmon

Hi!

This is a workaround for a problem in the AT91 I2C adapter driver
(or perhaps the hardware?) when it drives the TWI peripheral on an
Atmel sama5d3 chip as I2C.

Apparently, that driver can delay in excess of 100 ms just after
the transfer of the 7th bit of the last byte. When it does this
the I2C bus, when viewed from SMBUS client devices, appears
stuck with SCL low. Some SMBUS devices times out under these
conditions, in particular temperature sensors. The I2C adapter
driver does however not notice the timeout, and thinks the transfer
completed successfully when it finally desides to finish the
transaction. When this happens, the 8th bit of the last byte is
always set, and thus quite possibly corrupted.

The chip this was observed with (an nxp SE97) has a means to disable
the SMBUS timeout detector, which "fixes" things. Do that.

This should probably go to stable?

Previous discussion: https://lkml.org/lkml/2017/10/12/227

Cheers,
Peter

Peter Rosin (2):
  hwmon: (jc42) optionally try to disable the SMBUS timeout
  ARM: dts: at91: disable the nxp,se97b SMBUS timeout on the TSE-850

 Documentation/devicetree/bindings/hwmon/jc42.txt |  4 ++++
 arch/arm/boot/dts/at91-tse850-3.dts              |  1 +
 drivers/hwmon/jc42.c                             | 20 ++++++++++++++++++++
 3 files changed, 25 insertions(+)

-- 
2.11.0

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

end of thread, other threads:[~2017-10-26 13:45 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-13  9:27 [PATCH 0/2] Sluggish AT91 I2C driver causes SMBus timeouts Peter Rosin
2017-10-13  9:27 ` Peter Rosin
2017-10-13  9:27 ` [PATCH 1/2] hwmon: (jc42) optionally try to disable the SMBUS timeout Peter Rosin
2017-10-13  9:27   ` Peter Rosin
2017-10-13  9:27   ` Peter Rosin
2017-10-13 12:51   ` Guenter Roeck
2017-10-13 12:51     ` Guenter Roeck
2017-10-13 13:50   ` Guenter Roeck
2017-10-13 13:50     ` Guenter Roeck
2017-10-13 14:26     ` Peter Rosin
2017-10-13 14:26       ` Peter Rosin
2017-10-13 20:35       ` Guenter Roeck
2017-10-13 20:35         ` Guenter Roeck
2017-10-13 23:44         ` Guenter Roeck
2017-10-13 23:44           ` Guenter Roeck
2017-10-17 22:16         ` Rob Herring
2017-10-17 22:16           ` Rob Herring
2017-10-18  2:38           ` Guenter Roeck
2017-10-18  2:38             ` Guenter Roeck
2017-10-26  6:44             ` Peter Rosin
2017-10-26  6:44               ` Peter Rosin
2017-10-26  6:44               ` Peter Rosin
2017-10-26 13:45               ` Guenter Roeck
2017-10-26 13:45                 ` Guenter Roeck
2017-10-26 13:45                 ` Guenter Roeck
2017-10-13  9:27 ` [PATCH 2/2] ARM: dts: at91: disable the nxp,se97b SMBUS timeout on the TSE-850 Peter Rosin
2017-10-13  9:27   ` [PATCH 2/2] ARM: dts: at91: disable the nxp, se97b " Peter Rosin

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.