Received: by 10.192.165.156 with SMTP id m28csp24890imm; Tue, 10 Apr 2018 15:37:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/EE9/6Oj2qJ04LOCO7I1bcNodcncDpfs6/Taj7jgnfv6TGkh8uhaKei12GVdnG8pG8HmJQ X-Received: by 10.98.76.68 with SMTP id z65mr1835550pfa.181.1523399840747; Tue, 10 Apr 2018 15:37:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523399840; cv=none; d=google.com; s=arc-20160816; b=uLqQkgw049HxYEEgH3Z+2h0/SgqDI6OvPBkjzd3PZBHA801/Ay5a8LIYJdmObmogNd r+S1NqsNd/bxuA956toGhEXRXT6ux+5CmYajONqK8DpN/nu6gKwaX/JlduErqeeGfW3d sgbZzuvR70Ll8QGyTSmKCmdBUWBarY8bM192VIBoKJKWXIDt1gaCCOXiinM5+H9/FU1M QnF4o0OC3LZar2PBr+98yxNJvyTcfjHh2J+QfY3CRA6x017GhcDjfXO2EK/SkkqpRvyX x0XcHUyafJX/uQLA0zTFgRXswbk8tMBkkg4m62mI2MY/TdKTWAgVSkwfqlsroqnHgAkY fF3A== 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=rxSFV+IHdrv43iuZdy9ytktt33Wf8Gdflps1pLV5xbI=; b=qLjPILMvkPL0unYxyFh/dBfAU11JOL1687CNMqdl6ql5vmPYILqRLHRIv9yuFAtrx3 wlQSyrNNmmoO+rFTb+xOGu5qfCbymp1Cwcx2oJTUoewWLnmvI3u2D8t59joJw8OiqF1J uW1DKHTAy4BNelVO0ysM/7ok8rkbAQ9dcXd6qqwygw+TI58F73RrI4euKDSEuDwkS8ap Bw+1kqp05xaCiKCK0bzaIQqvV308FwSjspNWIfhMXtR5sZUsKlQjpZ/iWZpYGt1gyluH Pl5+wWMj2Cwz3IIv8YVLcJBQ9gU03cwT8UIbo575S3fdq7HVxJZw+ASBwvnN8HvUIsR+ iOlg== 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 f7si2779315pfa.299.2018.04.10.15.36.43; Tue, 10 Apr 2018 15:37:20 -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 S1754243AbeDJW3L (ORCPT + 99 others); Tue, 10 Apr 2018 18:29:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:39394 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754223AbeDJW3J (ORCPT ); Tue, 10 Apr 2018 18:29:09 -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 CE3C9D59; Tue, 10 Apr 2018 22:29:08 +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.15 057/168] pinctrl: baytrail: Enable glitch filter for GPIOs used as interrupts Date: Wed, 11 Apr 2018 00:23:19 +0200 Message-Id: <20180410212802.637537235@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180410212800.144079021@linuxfoundation.org> References: <20180410212800.144079021@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.15-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);