From: Slaveyko Slaveykov <sis@melexis.com>
To: Jonathan.Cameron@huawei.com, cmo@melexis.com
Cc: linux-iio@vger.kernel.org, Slaveyko Slaveykov <sis@melexis.com>
Subject: [PATCH] drivers: iio: temperature: Add delay after the addressed reset command in mlx90632.c
Date: Fri, 11 Dec 2020 13:12:54 +0200 [thread overview]
Message-ID: <20201211111254.9376-1-sis@melexis.com> (raw)
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@melexis.com>
---
drivers/iio/temperature/mlx90632.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/temperature/mlx90632.c b/drivers/iio/temperature/mlx90632.c
index 503fe54a0bb9..ee50f61e496a 100644
--- a/drivers/iio/temperature/mlx90632.c
+++ b/drivers/iio/temperature/mlx90632.c
@@ -247,6 +247,7 @@ 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);
ret = regmap_write_bits(regmap, MLX90632_REG_CONTROL,
(MLX90632_CFG_MTYP_MASK | MLX90632_CFG_PWR_MASK),
--
2.16.2.windows.1
next reply other threads:[~2020-12-11 11:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 11:12 Slaveyko Slaveykov [this message]
2020-12-12 12:29 ` [PATCH] drivers: iio: temperature: Add delay after the addressed reset command in mlx90632.c Crt Mori
2020-12-12 18:44 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201211111254.9376-1-sis@melexis.com \
--to=sis@melexis.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=cmo@melexis.com \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox