Received: by 10.213.65.68 with SMTP id h4csp1860853imn; Mon, 19 Mar 2018 15:31:16 -0700 (PDT) X-Google-Smtp-Source: AG47ELsl3Twx830jMpfBdTX1EkcuUf5bHDpRti91+yLVSWt7Ag+nU+GKcWXugWUzqaD7Rwyl4sPt X-Received: by 2002:a17:902:7885:: with SMTP id q5-v6mr13824519pll.207.1521498676482; Mon, 19 Mar 2018 15:31:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521498676; cv=none; d=google.com; s=arc-20160816; b=LATmiArEX1DIsxD7Fh3fj6Jrcd++Bj5emPaRShErs1T4BDkPCdPiwYody0oQ/AiJxd ET0twmpt/1Zn4dpIrDjkY7ocT4aYHSr2mPecQsDID6zEO7kTuvmXcfv6t/cDNDRk2lNP AihuIC/cPK6Y8mBntUWurp/TcxC5adBj2a/0FdUI1KjJoVEGBth3Qqms2FVlMAYLJxBD fOSS8fe8qaF2HcEiP9dj+NNIGD83FlSqVqJxHLlF/aXHmx61xwN6wwb8XdxGckaY2OD0 IcVrwNLyK3/TYnMbXUQS4ofw+wjhY/2MhohkOlNdjxZJrzDTdLYIwdiFNutBFo4Ev5x6 bgow== 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=A9UFRlsHApqzHjcR7x1rDCTwPQa9ID7lejkInaj5w9I=; b=mDvwpQ0SSsZlMmJyASaUT02R7H87FANJa8L60IvlmDFpl+HSNOchGFYKinL/8XKuon fcDGWwOAqCQz/9U7Ouk3QG131Wlh7qNu54AovBpxfV+vqUUVPUqbCyeh9wR8kaYPSZQq VZBuUN4414OiseDqVpaoWWx652OOngljJiQ9GqNK84vhujq3Iuw+eJ05Dv4hLEFayVXr OiwFvPaqMHoxklUOth1BN6hsrilJoYyrQRo6pQkQT+7OtntcBHYeNi6oCLLyd/Vg2uqE HaoJ47MrO3s+WgG43E//HGjC8+ghk4qcWRPoXPfOA6nbEsbCKVU/3+xztTqhwoRGzu7S 3kFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=iUxwR1kk; 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 f25si171340pge.313.2018.03.19.15.31.01; Mon, 19 Mar 2018 15:31:16 -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=iUxwR1kk; 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 S936521AbeCSW1z (ORCPT + 99 others); Mon, 19 Mar 2018 18:27:55 -0400 Received: from mail-sn1nam02on0103.outbound.protection.outlook.com ([104.47.36.103]:38940 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933830AbeCSPsv (ORCPT ); Mon, 19 Mar 2018 11:48:51 -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=A9UFRlsHApqzHjcR7x1rDCTwPQa9ID7lejkInaj5w9I=; b=iUxwR1kk90/lFb1JyZen6JQNJYnpRgav3F7YpH6NSD4XRTeETMt6Iv43x9gj2khUXi7CBMBhwp5Slocs7GSFbrn5J9uuL6vM43vxGQvPq59PhVp70kgxqHOjP1LzGAfUMvowBKqRazv/N6DyoWsbh9V3xGOIasYQpHPCC44t3Wk= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0936.namprd21.prod.outlook.com (52.132.131.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.2; Mon, 19 Mar 2018 15:48:49 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 15:48:49 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Hans de Goede , Linus Walleij , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 061/124] pinctrl: baytrail: Enable glitch filter for GPIOs used as interrupts Thread-Topic: [PATCH AUTOSEL for 4.15 061/124] pinctrl: baytrail: Enable glitch filter for GPIOs used as interrupts Thread-Index: AQHTv5mrPdsjf+23cUSn1CmBIKjVUQ== Date: Mon, 19 Mar 2018 15:48:05 +0000 Message-ID: <20180319154645.11350-61-alexander.levin@microsoft.com> References: <20180319154645.11350-1-alexander.levin@microsoft.com> In-Reply-To: <20180319154645.11350-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;DM5PR2101MB0936;7:V0AZRhP1NhH92cfy5CwQWurDVIVyFhK9CGx019Eqml0fmiK90PYPgOkmouh352cZXhHT01dFrXE30ZiMBgzpQscUZFpma9kTjkvobzWnl4JWFoX6pTWqFTXZvquYgL0jM0iYS6lmRgS+QWszZTFpIcBZaoYvCpY8BDODn3EiaGdkySBI20MNGi17L8t5MTvnDAAPPKv4CUZG7fyNpW1dSuoH/Ph8QtZ4Iev17xXjXEQL3N/zhnJtqCvE0oDxkzZ7;20:uCkRpRNZQ+yhYlFnKBG3f/tbTzmW5Zxi2qhqhneuDoDOOhHrDvkE2uagbzli05JPPYfxUj6QE1o87pNszppFaig2qg7kXAt9u5Ly93/hZvOYBjzZGHaZmWB1TI1qs00sZEfcT0negyqkoZND24cfeuGqDUZaksa3CLy6ZfKI0Y4= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 807bcc99-3e59-4d94-c4cd-08d58db0e821 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0936; x-ms-traffictypediagnostic: DM5PR2101MB0936: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231221)(944501300)(52105095)(6055026)(61426038)(61427038)(6041310)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011);SRVR:DM5PR2101MB0936;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0936; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(346002)(39860400002)(366004)(376002)(396003)(199004)(189003)(2900100001)(3280700002)(2950100002)(10290500003)(66066001)(106356001)(76176011)(86612001)(6666003)(478600001)(5250100002)(6512007)(6486002)(107886003)(36756003)(97736004)(72206003)(25786009)(6436002)(53936002)(7736002)(5890100001)(2501003)(54906003)(110136005)(105586002)(10090500001)(2906002)(86362001)(305945005)(5660300001)(316002)(8676002)(6346003)(1076002)(3846002)(3660700001)(81156014)(4326008)(14454004)(26005)(6116002)(102836004)(8936002)(81166006)(6506007)(186003)(22452003)(99286004)(68736007)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0936;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-message-info: Uu32Rv2xQ2YM8O7t8p0a9J3+yE+gxc29iPeHBNnp8wCJ7+Fi4+l4y2qL/W5SPAGGOBqAW+lOz1btExAedekpf4jtOx+mmYuVLRufeDgnYMdvJGiMmcq+bXoY8zOV7PvCKmmySubLAMRqCIjA7fjORS/oiD3UfCW7gimmH79KMBpUw3HPu/FPoVU2Fumv7tVeX8zImF9xyCL28wrhzIwzKeaFt9I09y10yFXe4YZUWj0eiE670Z9vYWN9pFLsXKVd0MMGYxBu3ek5E1ttlILGfvVEyj8/qzkYjswu65uAbe6ETfo3Wy/qAeqqvGoZcWPWCKqnufGZQ5hf8VtNfX5H+g== 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: 807bcc99-3e59-4d94-c4cd-08d58db0e821 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 15:48:05.1703 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0936 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit 9291c65b01d1c67ebd56644cb19317ad665c44b3 ] On some systems, some PCB traces attached to GpioInts are routed in such a way that they pick up enough interference to constantly (many times per second) trigger. Enabling glitch-filtering fixes this. Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin --- drivers/pinctrl/intel/pinctrl-baytrail.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/int= el/pinctrl-baytrail.c index 9c1ca29c60b7..6b52ea1440a6 100644 --- a/drivers/pinctrl/intel/pinctrl-baytrail.c +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c @@ -46,6 +46,9 @@ #define BYT_TRIG_POS BIT(25) #define BYT_TRIG_LVL BIT(24) #define BYT_DEBOUNCE_EN BIT(20) +#define BYT_GLITCH_FILTER_EN BIT(19) +#define BYT_GLITCH_F_SLOW_CLK BIT(17) +#define BYT_GLITCH_F_FAST_CLK BIT(16) #define BYT_PULL_STR_SHIFT 9 #define BYT_PULL_STR_MASK (3 << BYT_PULL_STR_SHIFT) #define BYT_PULL_STR_2K (0 << BYT_PULL_STR_SHIFT) @@ -1579,6 +1582,9 @@ static int byt_irq_type(struct irq_data *d, unsigned = int type) */ value &=3D ~(BYT_DIRECT_IRQ_EN | BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL); + /* Enable glitch filtering */ + value |=3D BYT_GLITCH_FILTER_EN | BYT_GLITCH_F_SLOW_CLK | + BYT_GLITCH_F_FAST_CLK; =20 writel(value, reg); =20 --=20 2.14.1