Commit 8e6a8b0c authored by Jeff LaBundy's avatar Jeff LaBundy Committed by Dmitry Torokhov

Input: iqs5xx - allow more time for ATI to complete

After the device is initialized, it runs ATI (calibration) during
which it cannot readily respond to I2C communication. To keep the
open and close callbacks from writing to the device too soon, the
driver waits 100 ms before returning from probe.

The vendor reports that ATI may actually take up to 250 ms to run
(including margin), so increase the delay accordingly. Update the
comments to clarify the reason for the delay as well.
Signed-off-by: default avatarJeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/1611002626-5889-9-git-send-email-jeff@labundy.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 050fac7f
...@@ -643,13 +643,12 @@ static int iqs5xx_dev_init(struct i2c_client *client) ...@@ -643,13 +643,12 @@ static int iqs5xx_dev_init(struct i2c_client *client)
iqs5xx->bl_status = dev_id_info->bl_status; iqs5xx->bl_status = dev_id_info->bl_status;
/* /*
* Closure of the first communication window that appears following the * The following delay allows ATI to complete before the open and close
* release of reset appears to kick off an initialization period during * callbacks are free to elicit I2C communication. Any attempts to read
* which further communication is met with clock stretching. The return * from or write to the device during this time may face extended clock
* from this function is delayed so that further communication attempts * stretching and prompt the I2C controller to report an error.
* avoid this period.
*/ */
msleep(100); msleep(250);
return 0; return 0;
} }
......
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