Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp990778pxb; Fri, 22 Apr 2022 16:08:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzV9+zuIjVWPMfSmcyjUXspLhC8eyTTsMN5WxzFrgehGMJj/L81g0spwo9DVFHRhCwUCw02 X-Received: by 2002:a63:5565:0:b0:3a2:7450:5e94 with SMTP id f37-20020a635565000000b003a274505e94mr5704113pgm.527.1650668920537; Fri, 22 Apr 2022 16:08:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650668920; cv=pass; d=google.com; s=arc-20160816; b=gP0PkyuYV8nCHDyJP3JIhPVYwo2K1Ro2d05JuXWE+Y7wrk09gSsUuNjvT03dJe3RwI 5B6Wti6JUdWPNJE/KggbRDHTGrQ0rpFAMqMHsf46rImbrEHXG/w1dLLOfZeSln9Cax+T 8yj9E6I2TSZBreiUrX0rwfnhlP07cG8cIfoUL1W+O2LOh3vx62rKrvkHIPjHwtmF6WI8 76F2EXKiZ1F99sZKY7LfDi9rUOKhWFvZEpFp3sguS/lQguCu3qU4NBz1bWqFUOO508fk hRRksZWcI2H0zxE7n2R0Pphuzq2NscT7tFsj8wduYGvmpMa5YGIyNW3jznw0K8okdNRw XxoA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=arfCdPsLWsD+Wp0ypNL/XEOk0UeOVvq0Xn2HLNzr7i0=; b=0SKB7bO5eHD1MKxiho0VmvWkvEJTPPt3QR4hM3ifSPkgaiYLa89zGBJ+8lpWixvCpF Czbz2Jn2lfqR0iJap5R8ry7LMq+UdfePQyaAkrS4BamY2LN23JT3+yTxNxSCeeBO2rMU QipDUzVE+hCj+zC/SiZmsg2r1bo5bkBd3H6r0O6puNV1DNwrkWCszX8nFpe4zkoH9T1u 014iEKVAyV8qf9CWTQX8jMBQE4mj6+6zNzpe2Xy5S5WKddzTmqA6873uu7wyHrK9+U1f ILr4YSOwD7dIPc0YYlqFe2SlJAMQANRw2Rcry9ttRgAqdOuzhWMjo13QDLbPRjsAOKr9 mY8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="a0Z/mweS"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j8-20020a17090276c800b001569a746663si8834361plt.511.2022.04.22.16.08.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 16:08:40 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="a0Z/mweS"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 61EBB1B5BE2; Fri, 22 Apr 2022 15:08:09 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231879AbiDVWJQ (ORCPT + 99 others); Fri, 22 Apr 2022 18:09:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231716AbiDVWHe (ORCPT ); Fri, 22 Apr 2022 18:07:34 -0400 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam08on2085.outbound.protection.outlook.com [40.107.101.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 171E62220F6; Fri, 22 Apr 2022 13:52:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XChKhufiRIDYg3IXfhcdPip/izcW1xDMfRUwOEIhEQhUhBq6AFsqssHAat3dTyNpXChAF17PR9s5aXY2JirJMFSqfqTYQ5tHkGlfaF1AFg72AUOHi3vidX5s6PKV0WOXlMRK7nbiviXPuhdp/d8KsF1n17NUwmql/ils3sj6hL0OkoYwYBMC2mun4Wo1+1mbAgBC0thledIVGjLI/vddfEaYpaRlnesCrK07ZsOQr23JtJQrVlxAUY9NrTfS88CQm8n+ed7iE8iFzHEEeMI6od9wLZd5LOJAIdENiWfQPoCXP7L50VzAQ0w+Y7muIhsbZH1GtwZo5pKyKbG5ZBK9VQ== 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=arfCdPsLWsD+Wp0ypNL/XEOk0UeOVvq0Xn2HLNzr7i0=; b=GdzVHFdlcW81ckBrCiySDnfrSXE/aR2xj7OkBn6qLAaL3dsaR1W8MD4pLSTAYe4buTg31//9BN5a8C39HasXRPIHrkVl5XULhmglTFYpXWYUc50IUD/N2hwNBGOwkJwB3iUxJWnHMBO09wTC4aA67ZvFqkGg+eqYS9q82KIX6tMkEK5oQLqUmiGvtLHghBD29gYxTvqIKtaCMX4alDe1KJTomcXfEmI575MJueIFWbluA0NZkIxLeSPmkv6cn+mHinJ1crJMVXSi2ZPCqjFtgYlEVisqLwebkhfZ83biSQjl8SmWbv8SU2nQBcvow/HhpGpplCKvjSN8KssbqrWH3w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=gmail.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=arfCdPsLWsD+Wp0ypNL/XEOk0UeOVvq0Xn2HLNzr7i0=; b=a0Z/mweSWLN/0TXyRzvJ5vybwfvV7AZJxi1cajC8D6/CwpKnM8BBNu/GSYXPiY8ppkGImsfJtfVEdZLk35GW+d6/DktNXu3z3pl/IUqMH9r6hXWQP9xu7O0StRiThatHImq/VVdJa4bwtYy+iavfdK57YAVLUKKP7b+VWITmTZQBYUUInZgkX0a8KyTupQgj1jnKgj5EtZsm1A0ch4ZE9Wdevjn2fzJ5K0rFhOniOUKeZ/KowxRdJiYBrPzKpA0gb1I6tbE3Y0fEy34JqGSkw+w/R/fg1KXk4kVt0skWfseqElEeyQTJANhjIwBVAfTbF60/PgVClRZv4FE5dD+WYA== Received: from DM6PR18CA0017.namprd18.prod.outlook.com (2603:10b6:5:15b::30) by BYAPR12MB2712.namprd12.prod.outlook.com (2603:10b6:a03:65::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.25; Fri, 22 Apr 2022 20:52:28 +0000 Received: from DM6NAM11FT013.eop-nam11.prod.protection.outlook.com (2603:10b6:5:15b:cafe::d2) by DM6PR18CA0017.outlook.office365.com (2603:10b6:5:15b::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15 via Frontend Transport; Fri, 22 Apr 2022 20:52:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; Received: from mail.nvidia.com (12.22.5.236) by DM6NAM11FT013.mail.protection.outlook.com (10.13.173.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5186.14 via Frontend Transport; Fri, 22 Apr 2022 20:52:28 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 22 Apr 2022 20:52:27 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Fri, 22 Apr 2022 13:52:27 -0700 Received: from dipenp.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.22 via Frontend Transport; Fri, 22 Apr 2022 13:52:27 -0700 From: Dipen Patel To: , , , , , , , , , , , CC: Dipen Patel Subject: [PATCH v6 08/10] tools: gpio: Add new hardware clock type Date: Fri, 22 Apr 2022 13:52:19 -0700 Message-ID: <20220422205221.952-9-dipenp@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220422205221.952-1-dipenp@nvidia.com> References: <20220422205221.952-1-dipenp@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2fd97eda-f5ae-45d4-fbc6-08da24a20370 X-MS-TrafficTypeDiagnostic: BYAPR12MB2712:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qmmw4IR0toCcTApHUaZTPYNdVdX2xtJkzUpX+eqRe3N6iMsMZrbyiZY7aR7Usm0CyzxSqg3yASCy0RJsQvaVvEJIwyLZVejKXpKmRKrntFgSHwJErud7SZIxSIKI27U9Hw9YLvOXFjHG1C8Qqd6HR+1vQ5dmmGRrNdH0dv5KKvowg1vtDc1MrhMzIqJ4N2+aEPD6uXZRYuH1b3i8aY/yvda3VE9bmsZsN+WD80K4a+bRlWIidTSDKBUhbIbYb0SJ9TxwC5bWsDQGllWRx9pQEGfJVtiofDjIQNPng6CEpWHR0T6ZlulwDOJsal0mVAjUFImhgnW0g2lwvUmXkuWfDGRJmZwienxjr1lsQwk0A6Iv9R02+WSgFoRVKWlQ7kFGYYVTMrF7XpmKn1bXoo3uebR0Zljn+K19NK++jC9eWR9ufzbrARFB0xkHx6a7QH+cCqVYQZB6dv3cMV+157RvhJ14/qKypsLfKQyivxketcVA8yeV7w6gOS3QsFMojNStQ34r1poYKV0MMxJK5BOjDMJSKTd31aQDG9x7lY/RzqNaGDeFMXh6jvllG7PLmveweglamHD5m0d9UoOVCus1hH6EfVrqDPXyYpykL/im++xEqrELEM9VWJXApo2BNcZSbptjHt5VqddcTEwP5yS9BYLSRUNRCQwYPn3hvTlPRKSUmuXWphoX/e95ALBnP1RuTShwDkH6+zP/meqFOk2cJiZc4/IW3gE8MimPcwzdJ00VOxCMz8i76uJivB9JIpHhJfFOYoTGnqDdiMC4ROZxLg== X-Forefront-Antispam-Report: CIP:12.22.5.236;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:InfoNoRecords;CAT:NONE;SFS:(13230001)(4636009)(46966006)(36840700001)(40470700004)(36860700001)(36756003)(186003)(5660300002)(2616005)(47076005)(70206006)(81166007)(70586007)(1076003)(4326008)(8936002)(82310400005)(26005)(508600001)(40460700003)(6666004)(8676002)(86362001)(316002)(7416002)(2906002)(83380400001)(107886003)(921005)(356005)(110136005)(336012)(426003)(7696005)(2101003)(83996005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 20:52:28.6134 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2fd97eda-f5ae-45d4-fbc6-08da24a20370 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[12.22.5.236];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT013.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2712 X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 gpiolib-cdev is extended to support hardware clock type, this patch reflects that fact. Signed-off-by: Dipen Patel Reviewed-by: Linus Walleij --- tools/gpio/gpio-event-mon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/gpio/gpio-event-mon.c b/tools/gpio/gpio-event-mon.c index a2b233fdb572..6c122952c589 100644 --- a/tools/gpio/gpio-event-mon.c +++ b/tools/gpio/gpio-event-mon.c @@ -149,6 +149,7 @@ void print_usage(void) " -r Listen for rising edges\n" " -f Listen for falling edges\n" " -w Report the wall-clock time for events\n" + " -t Report the hardware timestamp for events\n" " -b Debounce the line with period n microseconds\n" " [-c ] Do loops (optional, infinite loop if not stated)\n" " -? This helptext\n" @@ -174,7 +175,7 @@ int main(int argc, char **argv) memset(&config, 0, sizeof(config)); config.flags = GPIO_V2_LINE_FLAG_INPUT; - while ((c = getopt(argc, argv, "c:n:o:b:dsrfw?")) != -1) { + while ((c = getopt(argc, argv, "c:n:o:b:dsrfwt?")) != -1) { switch (c) { case 'c': loops = strtoul(optarg, NULL, 10); @@ -208,6 +209,9 @@ int main(int argc, char **argv) case 'w': config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME; break; + case 't': + config.flags |= GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE; + break; case '?': print_usage(); return -1; -- 2.17.1