From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Oliver Graute <oliver.graute@kococonnector.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Input: edt-ft5x06 - always do msleep(300) during initialization
Date: Fri, 2 Dec 2022 11:57:59 +0100 [thread overview]
Message-ID: <20221202105800.653982-1-linux@rasmusvillemoes.dk> (raw)
We have a board with an FT5446, which is close enough to a
FT5506 (i.e. it also supports up to 10 touch points and has similar
register layout) for this driver to work. However, on our board the
iovcc and vcc regulators are indeed controllable (so not always-on),
but there is no reset or wakeup gpio hooked up.
Without a large enough delay between the regulator_enable() calls and
edt_ft5x06_ts_identify(), the first edt_ft5x06_ts_readwrite() call
fails with -ENXIO and thus the device fails to probe. So
unconditionally do an mdelay(300) instead of only when a reset-gpio is
present.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
drivers/input/touchscreen/edt-ft5x06.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
index 9ac1378610bc..8bafa123083c 100644
--- a/drivers/input/touchscreen/edt-ft5x06.c
+++ b/drivers/input/touchscreen/edt-ft5x06.c
@@ -1239,8 +1239,8 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client,
if (tsdata->reset_gpio) {
usleep_range(5000, 6000);
gpiod_set_value_cansleep(tsdata->reset_gpio, 0);
- msleep(300);
}
+ msleep(300);
input = devm_input_allocate_device(&client->dev);
if (!input) {
--
2.37.2
next reply other threads:[~2022-12-02 10:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-02 10:57 Rasmus Villemoes [this message]
2022-12-02 18:23 ` [PATCH] Input: edt-ft5x06 - always do msleep(300) during initialization Jeff LaBundy
2022-12-02 20:34 ` Dmitry Torokhov
2022-12-04 16:43 ` Mark Brown
2022-12-05 8:59 ` Rasmus Villemoes
2022-12-06 3:00 ` Jeff LaBundy
2023-01-03 10:54 ` Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221202105800.653982-1-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=dario.binacchi@amarulasolutions.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oliver.graute@kococonnector.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).