Received: by 10.213.65.68 with SMTP id h4csp2153568imn; Sun, 8 Apr 2018 21:05:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/BRvrRKx2wspw9w9b8m+iqf/KGluvdqRR0aVZ2tU8TboJy7baWGTbAkaQeZljfL6c4qGwB X-Received: by 10.167.134.1 with SMTP id p1mr11913859pfn.77.1523246744924; Sun, 08 Apr 2018 21:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523246744; cv=none; d=google.com; s=arc-20160816; b=kvA8j+FxU/TDOvDCtZRc6it5X9YxedpY6GmJHYDrYlrhTSagMpCGkb92hT0zKAn/04 p8xLtWVbqWYJAEaHHhqIWWnXivZdTJZ2bLEXN5bcvjsFWbdowoBJdE6+v1n+XwXpI622 nTnEJY4EGdJKuAVhWcKaio5hKyBr6SFLw/AihUEyi15zMOclyu4taK9kmSOgxYfHdKib MRZ4hbc6ygm8boudOiYZyRzAuzi//BLyML83jKTeafcoxSb76RAYPTmcAaopNJOyE3yJ uweRd3VgfQQiZm7ExKgKHoeXYt/CUUZkR2y5ft18i6f+Y8KKCxKmstWv4pa1Zu/CRygI nIQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Q9eETulSaBbfndVrXiKUDg8bvkXydGYYPHyu+DkjrNg=; b=MC1wYQCZ2oz0X+cp2Swi4Tq9wIwtmUufHYnqE75YU3z/7aekNBM3TT2zXzdMGAScb8 WeXNrwPQZD47vy8kgQ7UUvyLT5ZnWRbWLhRUXWeeHuCOvJWYq0f5ki4rcCuHQMLIIbFC zQnAPzYXz+ySVGzf5b7BF1C30S52PXHs1qWMLtWCsdxh0zUZxmLXTA1uO2SidyzbekVB jKM3FmbAvshJNbWRskpZcns5FXy3iu6QNKTHcOUxjEaJkmmtGb4yjntQHV/OrVEOU5Ol Rr1Oq/NiizrM3zL7CsV+0MWoBJTK2Vjpb8ZNQdUZlyRZn4QaX8Ldanqi+Na6vXbJL50N 4K/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=U0QelXf+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f64-v6si13703014plf.624.2018.04.08.21.05.07; Sun, 08 Apr 2018 21:05:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=U0QelXf+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754637AbeDID6p (ORCPT + 99 others); Sun, 8 Apr 2018 23:58:45 -0400 Received: from mail-bn3nam01on0092.outbound.protection.outlook.com ([104.47.33.92]:62923 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753676AbeDIASh (ORCPT ); Sun, 8 Apr 2018 20:18:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Q9eETulSaBbfndVrXiKUDg8bvkXydGYYPHyu+DkjrNg=; b=U0QelXf+4Bh/KaCY41b5/IRB5YyamX/TGdROO05hUka94RV35CqQMTKZIPN64XcB3U3vnXjorY6im//vsjJApCnK6dNaldqgBk36T2vxM8xfglzbL7PyXNBoODKktqUwvJDNpHDOHJjs5/gf2MIQemSbC7fc34ip3QRDZofr76g= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1128.namprd21.prod.outlook.com (52.132.133.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:18:34 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:18:34 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Andi Shyti , Dmitry Torokhov , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 072/189] Input: stmfts - set IRQ_NOAUTOEN to the irq flag Thread-Topic: [PATCH AUTOSEL for 4.15 072/189] Input: stmfts - set IRQ_NOAUTOEN to the irq flag Thread-Index: AQHTz5gs0UlQqGXDx0OxIzwAXqYNlA== Date: Mon, 9 Apr 2018 00:17:41 +0000 Message-ID: <20180409001637.162453-72-alexander.levin@microsoft.com> References: <20180409001637.162453-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001637.162453-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB1128;7:n5he95ivgcgU5JKRn+mwrThld6WSprDohyg8fx6gzylG3Yy/TBeNVn0tEQCeGDsR7+WeTrlgvozVPyLaUzHTUDF8sV9e3/gI0lq+0tXlKD5owaTVXUDSStNM3JbW2PwembSN9ZSz/9EkpdrFUy63aUCGkkvJnmQjlkk13J8zac3WirVJDHHlxAfYJk1x6aZb+oaOgmGvryTDAh6BV+6AYy1RCgbsh20ymyywnDx/pOXNRNRFF/T/nRsV8VAT3GTj;20:gJ6ixaOg0n16dj5vpMYYuC/Hdq2dL4rFJOjJNpe5uEEXx6i9BG2IIY3oKIUiFv/F8GIpFzLpLZbOqWFitaMcKbtO3pw15NXiaoHnyU95U1jCQtprTs35u8HNR+3DGqWLFqh+T6Y7Pgx2bqipwY7lFIPly4TykP54WbVYWKtmltU= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: c005b4ce-ff84-4882-c4ae-08d59daf6e96 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1128; x-ms-traffictypediagnostic: DM5PR2101MB1128: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158)(7411616537696); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB1128;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1128; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(346002)(39860400002)(396003)(376002)(366004)(39380400002)(199004)(189003)(66066001)(86362001)(59450400001)(3660700001)(3280700002)(2900100001)(25786009)(36756003)(6506007)(76176011)(2906002)(6486002)(86612001)(99286004)(102836004)(1076002)(7736002)(97736004)(2616005)(446003)(486006)(11346002)(476003)(26005)(305945005)(39060400002)(6666003)(6512007)(4326008)(107886003)(478600001)(6436002)(5660300001)(10290500003)(5250100002)(22452003)(316002)(105586002)(186003)(8676002)(110136005)(54906003)(72206003)(53936002)(2501003)(68736007)(14454004)(6116002)(8936002)(3846002)(81156014)(10090500001)(106356001)(81166006)(22906009)(40753002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1128;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: Jfu80g1d/DWyh+MEMXOPHauxOG8zgQxjfg51Gcovwbs55MH1TWQdkKwIepV0lzhT57BCFNwazG09MFNWp5d8is+FTdw4Fltd9p50SzJs2PFP53xfN10nY/acKY9Pv7yFErQZL6HHCXGuwCkM36ZmJLIyuDqE7z3pj4565btt72Sha6GWgW4IKzkSaIF2fGXGLlFc8tV1HTjH0nYDWlpCsK8VvcZMNvhn212zaTSTLd+8oqt7CD5AwQjmDPkydreKvfyKxxXWz07PWwwFnD+V+3Bip6KKyb2FUUrCpTYDr1xwwnIppjA0v0tVJ5MFDf0VJ+9XTD67zXkSgpBxkbpigqA7NuqzD7O24Cj4YH0w65Sp2KrZBtNjedMl74dZpB0x8SpFlUlpth26qu7yAPIoIQ8C1/Z6tpTu2GgWgv2icqs= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: c005b4ce-ff84-4882-c4ae-08d59daf6e96 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:17:41.6490 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1128 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andi Shyti [ Upstream commit cba04cdf437d745fac85220d1d692a9ae23d7004 ] The interrupt is requested before the device is powered on and it's value in some cases cannot be reliable. It happens on some devices that an interrupt is generated as soon as requested before having the chance to disable the irq. Set the irq flag as IRQ_NOAUTOEN before requesting it. This patch mutes the error: stmfts 2-0049: failed to read events: -11 received sometimes during boot time. Signed-off-by: Andi Shyti Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/touchscreen/stmfts.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/input/touchscreen/stmfts.c b/drivers/input/touchscreen= /stmfts.c index 2a123e20a42e..efdb1a75a163 100644 --- a/drivers/input/touchscreen/stmfts.c +++ b/drivers/input/touchscreen/stmfts.c @@ -682,6 +682,14 @@ static int stmfts_probe(struct i2c_client *client, =20 input_set_drvdata(sdata->input, sdata); =20 + /* + * stmfts_power_on expects interrupt to be disabled, but + * at this point the device is still off and I do not trust + * the status of the irq line that can generate some spurious + * interrupts. To be on the safe side it's better to not enable + * the interrupts during their request. + */ + irq_set_status_flags(client->irq, IRQ_NOAUTOEN); err =3D devm_request_threaded_irq(&client->dev, client->irq, NULL, stmfts_irq_handler, IRQF_ONESHOT, @@ -689,9 +697,6 @@ static int stmfts_probe(struct i2c_client *client, if (err) return err; =20 - /* stmfts_power_on expects interrupt to be disabled */ - disable_irq(client->irq); - dev_dbg(&client->dev, "initializing ST-Microelectronics FTS...\n"); =20 err =3D stmfts_power_on(sdata); --=20 2.15.1