Received: by 10.192.165.156 with SMTP id m28csp47713imm; Tue, 10 Apr 2018 16:06:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+k+AuJU7bM6IhMep1a/1YG5KrBExzy0VQxy4JHJDVusoF5E1u8i68vxF6jSMrPmX9gSMaR X-Received: by 10.98.234.6 with SMTP id t6mr1959747pfh.38.1523401618087; Tue, 10 Apr 2018 16:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523401618; cv=none; d=google.com; s=arc-20160816; b=mrrTKtPKFdaNej+kQEhpRVMmnRU1LHlQsn6pgc7e2oOsEQ9QdByLxnn6fnWC6+fVUY YqrGdNwps88aYN4ZcujsZ83oA4mBDKQY+9TJRUymdAmbpzikYFFJoBb3TaVbsKjCrhXC 37tFYomwwV0zQQprE2K06BZVNnwwBdi5crvj+TViP5rahhTaTrSBKz84LtZIampnykZb BhODrDFLe8fbSSj7J5xrhTY67gpOJXCmW6u8rSCzIH62Tcha/kS5tDCt3T9yymMaWjLC GuSflwq8HFLkk18i3MFylvsN9j8qIU/liCv6A+GCYtXlk+xFvjyoT+AcHHLgux1Notul SRAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=KSmIgeTpkok6D+M3ajgV9WubFemeigm07R+nON2xIzk=; b=F3GxxdfcNrp22Hyz2PbIidKKykx3gkGCj+63pwlWX3s5jCBc/6kz1Jhrezrywn8lQq RqBRamPlbfSjTVUhsYwW19MmorBQ3Xux4lzS+IcJgM7F3G2FwW7pH+EB4l4J8P+pLGze jmsN7zQHevvgTL+0yOkOiT5Rfy5HDU6qmnYOEBON1PtGqQr4gPnSRLZNVE5tTGJmM1O9 +DLiciLQ8PRbXKTlSOTnuZR2/uyetBEFew/NrQwA3W8XtbS6lpDUh5uwegJ2xsH+hfX1 j7P845Jtm8rjz9Zsk92soV0mIjflRPvNzBKzhTesqj9h3Rxwr1quvOwklCvmH+oVHVlh /L5g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si2897954pfa.95.2018.04.10.16.06.21; Tue, 10 Apr 2018 16:06: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755560AbeDJWf2 (ORCPT + 99 others); Tue, 10 Apr 2018 18:35:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42124 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755543AbeDJWf0 (ORCPT ); Tue, 10 Apr 2018 18:35:26 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id ACECBDAC; Tue, 10 Apr 2018 22:35:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Mika Westerberg , Linus Walleij , Sasha Levin Subject: [PATCH 4.14 042/138] pinctrl: baytrail: Enable glitch filter for GPIOs used as interrupts Date: Wed, 11 Apr 2018 00:23:52 +0200 Message-Id: <20180410212906.987897709@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212902.121524696@linuxfoundation.org> References: <20180410212902.121524696@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/pinctrl/intel/pinctrl-baytrail.c | 6 ++++++ 1 file changed, 6 insertions(+) --- 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 */ value &= ~(BYT_DIRECT_IRQ_EN | BYT_TRIG_POS | BYT_TRIG_NEG | BYT_TRIG_LVL); + /* Enable glitch filtering */ + value |= BYT_GLITCH_FILTER_EN | BYT_GLITCH_F_SLOW_CLK | + BYT_GLITCH_F_FAST_CLK; writel(value, reg);