All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dirk Behme <dirk.behme@de.bosch.com>
To: linux-input@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Henrik Rydberg <rydberg@bitmath.org>,
	Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Oleksij Rempel <linux@rempel-privat.de>,
	Oleksij Rempel <fixed-term.Oleksij.Rempel@de.bosch.com>,
	Knut Wohlrab <Knut.Wohlrab@de.bosch.com>
Subject: [PATCH v2 2/4] Input: zforce_ts: Reject open if initialization not finished
Date: Tue, 3 May 2016 12:41:48 +0200	[thread overview]
Message-ID: <1462272110-24610-3-git-send-email-dirk.behme@de.bosch.com> (raw)
In-Reply-To: <1462272110-24610-1-git-send-email-dirk.behme@de.bosch.com>

From: Oleksij Rempel <linux@rempel-privat.de>

Response EAGAIN when open the device while BOOT_COMPLETE
notification is not received and initialization of the zForce touch
controller is not finished.

Signed-off-by: Oleksij Rempel <fixed-term.Oleksij.Rempel@de.bosch.com>
Signed-off-by: Knut Wohlrab <Knut.Wohlrab@de.bosch.com>
---
 drivers/input/touchscreen/zforce_ts.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c
index 9839d86..fc0edd6 100644
--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -690,6 +690,10 @@ static int zforce_input_open(struct input_dev *dev)
 	struct zforce_ts *ts = input_get_drvdata(dev);
 	int ret;
 
+	/* if not probed try again later */
+	if (ts->state == ZF_STATE_UNINITIALZED)
+		return -EAGAIN;
+
 	ret = zforce_start(ts);
 	if (ret)
 		return ret;
-- 
1.9.1


  parent reply	other threads:[~2016-05-03 10:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 10:41 [PATCH v2 0/4] zForce upstreaming Dirk Behme
2016-05-03 10:41 ` [PATCH v2 1/4] Input: zforce_ts: Reinitialize touch controller when BOOT_COMPLETE received Dirk Behme
2016-05-03 10:41 ` Dirk Behme [this message]
2016-05-03 16:10   ` [PATCH v2 2/4] Input: zforce_ts: Reject open if initialization not finished Dmitry Torokhov
2016-05-03 10:41 ` [PATCH v2 3/4] Input: zforce_ts: Add device tree support for scanning frequency Dirk Behme
2016-05-03 10:41 ` [PATCH v2 4/4] Input: zforce_ts: Add support for minimum touch size limit Dirk Behme
2016-05-03 16:12   ` Dmitry Torokhov

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=1462272110-24610-3-git-send-email-dirk.behme@de.bosch.com \
    --to=dirk.behme@de.bosch.com \
    --cc=Knut.Wohlrab@de.bosch.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=fixed-term.Oleksij.Rempel@de.bosch.com \
    --cc=javier@osg.samsung.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=rydberg@bitmath.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.