Message ID | 1462272110-24610-3-git-send-email-dirk.behme@de.bosch.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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 >
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;