After an I2C reset command, the mlx90632 needs some time before responding to other I2C commands. Without that delay, there is a chance that the I2C command(s) after the reset will not be accepted Signed-off-by: Slaveyko Slaveykov <sis@xxxxxxxxxxx> --- drivers/iio/temperature/mlx90632.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c index 503fe54a0bb9..f0eaadec11eb 100644 --- a/drivers/iio/temperature/mlx90632.c +++ b/drivers/iio/temperature/mlx90632.c @@ -247,6 +247,8 @@ static int mlx90632_set_meas_type(struct regmap *regmap, u8 type) ret = regmap_write(regmap, MLX90632_REG_I2C_CMD, MLX90632_RESET_CMD); if (ret < 0) return ret; + usleep(150, 200); //give the mlx90632 some time to reset properly before sending a new I2C command + //if this is not done, the following I2C command(s) will not be accepted ret = regmap_write_bits(regmap, MLX90632_REG_CONTROL, (MLX90632_CFG_MTYP_MASK | MLX90632_CFG_PWR_MASK), -- 2.16.2.windows.1