hwmon: (jc42) optionally try to disable the SMBUS timeout
authorPeter Rosin <peda@axentia.se>
Mon, 27 Nov 2017 16:31:00 +0000 (17:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Dec 2017 10:26:34 +0000 (11:26 +0100)
commitde120fc9624162a3507091d6b92dd9037440c9d8
tree45bdc211f2ffafd7b1fa53b37734bec4014916f8
parent1cafc451a955c44ec7eba47bae340d9ca5ccb483
hwmon: (jc42) optionally try to disable the SMBUS timeout

commit 68615eb01f82256c19e41967bfb3eef902f77033 upstream.

With a nxp,se97 chip on an atmel sama5d31 board, the I2C adapter driver
is not always capable of avoiding the 25-35 ms timeout as specified by
the SMBUS protocol. This may cause silent corruption of the last bit of
any transfer, e.g. a one is read instead of a zero if the sensor chip
times out. This also affects the eeprom half of the nxp-se97 chip, where
this silent corruption was originally noticed. Other I2C adapters probably
suffer similar issues, e.g. bit-banging comes to mind as risky...

The SMBUS register in the nxp chip is not a standard Jedec register, but
it is not special to the nxp chips either, at least the atmel chips
have the same mechanism. Therefore, do not special case this on the
manufacturer, it is opt-in via the device property anyway.

Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devicetree/bindings/hwmon/jc42.txt
drivers/hwmon/jc42.c