]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (sht3x) wait predefined limits loading complete before access
authorEmiliano Ingrassia <ingrassia@epigenesys.com>
Fri, 12 Jan 2018 20:42:28 +0000 (21:42 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 12 Jan 2018 22:18:39 +0000 (14:18 -0800)
commit300ccbcf64437975605c03b3a87cc0ff74d39fd3
tree8d52e3b9df9910862401d0bd3b725e7b968c4bd1
parentd5065002864d7fcdcfe3fa0fa7b56cf841cf8beb
hwmon: (sht3x) wait predefined limits loading complete before access

An sht3x sensor include limits register which contains temperature
and humidity limit values. After a reset, pre-defined values are loaded
into that register. During the probe function, the driver reads the
limits register. However, if the reads are made too early, and the bus
is clocked at high frequencies (e.g. 100 kHz or more), the loading could be
not completed and the sensor returns a NACK which causes the probe to fail.
A delay of at least 500 us before the first read solves this issue.

Signed-off-by: Emiliano Ingrassia <ingrassia@epigenesys.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/sht3x.c