OSDN Git Service

Input: st1232 - add IDLE state as ready condition
authorMichael Tretter <m.tretter@pengutronix.de>
Fri, 19 Feb 2021 18:37:00 +0000 (10:37 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 19 Feb 2021 19:03:44 +0000 (11:03 -0800)
commit6524d8eac258452e547f8a49c8a965ac6dd8a161
treee14cfc18bb63a392a4752583a183d639fcda8b10
parent42ffcd1dba1796bcda386eb6f260df9fc23c90af
Input: st1232 - add IDLE state as ready condition

The st1232 can switch from NORMAL to IDLE state after the configured
idle time (by default 8 s). If the st1232 is not reset during probe, it
might already be ready but in IDLE state. Since it does not enter NORMAL
state in this case, probe fails.

Fix the wait function to report the IDLE state as ready, too.

Fixes: f605be6a57b4 ("Input: st1232 - wait until device is ready before reading resolution")
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Link: https://lore.kernel.org/r/20210219110556.1858969-1-m.tretter@pengutronix.de
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/st1232.c