Add a small delay between two consecutive access to the same sensor.
authorNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 13 Sep 2016 16:24:44 +0000 (18:24 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Fri, 10 Feb 2023 18:02:59 +0000 (19:02 +0100)
extdrv/tmp101_temp_sensor.c

index 81af7f5..3d1313e 100644 (file)
@@ -160,6 +160,7 @@ int tmp101_sensor_config(struct tmp101_sensor_config* conf)
        conf->actual_config = (TMP_SHUTDOWN_MODE_ON | TMP_THERMOSTAT_INTERRUPT_MODE | TMP_ALERT_POLARITY_HIGH);
        conf->actual_config |= (conf->resolution & (0x03 << 5));
        cmd[2] = conf->actual_config;
+       msleep(1);
        ret = i2c_write(conf->bus_num, cmd, 3, NULL);
        conf->last_accessed_register = TMP_REG_CONFIG;
        if (ret == 3) {