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>,
	Dirk Behme <dirk.behme@de.bosch.com>
Subject: [PATCH 2/5] Input: zforce_ts: Reject open if initialization not finished
Date: Wed, 20 Apr 2016 08:54:42 +0200	[thread overview]
Message-ID: <1461135285-17582-2-git-send-email-dirk.behme@de.bosch.com> (raw)
In-Reply-To: <1461135285-17582-1-git-send-email-dirk.behme@de.bosch.com>

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

Response EAGAIN when opening 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>
Signed-off-by: Dirk Behme <dirk.behme@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 0c08220..ddfc120 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;
-- 
2.8.0


  reply	other threads:[~2016-04-20  6:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-20  6:54 [PATCH 1/5] Input: zforce_ts: Reinitialize touch controller when BOOT_COMPLETE received Dirk Behme
2016-04-20  6:54 ` Dirk Behme [this message]
2016-04-20  6:54 ` [PATCH 3/5] Input: zforce_ts: Add device tree support for scanning frequency Dirk Behme
2016-04-25 21:11   ` Dmitry Torokhov
2016-04-27 13:32     ` fixed-term.Oleksij.Rempel
2016-04-27 14:44     ` Rob Herring
2016-04-28  7:11       ` fixed-term.Oleksij.Rempel
2016-04-20  6:54 ` [PATCH 4/5] Input: zforce_ts: Add support for minimum touch size limit Dirk Behme
2016-04-25 21:12   ` Dmitry Torokhov
2016-04-20  6:54 ` [PATCH 5/5] Input: zforce_ts: Fix dual touch recognition Dirk Behme
2016-04-25 21:08   ` 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=1461135285-17582-2-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.