Commit efef661d authored by Luca Weiss's avatar Luca Weiss Committed by Dmitry Torokhov

Input: drv260x - sleep between polling GO bit

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: 7132fe4f ("Input: drv260x - add TI drv260x haptics driver")
Signed-off-by: default avatarLuca Weiss <luca@z3ntu.xyz>
Link: https://lore.kernel.org/r/20230430-drv260x-improvements-v1-2-1fb28b4cc698@z3ntu.xyzSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 116721a5
...@@ -435,6 +435,7 @@ static int drv260x_init(struct drv260x_data *haptics) ...@@ -435,6 +435,7 @@ static int drv260x_init(struct drv260x_data *haptics)
} }
do { do {
usleep_range(15000, 15500);
error = regmap_read(haptics->regmap, DRV260X_GO, &cal_buf); error = regmap_read(haptics->regmap, DRV260X_GO, &cal_buf);
if (error) { if (error) {
dev_err(&haptics->client->dev, dev_err(&haptics->client->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment