Input: drv260x - sleep between polling GO bit

[ Upstream commit efef661dfa ]

When doing the initial startup there's no need to poll without any
delay and spam the I2C bus.

Let's sleep 15ms between each attempt, which is the same time as used
in the vendor driver.

Fixes: 7132fe4f56 ("Input: drv260x - add TI drv260x haptics driver")
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Link: https://lore.kernel.org/r/20230430-drv260x-improvements-v1-2-1fb28b4cc698@z3ntu.xyz
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Luca Weiss 2023-05-01 17:01:45 -07:00 коммит произвёл Greg Kroah-Hartman
Родитель efb61a7185
Коммит 26a0ba5d16
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -435,6 +435,7 @@ static int drv260x_init(struct drv260x_data *haptics)
}
do {
usleep_range(15000, 15500);
error = regmap_read(haptics->regmap, DRV260X_GO, &cal_buf);
if (error) {
dev_err(&haptics->client->dev,