Add delay after the addressed reset command in mlx90632.c
Subsystems (2)
v4 cover Add delay after the addressed reset command in mlx90632.c
Using the appropriate usleep_range() and stylefixing based on the remarks made by Lars-Peter Clausen <[email protected]>
Slaveyko Slaveykov (1):
drivers: iio: temperature: Add delay after the addressed reset command
in mlx90632.c
drivers/iio/temperature/mlx90632.c | 6 ++++++ 1 file changed, 6 insertions(+)
Signature · 1 line
2.16.2.windows.1
PATCH v4 1/1 drivers: iio: temperature: Add delay after the addressed reset command in mlx90632.c
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
--- drivers/iio/temperature/mlx90632.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/iio/temperature/mlx90632.c +6 -0
@@ -248,6 +248,12 @@ static int mlx90632_set_meas_type(struct regmap *regmap, u8 type)if (ret <0 )return ret; +/* +* 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 +*/ +usleep_range (150 ,200 ); + ret =regmap_write_bits (regmap,MLX90632_REG_CONTROL , (MLX90632_CFG_MTYP_MASK |MLX90632_CFG_PWR_MASK ), (MLX90632_MTYP_STATUS (type) |MLX90632_PWR_STATUS_HALT ));
Signature · 1 line
2.16.2.windows.1
Re: [PATCH v4 1/1] drivers: iio: temperature: Add delay after the addressed reset command in mlx90632.c
Quoted 4 lines · Slaveyko Slaveykov
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
accepted -> accepted.
...
drivers/iio/temperature/mlx90632.c static int mlx90632_set_meas_type(struct regmap *regmap, u8 type) · line 252
Quoted 2 lines
drivers/iio/temperature/mlx90632.c +2
-0+/* +* give the mlx90632 some time to reset properly before sending a new I2C command
give -> Give
Quoted 1 line
+ * if this is not done, the following I2C command(s) will not be accepted
accepted -> accepted.
drivers/iio/temperature/mlx90632.c static int mlx90632_set_meas_type(struct regmap *regmap, u8 type) · line 255
Quoted 2 lines
drivers/iio/temperature/mlx90632.c +2
-0+*/ +usleep_range (150 ,200 );
After addressing above you can take my
Signature · 2 lines
With Best Regards, Andy Shevchenko