]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 30 Nov 2017 21:12:44 +0000 (13:12 -0800)
commit00d79e032b4309ed2cec28f968cde4072cd545f3
treefc7dc12e54f6468fc0fa657efdf36a602f9304db
parent85515bc5fc7892f1b96b4ede62e0852eec6fbcf2
hwmon: (jc42) optionally try to disable the SMBUS timeout

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.

Cc: stable@vger.kernel.org # 4.9+
Signed-off-by: Peter Rosin <peda@axentia.se>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/devicetree/bindings/hwmon/jc42.txt
drivers/hwmon/jc42.c