From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E5D9CC61DDF for ; Sat, 29 Aug 2026 02:58:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=W2+9lvNelaB3xsdMEulhStLVCBiHuRNKFEUiwfAFbL4=; b=rrpPMjNYnVir50 HZOOlLNoyMv6XspQXN5xhTPRUymcF1dukJfeTLeujeZ0iunuD45jQJwm4+UynXWpcYPBhqH34NKhs w4v+/Y+pTeFat5pn7i++jcjX5xmZy8EJmYPusoAxXRK9EmbFO6DLYKqk3KrK9AXZ8nQ/g+u6HrhIr iOi0HMbO7bRVUvGhfjd8x9DqbCPcoOcVG6XXVtq8ndCRQIc5V/RRTLszlxcI2FDPmHg9X8Rl855q7 9oiYpnaU7z8jRFeTEK+FLdDNmUXku6kphHs4xgEqwwowPvV2gSn20IE5ppPhknLISVnmx9ykp0LpB taGqPMW3nQ8hJOtRPIlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x09Gs-00000006cjm-46Hu; Sat, 29 Aug 2026 02:58:18 +0000 Received: from mail-sh0chn02on2131.outbound.protection.partner.outlook.cn ([139.219.146.131] helo=CHN02-SH0-obe.outbound.protection.partner.outlook.cn) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x09Gq-00000006cf5-1JEo for linux-riscv@lists.infradead.org; Sat, 29 Aug 2026 02:58:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jOo6GCZBo7WQZ1s/8sijtwYSD7x381rX8nAI+mU6GTdqFyq9VU5dLxId8UASTV0hweq68+G1l3veAlxs/+K1AWroZhpp1/kqmOGMjcQXI6LgsQc2kKpt/ZaAtDzRJfIjkga9DUeUPZ2K9HVwq9C640ERCt/kMuCAqnvxypNGDXMMCmNGgXf4nuklPqTazH11byNewg+iFarajofGiVp2ec4PumyhKUDy7Js2XlWgG0E9aQ4lMy2DSREIRUECKELGFL3j9eC28pSsx71/AR7wjrtF7lx5M1tjrWHx3KD1DCxRy2a+aa56Y2CXlsJ21goVX6CgI+ktEyLQoWiUpxyetA== 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=Mh6OYA8GxBZMq/6N0w3OLTCjyP1UVt+l7FUZr1HRbSk=; b=Ijsi63h0g7w21uDvmH174sshg/YahstZhRDwauBOPOtlNrizl9GVq0yh7+lsp3U/FO1wz/bRWTrpmVPgPw+gz0yarvEzDhhwbjtS47VYOsgVNBg121xOOm5dW01Dy7gigfrYCVTnOLWGfdh2T96DCQ/W/8dyb5niIB2KM2HWYlbig1qcXqSinRfzryvbX++5SlXblt3uts1rZPXuucw2IJl6urmNXu6zjZwc2S/kGygD5cBcEmavCwjiYSQLy+EYafuNla+oeIptaQmsyeVynN+xMRHVnrkhdtrjJedvY25FfHcOy201PHxvkMc3T2lVEUXLD7CPTtY72uD7Rk8Exw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:17::6) by ZQ4PR01MB1153.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:13::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.315.19; Sat, 29 Aug 2026 02:57:36 +0000 Received: from ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn ([fe80::e7d4:256c:b066:850d]) by ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn ([fe80::e7d4:256c:b066:850d%4]) with mapi id 15.21.0315.011; Sat, 29 Aug 2026 02:57:36 +0000 From: Changhuang Liang To: Linus Walleij , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Emil Renner Berthing , Paul Walmsley , Albert Ou , Palmer Dabbelt , Alexandre Ghiti , Philipp Zabel , Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, Lianfeng Ouyang , Changhuang Liang Subject: [PATCH v6 02/21] pinctrl: pinconf-generic: Add property 'input-debounce-ns' Date: Fri, 28 Aug 2026 19:57:01 -0700 Message-Id: <20260829025720.23915-3-changhuang.liang@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20260829025720.23915-1-changhuang.liang@starfivetech.com> References: <20260829025720.23915-1-changhuang.liang@starfivetech.com> X-ClientProxiedBy: NT0PR01CA0020.CHNPR01.prod.partner.outlook.cn (10.2.8.16) To ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn (10.2.3.102) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZQ4PR01MB1202:EE_|ZQ4PR01MB1153:EE_ X-MS-Office365-Filtering-Correlation-Id: 4abd90ef-2d67-4aef-fe02-08df057947a5 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|23010399003|7416014|376014|52116014|3023799007|18002099003|22082099003|56012099006|6133799003|10067099003|921020|38350700014; X-Microsoft-Antispam-Message-Info: JUKV4b3+fKpVnPjMjtK31pQThleZrM9vjlOj7m07LsT/UUiUUic+E88Wz58k+0b22ZndcdItS6ll609F2a/xvtvkTbAdKsK3g8nTOKx3jNd7438jBzuxeV1gQA2jyed4wZRjg+Dp7GddGjm/LYuzI0ThWZyFqV6i1cSP9Du8Jt45LM5sbsAFABrYKLURjE848x+lLYe16JmOKaJsO4iFxvtYmqoAF91rk3uD6J4kcf4kkC3QaNpOLS5qMvE3Ar9Eufn2YEXRRlKWws8ax7ZR1fU7fJcJ2WsyCySepgAD1i5f7hwWyhHensO/npxkhjexovEjDGfr5977nGsnb9cPjzfZsO3Klm+pJ8PH3zDW+uzVaO8cS1WJj1F7awfpoVhh0+OeIAYwVTw+xPKfAozaDkNyGzFGMmjtXC3gK4jBbQUMaufNKzoLkc7dvrEnnZKkNMscS6dJLS0cJd/t3NLiyv0by2kQgWoRx1IAwK3UG6b1pSHYBYDd4PjI5d8cxoOBr3q2xanLxrzDlqKehvdi98lIp03Dk1Re5huycLjdJ/ARYsoXdwlqTCZWjUJu2fPNpIs9NC14yKDG/KZRODGhNQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(23010399003)(7416014)(376014)(52116014)(3023799007)(18002099003)(22082099003)(56012099006)(6133799003)(10067099003)(921020)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiS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i7zIwWssWmqa/L1I95vVzVclzb0LCL38y5nPWFl44Ghg1U?= X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4abd90ef-2d67-4aef-fe02-08df057947a5 X-MS-Exchange-CrossTenant-AuthSource: ZQ4PR01MB1202.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Aug 2026 02:57:36.2240 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YfHNJILMhUqFlfjIvrD4toivl3OmeP9eKZRAd6z3w+T7hrVl1XeodUN5vyX92A0qe2VAbEpLCQ9WZt3RZLauXf01PZhTR64uXq/moluooqC5Gzoto+4aFlKVSCngcnKC X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZQ4PR01MB1153 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260828_195816_365805_056E3575 X-CRM114-Status: GOOD ( 10.96 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org Add 'input-debounce-ns' to the generic parameters used for parsing DT files, along with the corresponding configuration parameter PIN_CONFIG_INPUT_DEBOUNCE_NS. This allows debounce time to be specified in nanoseconds as an alternative to the existing 'input-debounce' property which uses microseconds Signed-off-by: Changhuang Liang --- drivers/pinctrl/pinconf-generic.c | 2 ++ include/linux/pinctrl/pinconf-generic.h | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c index 95c803c40a7d..36845517984e 100644 --- a/drivers/pinctrl/pinconf-generic.c +++ b/drivers/pinctrl/pinconf-generic.c @@ -43,6 +43,7 @@ static const struct pin_config_item conf_items[] = { PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH, "output drive strength", "mA", true), PCONFDUMP(PIN_CONFIG_DRIVE_STRENGTH_UA, "output drive strength", "uA", true), PCONFDUMP(PIN_CONFIG_INPUT_DEBOUNCE, "input debounce", "usec", true), + PCONFDUMP(PIN_CONFIG_INPUT_DEBOUNCE_NS, "input debounce", "nsec", true), PCONFDUMP(PIN_CONFIG_INPUT_ENABLE, "input enabled", NULL, false), PCONFDUMP(PIN_CONFIG_INPUT_SCHMITT, "input schmitt trigger", NULL, false), PCONFDUMP(PIN_CONFIG_INPUT_SCHMITT_UV, "input schmitt threshold", "uV", true), @@ -185,6 +186,7 @@ static const struct pinconf_generic_params dt_params[] = { { "drive-strength", PIN_CONFIG_DRIVE_STRENGTH, 0 }, { "drive-strength-microamp", PIN_CONFIG_DRIVE_STRENGTH_UA, 0 }, { "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 }, + { "input-debounce-ns", PIN_CONFIG_INPUT_DEBOUNCE_NS, 0 }, { "input-disable", PIN_CONFIG_INPUT_ENABLE, 0 }, { "input-enable", PIN_CONFIG_INPUT_ENABLE, 1 }, { "input-schmitt", PIN_CONFIG_INPUT_SCHMITT, 0 }, diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index a5d4b2d8633a..1df63c732b99 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h @@ -71,6 +71,10 @@ struct pinctrl_map; * which means it will wait for signals to settle when reading inputs. The * argument gives the debounce time in usecs. Setting the * argument to zero turns debouncing off. + * @PIN_CONFIG_INPUT_DEBOUNCE_NS: this will configure the pin to debounce mode, + * which means it will wait for signals to settle when reading inputs. The + * argument gives the debounce time in nsecs. Setting the + * argument to zero turns debouncing off. * @PIN_CONFIG_INPUT_ENABLE: enable the pin's input. Note that this does not * affect the pin's ability to drive output. 1 enables input, 0 disables * input. @@ -143,6 +147,7 @@ enum pin_config_param { PIN_CONFIG_DRIVE_STRENGTH, PIN_CONFIG_DRIVE_STRENGTH_UA, PIN_CONFIG_INPUT_DEBOUNCE, + PIN_CONFIG_INPUT_DEBOUNCE_NS, PIN_CONFIG_INPUT_ENABLE, PIN_CONFIG_INPUT_SCHMITT, PIN_CONFIG_INPUT_SCHMITT_ENABLE, -- 2.25.1 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv