Received: by 10.213.65.68 with SMTP id h4csp2125142imn; Sun, 8 Apr 2018 20:19:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Nw7DbtTyq/kzXU0NiYJJWy9vwrDoBOs85+JiYOXudAmY5kWYX1GqsT42x3t63ICWS/IoX X-Received: by 2002:a17:902:52a4:: with SMTP id a33-v6mr29998631pli.371.1523243998726; Sun, 08 Apr 2018 20:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243998; cv=none; d=google.com; s=arc-20160816; b=SW3eo+M9QT0Gbsm4lGaqAePPXhkZQFD3K19SBUa7u2Ww0GFna2mE2+fjHu7OFl4ylr SxMVZphbjs2VMfp/nNHGWVMOQJfiN76N4467n3mza3raGm/7DPh9Or3naOl0PI6FGrKu hUnk+2xZDkQ4mfDpGKi7sQJ7vjrpKMZ3ifk0sXM/n1kv3KSSJbq352z7j6RyeJeDdTjs xpy2DATS0xjVnQNzw1BpRW65jJcVJBqR903SYdqHedeBMIm0Tx8n7psl/AoW8+tsJrSB G3LPmxl4vM4efXFVafk2X8DFVcX7VyP0w7ZFAhygxQ9/vktWFiIcgCPhCtK+hBW9GgrE KgIA== 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=SrWs4p6g8Unv2pRMU9cVQqldkyFFpCiDDdU9ooTe/qY=; b=QjA7C73Cj/H1OOpe4gnT21trOligr1iLljZA1YOktwpXnT170fZ/HAar3UfrBNjVd6 vdnZyT+BaN8+CzwWkaMhjq3YTDTsC8skkGR61q1Bpuga0nQLwGTSJy0DFSQC/FrYR0OD T1G855hP7PEmRdo4IVzGfubb4ujMamswsg3Xw95PNdpgRPe8yDO5AXLbJGAzHph/FyJ6 wONE5P0i/W/f/bL4pZfT1Uwz2s1wYoq28PFpkvc43zAqZxGMs8ADE64H9InTXUeaXIL6 F2P1jCZ4kkP/q6GI7U63wCa1aeTvqsyj9x2OWfNEofUSxYMHjRVp/zyQVoQmzUxQzFp5 isUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=nSu3hih3; 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 x190si10678202pgx.378.2018.04.08.20.19.21; Sun, 08 Apr 2018 20:19:58 -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=nSu3hih3; 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 S1752077AbeDIDQq (ORCPT + 99 others); Sun, 8 Apr 2018 23:16:46 -0400 Received: from mail-by2nam03on0115.outbound.protection.outlook.com ([104.47.42.115]:29467 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754886AbeDIAXh (ORCPT ); Sun, 8 Apr 2018 20:23: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=SrWs4p6g8Unv2pRMU9cVQqldkyFFpCiDDdU9ooTe/qY=; b=nSu3hih3PGAkmUqGi7SQSRAL+amQ/Z2QXrypeE1Y4yMxOJtbFQupvNEJ76fyllBNI+oSnwxpry90N1ZNALQy9DRl7QJpUejoOHEkEFn/lItJjqeulgq2nebVc3w9Fx7eoB3+GgLaf6kXA955DvF7UazQocfQknucEDO9moWmBTs= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1080.namprd21.prod.outlook.com (52.132.130.14) 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:23:36 +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:23:36 +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.14 061/161] Input: stmfts - set IRQ_NOAUTOEN to the irq flag Thread-Topic: [PATCH AUTOSEL for 4.14 061/161] Input: stmfts - set IRQ_NOAUTOEN to the irq flag Thread-Index: AQHTz5iUxOBDJ2k1fUWQ3LsVZuWx3A== Date: Mon, 9 Apr 2018 00:20:35 +0000 Message-ID: <20180409001936.162706-61-alexander.levin@microsoft.com> References: <20180409001936.162706-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001936.162706-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;DM5PR2101MB1080;7:ANG2GHbU4JIPyY3XAtNUu+TpZVD2c7vrN4iMixeuohvrTyVZGZ5U79xPA1Pc4oCsVg27FIOlVTCaA9R3yAWigWH5vIlpagKPAEcweDDhW1TvDW9ycRvOYyFEZUTWM3yy4BDdVS0+MGMwl7OLZejNngFRzKzJa52zrcDDIklrhp23Cb+31Xgf+8cZEbDehFgzFp6CrSikUU/wk+kjAVii75cyoZERxN0qSqZDb4dKv9yM6IkWpXAsKmlcbcZNyct+;20:AQ0O2o6rBkrpQROzAFplD/x+Hh9bCyctxNLnjwYxoW5MOmNGncBscvI5OoYVhJtfU4eg6sF42c0silSIw8NEFv0wJrTfjkz4NCQMpJ7bhAt29twTHAKdQjGr1I/aETdHc/AzJ3zPK1e8q72i+FmzFyXLE/Aw2r/mjRyggsBF1CE= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 6afad3b9-151d-47e1-7194-08d59db022b2 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB1080; x-ms-traffictypediagnostic: DM5PR2101MB1080: 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)(10201501046)(93006095)(93001095)(3002001)(3231221)(944501327)(52105095)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB1080;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB1080; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(376002)(346002)(396003)(39380400002)(366004)(39860400002)(199004)(189003)(2501003)(5250100002)(8936002)(10090500001)(5660300001)(3660700001)(446003)(107886003)(14454004)(36756003)(6436002)(39060400002)(476003)(3280700002)(2616005)(11346002)(4326008)(53936002)(6512007)(22452003)(305945005)(10290500003)(316002)(102836004)(2906002)(6116002)(66066001)(6506007)(3846002)(7736002)(486006)(54906003)(110136005)(186003)(72206003)(26005)(1076002)(105586002)(2900100001)(6486002)(97736004)(478600001)(81156014)(81166006)(86612001)(8676002)(106356001)(99286004)(86362001)(76176011)(59450400001)(68736007)(25786009)(22906009)(40753002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB1080;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: 2eXaDeA+kP+fhqve4n7LGTR+SZZn4mbUqbe5cZz9Td4NUwgMmmuKTvs5ptpwWGrgoNED1TkmqYXKPwZL/UQVn2qsYJ4+kD04PLsKNxjlgpux0yV0olqXNZ8Uu+kCS3kLHFErHWnsO9DlSJ2/M9QDeFjkgoOnnXMQ9KkrtrGCyfK1rCcrXeEdbUuOiS6U8GOoDbt6olXgGQdL8KmJqyWy2b6fSR6r4684/LNmH8Duj8BlZrH/Sxhg8X6/bC+OjRYg+764C+fDyPfSCyvZgj6H4riSv+pl8R16Tc0Xw0RBHPFya5rjq6sk2SNcpcFLcw07Vy2qoebs8oioVWNpZwNKkyrJocC0jh21WDDKtcQIbM/bnJJb3YxToel2a3D9WoOdkAOtDqfwa1ooZ1TrGDBIw6YeogStq+zMwckjSJMCpsY= 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: 6afad3b9-151d-47e1-7194-08d59db022b2 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:20:35.7692 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1080 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 8c6c6178ec12..025bae3853cc 100644 --- a/drivers/input/touchscreen/stmfts.c +++ b/drivers/input/touchscreen/stmfts.c @@ -687,6 +687,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, @@ -694,9 +702,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