]> git.baikalelectronics.ru Git - kernel.git/commit
Input: st1232 - increase "wait ready" timeout
authorJohn Keeping <john@metanate.com>
Wed, 6 Oct 2021 18:06:03 +0000 (11:06 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 12 Oct 2021 01:32:54 +0000 (18:32 -0700)
commit29f076708b799218af5fe5af61ece91a22c369da
tree23a40e1162f578a91d7dbaf8d9204bab37bb3e9e
parenta8eafea0c04fe371082548d995cfc779a665c42f
Input: st1232 - increase "wait ready" timeout

I have a ST1633 touch controller which fails to probe due to a timeout
waiting for the controller to become ready.  Increasing the minimum
delay to 100ms ensures that the probe sequence completes successfully.

The ST1633 datasheet says nothing about the maximum delay here and the
ST1232 I2C protocol document says "wait until" with no notion of a
timeout.

Since this only runs once during probe, being generous with the timout
seems reasonable and most likely the device will become ready
eventually.

(It may be worth noting that I saw this issue with a PREEMPT_RT patched
kernel which probably has tighter wakeups from usleep_range() than other
preemption models.)

Fixes: b57d138621b5 ("Input: st1232 - wait until device is ready before reading resolution")
Signed-off-by: John Keeping <john@metanate.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20210929152609.2421483-1-john@metanate.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/st1232.c