hwmon: (tmp102) Improve handling of initial read delay
authorGuenter Roeck <linux@roeck-us.net>
Mon, 20 Jun 2016 03:34:57 +0000 (20:34 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 12 Jul 2016 21:23:57 +0000 (14:23 -0700)
If the chip was in shutdown mode when the driver was loaded, the first
conversion is ready no more than 35 milli-seconds after the chip was
taken out of shutdown. The driver delay was so far set to 333 ms (HZ / 3),
which is much higher than the maximum time needed by the chip.
Reduce the time to 35 milli-seconds.

Introduce a 'valid' flag to ensure that sensor data is actually read
even if requested less than 333 ms after the driver was loaded.

Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

No differences found