Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1993957rdb; Tue, 3 Oct 2023 07:21:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHK7UGQEwHCjBBL7Suxx4KpPLdU5rXdnO01qTsnjWeslyIwDFkg9zN5na8kfd10Qs/wwAtl X-Received: by 2002:a17:902:b286:b0:1c6:1c80:5663 with SMTP id u6-20020a170902b28600b001c61c805663mr11573738plr.41.1696342873735; Tue, 03 Oct 2023 07:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696342873; cv=none; d=google.com; s=arc-20160816; b=ux2D6oOp5g6021b4YrVbyORD8wGZnaLiyJJ/yn9GB0mbtL9jekPXJWSIbrEiOTTuHj OirWVCUaow2pha8e9d+OtwY1/yPJ3SI5V5xcu16p0KGnygaFAklpoHOnpoutxqmou1uO n1hdP1y7sf2PmNVzrlv+BSUTQsfZthPfuK/VhpReq65ypXf0R1J7LxhRVKO4dcPRymoO T68hLV+kRfC0bCMRu3WXYXK73RxQf40NEIwYVgEYBnbge28WQrAWWtN8Q2kZ1WeQKxsb jKPMU388TWIPnSWvL8intRmyBfGcqn4dXcygjb38YVWB5o+byRCGfqmSzvVgS30+5BTR GOlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=a0u+F3CW+y33U7Hm78Nd9GolUx4PH/UK97Vlippeu+s=; fh=tcLGLeRSh4TMp9+RV6D4hs9OoUpLOmlmlsn/cDIOrfo=; b=SEZ2bH0n89xl2LIamyFbp3eM5q5ijJMMUv5f6GYml6L3uxDPBKY6rNeGKxUFWrOIM2 Tf6PUmab/+H5SxI4YpWC8rffzevIGQUZo/z/zkuP3OMfqOLGdaZxftgxVoLVWquwpIKd YZd2WX/Ps73E/68+LeWWlBKo7mzz5jaKdv3789JOrCcx2U6cw+LydXo1ve/bzJON65+t Hv38wbc6j2NXsAEfjj0skzh/dF2k6xlD+zngJCRylkNXnkm8ammpUPhL0C+nq3EkKNTa UAgUi8YhpJT9aT8vUXhQwhEHRAwHM+KcjFeqFnI3ta2KXr8ZQ8guMhfgsb4Wn+DnCAp2 rnqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lSgAGnbQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id lm15-20020a170903298f00b001b89551a392si1614652plb.113.2023.10.03.07.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 07:21:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lSgAGnbQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id B6D3080EE737; Tue, 3 Oct 2023 07:21:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232575AbjJCOUy (ORCPT + 99 others); Tue, 3 Oct 2023 10:20:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232459AbjJCOUx (ORCPT ); Tue, 3 Oct 2023 10:20:53 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43FC3A3 for ; Tue, 3 Oct 2023 07:20:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 673EDC433C8; Tue, 3 Oct 2023 14:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696342849; bh=kijvf7JbMse2Pa56drfQ4oD20Lx+m2oWU3VtMOZGsPE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lSgAGnbQfr7tHgoiwKO/rNA1dl/Zxqmh0lmh3HxZxe8HEsShwZy9yRL7Vu7TsUcI7 GIwvAnwtlUHJt5YOLVp0kn2Q37A4g1GNVVSqQ1V0URKg0k0GAhFUnTIGw6tTwYe7cJ gUs1GFE3wzu5vyIEhvVrOhKGw0h9FD5DMnDQ3ypJhIXHnab7Cu0T8kAoQFjZ+183/Q Evnlvxy764/PuXtXIS42FdnS8ZjMOJ+WiVXc8Vh/teYch7gYVAMA8JW9wNZl0nbT5E wHSykFeXb8Dd21N/Z2QG7800lXgnH7hHmmxyt6hDpR2cfb7hGPPMmGIJnbvGq98LbM rWlW1ZMrarLvw== Date: Tue, 3 Oct 2023 16:20:45 +0200 From: Simon Horman To: Mahesh Bandewar Cc: Netdev , Linux , David Miller , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Jonathan Corbet , John Stultz , Don Hatchett , Yuliang Li , Mahesh Bandewar , Richard Cochran Subject: Re: [PATCHv2 next 1/3] ptp: add ptp_gettimex64any() support Message-ID: References: <20231003041701.1745953-1-maheshb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231003041701.1745953-1-maheshb@google.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 07:21:10 -0700 (PDT) On Mon, Oct 02, 2023 at 09:17:01PM -0700, Mahesh Bandewar wrote: > add support for TS sandwich of the user preferred timebase. The options > supported are PTP_TS_REAL (CLOCK_REALTIME), PTP_TS_MONO (CLOCK_MONOTONIC), > and PTP_TS_RAW (CLOCK_MONOTONIC_RAW) > > Option of PTP_TS_REAL is equivalent of using ptp_gettimex64(). > > Signed-off-by: Mahesh Bandewar > CC: Richard Cochran > CC: "David S. Miller" > CC: netdev@vger.kernel.org > --- > include/linux/ptp_clock_kernel.h | 51 ++++++++++++++++++++++++++++++++ > include/uapi/linux/ptp_clock.h | 7 +++++ > 2 files changed, 58 insertions(+) > > diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h > index 1ef4e0f9bd2a..fd7be98e7bba 100644 > --- a/include/linux/ptp_clock_kernel.h > +++ b/include/linux/ptp_clock_kernel.h > @@ -102,6 +102,15 @@ struct ptp_system_timestamp { > * reading the lowest bits of the PHC timestamp and the second > * reading immediately follows that. > * > + * @gettimex64any: Reads the current time from the hardware clock and > + optionally also any of the MONO, MONO_RAW, or SYS clock. nit: I think a '*' is needed on the line above. > + * parameter ts: Holds the PHC timestamp. > + * parameter sts: If not NULL, it holds a pair of timestamps from > + * the clock of choice. The first reading is made right before > + * reading the lowest bits of the PHC timestamp and the second > + * reading immediately follows that. > + * parameter type: any one of the TS opt from ptp_timestamp_types. > + * > * @getcrosststamp: Reads the current time from the hardware clock and > * system clock simultaneously. > * parameter cts: Contains timestamp (device,system) pair, ...