Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1575793pxv; Fri, 25 Jun 2021 16:53:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgUUp8KnEGImza1CTorS/Lheict0qXJZr7gXj5zK1qivgCriKi3x0w+HtGLUdnuvhQfjSi X-Received: by 2002:a17:906:3884:: with SMTP id q4mr13679204ejd.66.1624665218734; Fri, 25 Jun 2021 16:53:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1624665218; cv=pass; d=google.com; s=arc-20160816; b=qzk2a0LOT4TJqn720JQ6jRVptABJSfuGnz9nSISjlRzFWWTxK3DwDvMrnKlNgU3Xte wfdB/JuxvdOcSh4uFTwXedJbmpqNGoOeE5pAD++yRmGDwUNR5qf+4mthigFnLb0c0Q66 zniyg4pLkUnjyuVELSGbeXFEnV8ZhchZvkSmY8Kq5Hj4Fu+QsBveOf4VtZlwKP2x3pSK BD3LkhSy0VVAVsQhmD9Tu7yUxLFjmDmAHZImaGPLfFDdZu3zfsj1RolMVsdfYXkm/e41 9MqDwAOqvjZ+lWKqjfrCfvcewvYQZHjNndfb2nbcFKDfl2F5Df1y6fzL7MSUyAFSKdAY fVBQ== 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:to:from:dkim-signature; bh=R+QUMly0wgQmi3zZsX6Jm0toUKr6OBDIik4TO+aYfsE=; b=amwdECI2N/TvxQ7IpBbc0/WhxJ80w6qiqN0GGT+dpsgxSUg+MyC6dTNW3mfTqN8rnZ OIMD66Deu43HRzXdLVD0AGL3+IreiEY+cFFu9sazCiA41khYpNKWEGsTNvOoy2IcxTTP vDeo4LpPG1kPbyzwgl2rLEEPeqzj9+uBH0PhrfNrl91de9+5a/AlZI9pwKI3QMgKb+IU Z2p/sdxxT6X5JQFW2ftH1ry43+vatw0FkuJVmoguOK5LjSPymwi/SJ4ByiZfMUM3zE27 1VNun3ksg+tQgOOHjYlCoJAAyimCr3l8L/J6a2Ue3Dfai43+/RrsSNgaXNwkIwvAKOpH VQag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=l6mjSqfy; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si9318679ejh.718.2021.06.25.16.53.04; Fri, 25 Jun 2021 16:53:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=l6mjSqfy; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230363AbhFYXvJ (ORCPT + 99 others); Fri, 25 Jun 2021 19:51:09 -0400 Received: from mail-dm6nam11on2056.outbound.protection.outlook.com ([40.107.223.56]:18816 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230041AbhFYXuj (ORCPT ); Fri, 25 Jun 2021 19:50:39 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NfYP0bfLU9TerwkPwXqA+9rSSYjracjKTGxu4p+EznEqHMkZ1srMvF1VlpoGUIJCVKs4Skww0tOiyYxd232V8KnP4H/RwIqkxlRvCaqxw5jOiQsDuKBP58Zz49ImsXADjbQ56W48NFc9+Cb9aPslltV4kmNkFPw5MuJnt0Bd43mLoDt8Bsl97OpRYdAz+/UKR/u72HCFiiPl+RV9ZHrbCvgJfymd0/nS09Wjr0Uz15+Mw6ASHNXlj/EKVfaVGc3nJ5AroCU+v+tdZpzwFd/ezbNuoe0iokxqtKHhQJw2LNKF13juo/CB5vZ+4Pjkpy0Tf+jFE2RRtlKOBtWRDRFdew== 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-SenderADCheck; bh=R+QUMly0wgQmi3zZsX6Jm0toUKr6OBDIik4TO+aYfsE=; b=k+Jhgt3SGbFOyIp4HeeF0RAVo2FgIgdllJ3/sMOlrNVC4Mld69+vqEX171tZjyEMXzOoEDuz8qH0bnlmEDCgfOTgOKVKQyueOU2sheBh2OP+3TmNglL+vkom2QNLpHa8/N4XmAPwKxYsNwf6JSqNiTHjUC3JerjfbKjDl5mm9vC7k0co048r8lmNO9Ulm9FJKoRu8ik1Wp0ZSDTaaJW3T6X3UhERDD7rqh7cmy1lv4yabYS8Cl1SQoF1FqeO1EvCosvtSQqMamgIJ/w+Ebbie8RWTqBy2YSJjq0dvZZHJA5/5YOgaFxVWp8WYr4n0ic1WaB5or1+ptoH49ugy4bvtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.36) smtp.rcpttodomain=gmail.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=R+QUMly0wgQmi3zZsX6Jm0toUKr6OBDIik4TO+aYfsE=; b=l6mjSqfyIlUiFZ/0e8TczjErMW2ODEzs+Datvk/xXCdQN8GQFZejSkAnz9vAAQbV4p4JG7Xq8jpHy4VdMgMWVWIkn+7iNhVKkEPoZL59gxyWiHOLoXZfYie9lemNDS4oPiRvBEEFqRV+uCDqCtwQDwRd+8gsvaXsr/dFAmWAFtBdw52DfLnc2TDCqASWl+z3Av9qraFpXlQmrKBQ7kR7gPL+U1sULA79tQExrk4AYa1b7bAZgZ8bZwq1PEnyT2wkl2IxwaPpO90+wlJentrkyl9DICi8eOLx6tAnvHesK++nvHaZcJZYEuGD25BwADoQJkYM+EjmiHP3h/tONeAxsg== Received: from DM6PR04CA0006.namprd04.prod.outlook.com (2603:10b6:5:334::11) by MW3PR12MB4443.namprd12.prod.outlook.com (2603:10b6:303:2d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18; Fri, 25 Jun 2021 23:48:16 +0000 Received: from DM6NAM11FT062.eop-nam11.prod.protection.outlook.com (2603:10b6:5:334:cafe::54) by DM6PR04CA0006.outlook.office365.com (2603:10b6:5:334::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.18 via Frontend Transport; Fri, 25 Jun 2021 23:48:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.36) smtp.mailfrom=nvidia.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.36 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.36; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.36) by DM6NAM11FT062.mail.protection.outlook.com (10.13.173.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4264.18 via Frontend Transport; Fri, 25 Jun 2021 23:48:16 +0000 Received: from HQMAIL101.nvidia.com (172.20.187.10) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 25 Jun 2021 23:48:14 +0000 Received: from dipenp.nvidia.com (172.20.187.6) by mail.nvidia.com (172.20.187.10) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 25 Jun 2021 23:48:14 +0000 From: Dipen Patel To: , , , , , , , , , , , Subject: [RFC 09/11] tools: gpio: Add new hardware clock type Date: Fri, 25 Jun 2021 16:55:30 -0700 Message-ID: <20210625235532.19575-10-dipenp@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210625235532.19575-1-dipenp@nvidia.com> References: <20210625235532.19575-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: 6aa0bc96-909f-47ce-c818-08d93833b3dc X-MS-TrafficTypeDiagnostic: MW3PR12MB4443: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qMw7dEdVtBg5I6vBLAncRBJr2Mbs4IwUOpNYl4zJBMxjb7k65vyWQHa4Fol59gTJMvjPigttJPNITSkR4Sp69fLZmjtr4UcnU2a7kiW7S3VPdmdukqYvRKHvfxVijhtYyeHWVCxRLR1KFZ4pEZVGUaZSznO5CFLvYN2cEWnwo1k/42e+baO7SP+Y2VIa+HEZsVXJwLFHn+QIp8RnDqE+ackOtF11htpJSYnGXgsuFdD6svsjssR5E5L2n8d8VyeTQwTrCYV13vAOVrkgb1qY9KepkJ43+KxWko6Iyo2D2/2hiADN5B50Mb8vUId33UkjLYG76AtpvcIAG2az+T4LlNwBJrdbR5sd14o+/CDj0shqukrZPZaIT9B7ej3mhi1LLo7zLfHBsBe5A6K8QwO2UbxVV2aB0SlXmZGjZl0LE37jA5LWEOlhy9fbjc/hy6/7leIQaPOq+e4rdlsQjjijUIJ0sUydHz9uH6+EpR+7r505/+nDF9YyB5DPBMYWsj3NWngdT1FkZa9x3v++nEBUVcKTBDRLCspafivv3DxxYGOhq/lNP/IGQOaDBiB6CbrZRUj7xlcKQ5cMQKG635unwuhssS7F22YrxdossxUH0ALgW2dDTAAMYQH8sp3EfsY4Vhml4t0fJKnRx+dCzSic1CAlDWShPWkBs+svCbDPRpHHW8/pEzdj8fbadhYxzE/ljNuLGqKpQS/OjUciMk1EEB7/82FkIa9NHgF28BawtXb+kSrsss2mcZDZqngFC1RbqGBCrArRugRuAF+JNJ3pIg== X-Forefront-Antispam-Report: CIP:216.228.112.36;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid05.nvidia.com;CAT:NONE;SFS:(4636009)(39860400002)(346002)(396003)(136003)(376002)(36840700001)(46966006)(83380400001)(356005)(2906002)(8936002)(70206006)(478600001)(70586007)(82740400003)(2616005)(426003)(336012)(36756003)(7416002)(110136005)(7636003)(86362001)(316002)(5660300002)(26005)(6666004)(1076003)(921005)(36860700001)(8676002)(82310400003)(186003)(7696005)(47076005)(83996005)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2021 23:48:16.0554 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6aa0bc96-909f-47ce-c818-08d93833b3dc X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.36];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT062.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4443 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 --- 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..bed52333698d 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_HARDWARE; + break; case '?': print_usage(); return -1; -- 2.17.1