• Guenter Roeck's avatar
    hwmon: (tmp102) Improve handling of initial read delay · 3d8f7a89
    Guenter Roeck authored
    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: default avatarNishanth Menon <nm@ti.com>
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    3d8f7a89
tmp102.c 8.03 KB