From patchwork Sat Jan 21 13:48:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 46822 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp739418wrn; Sat, 21 Jan 2023 06:18:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXt0kinYwwydtq/UgE4ZGTETWfGUMUiN+nvSrZCCvBJ0YwDvZAHRdFKhZ+94xe+WXvdi8HQx X-Received: by 2002:a17:907:c23:b0:7c1:ad6:7333 with SMTP id ga35-20020a1709070c2300b007c10ad67333mr23683609ejc.10.1674310695244; Sat, 21 Jan 2023 06:18:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674310695; cv=pass; d=google.com; s=arc-20160816; b=gSkY2IgdPiFnKaYs/taRZBFtkLEN7Pl+BD4/51afY/LC+0OsY5eglmWqxIgLuiP3F/ pfnABeG+0m7vCPamOr/ORr9MXFif+KLXMVF/HlUyuF1qgVq+1NOZUS9hCMP+5yobs0Dx +9XE39BEfMtEnktkPanwjm/NvvN3dP7wP+fuGPVM7+LnhBW1MDb7jpCEzDuDsXutcc+x SYf14nCOSvALv3o2ayuWaY66mX5eHYCn4a+8bgQj5X359TDjOigGKAPm3Yrho1wSNL+g qH2+EbxzNOYYrizZNdxJwS5QSR4vkgXlWlmiMNiNsdRcdFNVD1U224u4QhuzECXnJGM2 v/ig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+9lFgys8sEcMQWQ5jKThr/7wan3B2UAz2sRM5/eCby8=; b=YFcCmKkVVwLHvDGC/TU4f8LyMsKiF83Ar3s31+qvC4m7rSGekaiIAm/BlXAH0ggQAr z4wwvHi6sPqhC9DkqvN4QBkqaq7bhMqTYKQURtCG3psPgNxZSxMi6m5nV3foYJJLi7Ku vnsxXlDl1XS+kTxX9nQtF89EdPEh97OMdBR7YGLJYOI9OruRNOpZcSV5goNdJWXiLOhv cPamHaRzZTSPr6+V+ZcxEjF6wLK2dDlg6KnNxyC43wF9vEfWgxMW7vXlDTZEeixIVgUP 9oXcnP2DzIay+Ky6MISQpXzDDh6ujZ+O6oHEmxQzbfaJ/im0TZuIH2m+gkB358rzxdUI iaIQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=kEyYpYXL; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ks23-20020a170906f85700b00877a3686affsi4482557ejb.447.2023.01.21.06.17.51; Sat, 21 Jan 2023 06:18:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=kEyYpYXL; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229861AbjAUNsN (ORCPT + 99 others); Sat, 21 Jan 2023 08:48:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbjAUNsH (ORCPT ); Sat, 21 Jan 2023 08:48:07 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2046.outbound.protection.outlook.com [40.107.93.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F82BB441; Sat, 21 Jan 2023 05:48:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fg1m+P2RVZhQAj4RGMSgpWT+uZPlHkXH3pRaeXMhsUz9KAnazZdzDxPdO0AVTjc/K8rsXIeTWPIfTqz+blOial/qAG7nskFMQfnxEGrDvkurRKzoUFj8jwKWmC2xqPpm14gakMDQ896UGZas487gHzGtu+ArcqBT9fPYwn/JwOiFm+LmT6JWG2eC15idCGpxG3LBXEON/3iriMID1pCLhuzwf5VejLIDbDUOc4GWRu1VpuuB3LP/3GoTWBPmu1Gg71Wg2hqgeWh7oijHrCcjXpTCoemhVCOuKixY9BFRqZJ5yKda1Bn4iQCDuTMRjcYtDPfT6BNI8p4/8CnwSgBGeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+9lFgys8sEcMQWQ5jKThr/7wan3B2UAz2sRM5/eCby8=; b=Nh4WVWgUiQk7dCxLdF6UKUmh4kyeqj2zitqzi/21bmtqt2wgYcj5gXTLnKV9MPtPsHz7tpVeNMC93Vr7H/mxS1btTuO+GIMTDwmdGO491pVZk8tpTx51XyVYouU2xvGqVWHjwd+C2kRcy5GTgsVsMLpNKg4CPG9eo2CjStSXrjrPfAdvUSr9C5IcFSlay0Opwpv/PzDpv6uuVdfmnuDYqALSjNBLm4hIByI7SbNiyL6l32mJHEi2q5Yjoy+lkoYm479jdam1zl63AwEb7M/S511zQUucjmMI8M92Yu6zOjQ8LCqb0cPzczx9z8AsqmTQK13rGomRB96yC9XhnIuhng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linaro.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+9lFgys8sEcMQWQ5jKThr/7wan3B2UAz2sRM5/eCby8=; b=kEyYpYXLk7dS7Z9il9eDzfrwZGGXoX+WCRTFcpTBJW06dr7+iZ1Fm7Xhk4TyPWEsyDV1H3qJPVYiiZzPHHGO7iMnRDnbf0dGg5iw6zfKtP83dUev8ZN3eOSXYhpSpxFF1v/Bc60Qyl2xhhF5KSgbQAT7jYaI10CpGtgrWI1gtx4= Received: from MW4PR04CA0148.namprd04.prod.outlook.com (2603:10b6:303:84::33) by PH7PR12MB6000.namprd12.prod.outlook.com (2603:10b6:510:1dc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.28; Sat, 21 Jan 2023 13:48:00 +0000 Received: from CO1NAM11FT101.eop-nam11.prod.protection.outlook.com (2603:10b6:303:84:cafe::34) by MW4PR04CA0148.outlook.office365.com (2603:10b6:303:84::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.28 via Frontend Transport; Sat, 21 Jan 2023 13:48:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1NAM11FT101.mail.protection.outlook.com (10.13.175.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6023.16 via Frontend Transport; Sat, 21 Jan 2023 13:48:00 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sat, 21 Jan 2023 07:47:59 -0600 From: Mario Limonciello To: Basavaraj Natikar , Shyam Sundar S K , Linus Walleij CC: Mario Limonciello , , Subject: [PATCH 1/2] pinctrl: amd: Fix debug output for debounce time Date: Sat, 21 Jan 2023 07:48:10 -0600 Message-ID: <20230121134812.16637-2-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230121134812.16637-1-mario.limonciello@amd.com> References: <20230121134812.16637-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB03.amd.com (10.181.40.144) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT101:EE_|PH7PR12MB6000:EE_ X-MS-Office365-Filtering-Correlation-Id: efa1ef5a-0a6b-4f02-8aac-08dafbb61c5b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /oPfASB3SZNKqvDtkSWRzy7HnFEiTlgin7te7fG9ZMjpCWB3u9e+C9x5ifIRjQQXTYiK8wB3M+YCqc2v3M9f/lTEkOBm2Hzycm7eBIZyfAx2QUe3LTT8Fsw/Um3zlCFUVJBKfI6liDJk1p+ZNk+NnEJVA76ifATNg8R4cvAf0+pka2pMW11URSg+1ZcSU90mvTKMeWY9Ir4HGFfIf+pYBxp4C+EYd8+Z7OC0ea//ZcMiL5BkihlU4wUqFWhVqoxpLKPRNpKzB3JjJ6dJZY90QP6Ub7UHfpC3CJx2IdD9CFbjAmwPmS/LqqirWMT9F9EV8Bf/sX08vscVzm302DbKJi8YcYtJEnTFpuCECksTisNQc9GVjggoeFDCI5ENP6ckyQZAXCLW2EELV2UCB6kpk1SnAE3h+Fp1xZoe+GEuodG379/cuAvNFLWuVMYztOg4PguaqCuJlzI6aBOrTkaTw6alh99A2yieUVX5jvIz6CzUE5V39BmXgr0SEsJWhmCwY8eO+JoOKM3DPvkDVS4rIZ182Pk7fTRNG/c0ak8JVukYIVGXfMB3Rrv/6SyASTQD/S6a6nHjI7NHVZ5bRcLw9G+BqucdwvYQpfJd6VFfzSw6xvSoOh9anWrBzoPZxIDHSRitp9EqLVdOqUb+bZhwRw/hw6kWV/iqKayJO1VAf12Wvjc8HBkzYX1slcciX/KaZNcOi28/DUcDDSPKL8MZ1WV9FZXZhMjFajd2wFoh/RI= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(346002)(39860400002)(376002)(136003)(396003)(451199015)(46966006)(36840700001)(40470700004)(44832011)(86362001)(2906002)(40480700001)(4744005)(70586007)(70206006)(336012)(16526019)(186003)(26005)(41300700001)(4326008)(8676002)(1076003)(2616005)(47076005)(426003)(478600001)(7696005)(40460700003)(316002)(110136005)(54906003)(6666004)(82740400003)(81166007)(5660300002)(356005)(8936002)(36860700001)(36756003)(82310400005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2023 13:48:00.3008 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: efa1ef5a-0a6b-4f02-8aac-08dafbb61c5b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT101.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6000 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755642011677289594?= X-GMAIL-MSGID: =?utf-8?q?1755642011677289594?= If one GPIO has debounce enabled but future GPIOs in the list don't have debounce the time never gets reset and shows wrong value. Signed-off-by: Mario Limonciello --- drivers/pinctrl/pinctrl-amd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c index 9bc6e3922e78e..32c3edaf90385 100644 --- a/drivers/pinctrl/pinctrl-amd.c +++ b/drivers/pinctrl/pinctrl-amd.c @@ -365,6 +365,7 @@ static void amd_gpio_dbg_show(struct seq_file *s, struct gpio_chip *gc) } else { debounce_enable = " ∅"; + time = 0; } snprintf(debounce_value, sizeof(debounce_value), "%u", time * unit); seq_printf(s, "debounce %s (🕑 %sus)| ", debounce_enable, debounce_value); From patchwork Sat Jan 21 13:48:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mario Limonciello X-Patchwork-Id: 46821 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp733106wrn; Sat, 21 Jan 2023 06:08:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXvAd4u+4AHsJadzjtFarrww6snP9RUOPr9fW9dgfNQG1ZWRlLOCvmnl6AI9/N5oApq5pQLv X-Received: by 2002:aa7:9461:0:b0:58d:9428:e488 with SMTP id t1-20020aa79461000000b0058d9428e488mr19200733pfq.9.1674310103156; Sat, 21 Jan 2023 06:08:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674310103; cv=pass; d=google.com; s=arc-20160816; b=XR0PBvT8jSuYMs9hR1MtjfMlk/5F9UvJbpczPSQn1EVhigzC84GYu6zWKzN55CBqFr Ip2tmnuE1umXMZtitwfL/6QxJ6oNOnKqm13lXRDdFUghkl12ZcoxtDJGByJm8unmSaoZ bG0eIKqFIYHZw34NtDKez7rbaV+++7zU8BavqDRkv/9kTUZkPDJl4PopY5eajDvVaAA9 kwOtnzyrew7+MQSC4Plz/M4m73DYvTP3Kyi6fG3TENwPxM2uxhlWECMba/yXmbjsrTdM Oh857qSRxn3MRpOBexg0Cvzb6/A5I6OWHeI4Cb4ZF8Qb1fiLoCX0m31+DEyWVK6pgcAL Nuug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wRnCveg1irG4fhoslR3hYLzkp/CAtElgDK9PLHL2yqE=; b=AaVmIPd5OyE4jRpChu6xF91HfxdhOooZmV/loGLgGZ2NiH30BB6pAMS9JZeFopWkMk kVWtee0yX1W2M43sFJHbHeyDVnMOU6/r5EP8KHXSoGUsVSTZZYF1rfHiVH6bqSxsSzNe xjOUZY0GfxBAGlSRWXCxs9FI1iVSSqNKdIe/sK+bt+0qFzEqSilrMXXnR/h44TQoubHW +tCmRwDt9FuLhBRLH7gW0R412Ekz7/b6dv5pp18x/CpcjnkchDqxMhZpOspeg8ULYFCF reU/AXgcd8J0PQdBr8Yw0hBw2HcDYiA4aMZI8pm7QEbYsDUvWWzEGcEAI+Wn7gpjoPOO kK3A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Krh5MIdd; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j14-20020a056a00234e00b0058191bea796si20151031pfj.0.2023.01.21.06.08.10; Sat, 21 Jan 2023 06:08:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Krh5MIdd; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229796AbjAUNsK (ORCPT + 99 others); Sat, 21 Jan 2023 08:48:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbjAUNsH (ORCPT ); Sat, 21 Jan 2023 08:48:07 -0500 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2045.outbound.protection.outlook.com [40.107.237.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF210193C6; Sat, 21 Jan 2023 05:48:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ev5WuH17j1IFyHD8MFrWHZWhuf/fhdrT49AWAeWLgxI+xnRD5tjuPLnAZ/JgTOjThuGx81OsSWPtuAgVmqvN/HLzVCrNvP2J9wHndkLf1gQj6mrsZyaeusKEt5Qg1mVKcXKOSFm74EsWZ5RTh6C1IN9mim0GL+FtTaWzfFzlJskPa9FQKi6xGASN8quiafWc/l9qUosiv4MjEXHoMcx8TlShBUEioiF/GWdlO+n4lhFcJFbW1FmgDPNQrXSjKpBjzAMGEXMgZLwa3F4ujjy/8o+nILsA8fiCtE95vbElbmLc3lZtMELGlBRUTEPpBXLxbHiThLTOm6M6ZhTs6kXo1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wRnCveg1irG4fhoslR3hYLzkp/CAtElgDK9PLHL2yqE=; b=TLCm6rd9ALJ0TYwEuhph5EwzHL1YBTwbqhKfVmcMhn/iqzpblyoiTsYfUHug7Z3s/lbC3yxS8JEM0R5B/gxUi+6p5dLwIC7b5/42+GfHdZpjRtGYg183sHO21Qno7Wzkj5P2o17p06CnFxIuZN7kVGt9Pu1PefCx6Y1rIt+QSCJHh2DUsUsO/uGJY3tkppyqUcVNlcwzqERzN/k45voGyElZcWU8MlwIyyKjkHz4Cug95fQUKo67S6cdKVWdBE6ikVPtR67m1ENMHPvyHA3Rbdmjs7Iymijeqxbzp0QkA8oXaaMHjxyoyEgU2tkmzq+7rtc7pTk6m9Ri5AGxI0nNVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linux.intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wRnCveg1irG4fhoslR3hYLzkp/CAtElgDK9PLHL2yqE=; b=Krh5MIdd6p3NHI7NALaD1QzSQnQkjpBUSc11heaY9mKFwlSiFIv2EAEFZIQvVDZJKWtQ/vakO6pbcM04X01PdgIASqgcQpEnLYry9SnEZgrR1ZmBkk9J9KAvFMOx7CZXUJxWuY79Kh45cHme+mgn6NKY3DbmdhdEAxGHg2cxI30= Received: from MW4PR03CA0318.namprd03.prod.outlook.com (2603:10b6:303:dd::23) by SA1PR12MB6776.namprd12.prod.outlook.com (2603:10b6:806:25b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.28; Sat, 21 Jan 2023 13:48:02 +0000 Received: from CO1NAM11FT088.eop-nam11.prod.protection.outlook.com (2603:10b6:303:dd:cafe::63) by MW4PR03CA0318.outlook.office365.com (2603:10b6:303:dd::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.28 via Frontend Transport; Sat, 21 Jan 2023 13:48:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CO1NAM11FT088.mail.protection.outlook.com (10.13.175.131) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6023.16 via Frontend Transport; Sat, 21 Jan 2023 13:48:01 +0000 Received: from AUS-LX-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Sat, 21 Jan 2023 07:48:00 -0600 From: Mario Limonciello To: Mika Westerberg , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , "Raul E Rangel" , Dmitry Torokhov , Benjamin Tissoires , Wolfram Sang , "Rafael J. Wysocki" CC: Mario Limonciello , Nathan Smythe , , , Subject: [PATCH 2/2] gpiolib-acpi: Don't set GPIOs for wakeup in S3 mode Date: Sat, 21 Jan 2023 07:48:11 -0600 Message-ID: <20230121134812.16637-3-mario.limonciello@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230121134812.16637-1-mario.limonciello@amd.com> References: <20230121134812.16637-1-mario.limonciello@amd.com> MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB03.amd.com (10.181.40.144) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT088:EE_|SA1PR12MB6776:EE_ X-MS-Office365-Filtering-Correlation-Id: 4db76c4b-c217-4453-7955-08dafbb61d0c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: isafuOfY4TwG/7d6ra8IaHtgs2wWg4TKr6qPQzchWJFSK8c0nsLuN+sS8y4aJmklXGFh2GhV5pTt7wYVQOPYyf5C1bInW0sgdeeyZ9SK2/WUK/V+sJI0+eWlvodMMzXGQAZH8YOFksImyhZBUKhAWxg3gUIK3Upqhxha064exm+Pml9YooXCVFGU3kothFamwmHEaRIT4YVgqNL+td4M3um/TmM9ZIZIVyDoUJVwbUfnIRPi4+a1S3+prkGPa1B/r1O1imCm4PUmJ6qheiTTqfi5PZnMHCKiMZSM/vs/cvltKqK/jegLGfXwPvxy95ewKjO0mqL2ACPPYbJgqGq74iF7o6Fb95qjvGVOSg765oOVd6pXoR4QMvQRh+SdWKob4AGo6ii1P+pShX6xpwmmZeqml+MKNT17LbkgoHCi01cma8qnhQ/saskx0B1e7rAnKVOL7v040CgIB7GsjdU2IfHrwg/SbtBKxTruvtAReRLCuCWgITGEi2BdaXnv6HINFkohva+4IvwoF1MUrObWQJVQq5kvljt8TOqnj4MFK2C2RjLbJZU1HBXUtjnlzKOx6qEydIY4JXMbg6NUELwWMbDjGUE7Q3kQOubOuD/ZNJb1YuhKvvOEVgaYd9vlAVgCfybBF9Zp+2F+7l8j4IT9bqrILFr2rcPEEBqMdGHnq4Z9sML1iP6IIdnGAC3OHIyw7NelKwDtkJuO/C2eKMrBajgt3QCFj1z0QEEABCOQ3ct5dLB6lVDv5xnBZOlQNP2VDhdSQHIFnTIChLkn7+mvBg== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(136003)(346002)(396003)(376002)(451199015)(36840700001)(46966006)(40470700004)(44832011)(86362001)(2906002)(40480700001)(70206006)(70586007)(336012)(16526019)(186003)(26005)(41300700001)(426003)(4326008)(8676002)(1076003)(47076005)(2616005)(478600001)(7696005)(40460700003)(966005)(54906003)(110136005)(6666004)(82740400003)(316002)(81166007)(5660300002)(356005)(8936002)(7416002)(83380400001)(36860700001)(82310400005)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2023 13:48:01.4916 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4db76c4b-c217-4453-7955-08dafbb61d0c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT088.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6776 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755641390722440354?= X-GMAIL-MSGID: =?utf-8?q?1755641390722440354?= commit 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable") adjusted the policy to enable wakeup by default if the ACPI tables indicated that a device was wake capable. It was reported however that this broke suspend on at least two System76 systems in S3 mode and two Lenovo Gen2a systems, but only with S3. When the machines are set to s2idle, wakeup behaves properly. Configuring the GPIOs for wakeup with S3 doesn't work properly, so only set it when the system supports low power idle. Fixes: 1796f808e4bb ("HID: i2c-hid: acpi: Stop setting wakeup_capable") Fixes: b38f2d5d9615c ("i2c: acpi: Use ACPI wake capability bit to set wake_irq") Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2357 Link: https://bugzilla.redhat.com/show_bug.cgi?id=2162013 Reported-by: Nathan Smythe Tested-by: Nathan Smythe Suggested-by: Raul Rangel Signed-off-by: Mario Limonciello Acked-by: Andy Shevchenko --- drivers/gpio/gpiolib-acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c index 9ef0f5641b521..17c53f484280f 100644 --- a/drivers/gpio/gpiolib-acpi.c +++ b/drivers/gpio/gpiolib-acpi.c @@ -1104,7 +1104,8 @@ int acpi_dev_gpio_irq_wake_get_by(struct acpi_device *adev, const char *name, in dev_dbg(&adev->dev, "IRQ %d already in use\n", irq); } - if (wake_capable) + /* avoid suspend issues with GPIOs when systems are using S3 */ + if (wake_capable && acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0) *wake_capable = info.wake_capable; return irq;