From patchwork Wed Apr 20 06:54:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Behme X-Patchwork-Id: 8886351 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C88A0BF29F for ; Wed, 20 Apr 2016 06:54:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C922E20268 for ; Wed, 20 Apr 2016 06:54:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 106E220251 for ; Wed, 20 Apr 2016 06:54:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754039AbcDTGyw (ORCPT ); Wed, 20 Apr 2016 02:54:52 -0400 Received: from smtp6-v.fe.bosch.de ([139.15.237.11]:55480 "EHLO smtp6-v.fe.bosch.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752806AbcDTGyw (ORCPT ); Wed, 20 Apr 2016 02:54:52 -0400 Received: from vsmta11.fe.internet.bosch.com (unknown [10.4.98.51]) by imta23.fe.bosch.de (Postfix) with ESMTP id 21412158016B for ; Wed, 20 Apr 2016 08:54:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=de.bosch.com; s=2015-01-21; t=1461135290; bh=k4zy/emm2f7S3+9DfeQqfI5zbI9O08zzWPf5soRgPPs=; l=10; h=From:From:Reply-To:Sender; b=F5gIe/Xt3Jpg89uKVftb2kTxvLOpNlH+9/pAtelvD26EXJ4fIba8CYtoXKua8OLu3 9CNB2xjbkMg8qj6ybsaQj1q0sjWwdoBcpdKcq1fJTM8fb0eoZvpIKpAJzblmZY9W+m O4Sn4MAerWud8Evy8FEDB5HFAjjb9x/WpnYV/BjI= Received: from FE-HUB1000.de.bosch.com (vsgw22.fe.internet.bosch.com [10.4.98.11]) by vsmta11.fe.internet.bosch.com (Postfix) with ESMTP id CB5AE2380356 for ; Wed, 20 Apr 2016 08:54:49 +0200 (CEST) Received: from hi-z5661.hi.de.bosch.com (10.34.211.95) by FE-HUB1000.de.bosch.com (10.4.103.107) with Microsoft SMTP Server id 14.3.195.1; Wed, 20 Apr 2016 08:54:48 +0200 Received: from hi-z5661.hi.de.bosch.com (localhost [127.0.0.1]) by hi-z5661.hi.de.bosch.com (Postfix) with ESMTP id BF01A417EA; Wed, 20 Apr 2016 08:54:48 +0200 (CEST) From: Dirk Behme To: , Dmitry Torokhov , Henrik Rydberg , Javier Martinez Canillas CC: Oleksij Rempel , Oleksij Rempel , Knut Wohlrab , Dirk Behme Subject: [PATCH 2/5] Input: zforce_ts: Reject open if initialization not finished Date: Wed, 20 Apr 2016 08:54:42 +0200 Message-ID: <1461135285-17582-2-git-send-email-dirk.behme@de.bosch.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1461135285-17582-1-git-send-email-dirk.behme@de.bosch.com> References: <1461135285-17582-1-git-send-email-dirk.behme@de.bosch.com> MIME-Version: 1.0 X-TM-AS-MML: disable X-TM-AS-Product-Ver: IMSS-7.1.0.1679-8.0.0.1202-22270.006 X-TMASE-MatchedRID: ezARIB9Q5LBCFB6Gxes2BkKcYi5Qw/RVCt59Uh3p/NW8WxtJQGphFAto OXZLt8j5o5xjeR09ATqtvE335xipTGBndBLpnOXPLtPmqmahbeJMkOX0UoduuR/H14cDyzexo8W MkQWv6iXBcIE78YqRWo6HM5rqDwqtnoDlDIBlfQRWcIyAoV1mOrdDgsy23/oJEyMkAEEYkT4Faf 8GgjoxgEMMprcbiest Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Oleksij Rempel 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 Signed-off-by: Knut Wohlrab Signed-off-by: Dirk Behme --- 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;