]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: stmpe: Fix RESET regression on STMPE2401
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 1 Nov 2016 09:22:53 +0000 (10:22 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 16 Nov 2016 09:50:33 +0000 (09:50 +0000)
commit29475b0559162e47545d338942e0471a8adece85
treeb165c82493622e97536f4bd5cae953a6b050ab1e
parent1733f98cfa05f29ad599283f496bc6bde1e2e8c8
mfd: stmpe: Fix RESET regression on STMPE2401

Since commit d60fc055eb73c35a6db0bc6e89add74e40cc9543
("mfd: stmpe: Add reset support for all STMPE variant")
we're resetting the STMPE expanders before use.

This caused a regression on the STMP2401 on the Nomadik
NHK8815:

stmpe-i2c 0-0043: stmpe2401 detected, chip id: 0x101
nmk-i2c 101f8000.i2c0: write to slave 0x43 timed out
nmk-i2c 101f8000.i2c0: no ack received after address transmission
stmpe-i2c 0-0044: stmpe2401 detected, chip id: 0x101
nmk-i2c 101f8000.i2c0: write to slave 0x44 timed out
nmk-i2c 101f8000.i2c0: no ack received after address transmission

It turns out that we start to poll for the reset bit to
go low again too quickly: the STMPE2401 is not yet online and
ready to be asked for the status of the RESET bit.

By introducing a 10ms delay before starting to hammer
the register for information, we get back to normal:

stmpe-i2c 0-0043: stmpe2401 detected, chip id: 0x101
stmpe-i2c 0-0044: stmpe2401 detected, chip id: 0x101

Cc: stable@vger.kernel.org
Cc: Amelie Delaunay <amelie.delaunay@st.com>
Fixes: d60fc055eb73 ("mfd: stmpe: Add reset support for all STMPE variant")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/stmpe.c