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

On Tue, May 03, 2016 at 12:41:48PM +0200, Dirk Behme wrote:
> 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.

Hmm, why not allow open to complete, but check the open count when we
receive boot completion status and call zforce_start() there if open
count is not 0?

Thanks.

> 
> 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
> 

-- 
Dmitry

  reply	other threads:[~2016-05-03 16:10 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 ` [PATCH v2 2/4] Input: zforce_ts: Reject open if initialization not finished Dirk Behme
2016-05-03 16:10   ` Dmitry Torokhov [this message]
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=20160503161038.GA21565@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=Knut.Wohlrab@de.bosch.com \
    --cc=dirk.behme@de.bosch.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 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).