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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D918C76188 for ; Tue, 16 Jul 2019 07:20:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5FF7F21738 for ; Tue, 16 Jul 2019 07:20:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730795AbfGPHUz (ORCPT ); Tue, 16 Jul 2019 03:20:55 -0400 Received: from mga09.intel.com ([134.134.136.24]:64887 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730443AbfGPHUx (ORCPT ); Tue, 16 Jul 2019 03:20:53 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jul 2019 00:20:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,496,1557212400"; d="scan'208";a="194796206" Received: from pipin.fi.intel.com ([10.237.72.175]) by fmsmga002.fm.intel.com with ESMTP; 16 Jul 2019 00:20:50 -0700 From: Felipe Balbi To: Richard Cochran Cc: netdev@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, "Christopher S . Hall" , Felipe Balbi Subject: [RFC PATCH 2/5] PTP: add a callback for counting timestamp events Date: Tue, 16 Jul 2019 10:20:35 +0300 Message-Id: <20190716072038.8408-3-felipe.balbi@linux.intel.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190716072038.8408-1-felipe.balbi@linux.intel.com> References: <20190716072038.8408-1-felipe.balbi@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This will be used for frequency discipline adjustments. Signed-off-by: Felipe Balbi --- include/linux/ptp_clock_kernel.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h index 28eb9c792522..1a4e3f916128 100644 --- a/include/linux/ptp_clock_kernel.h +++ b/include/linux/ptp_clock_kernel.h @@ -35,6 +35,16 @@ struct ptp_system_timestamp { struct timespec64 post_ts; }; +/** + * struct ptp_event_count_tstamp - device time vs event count for frequency discipline + */ +struct ptp_event_count_tstamp { + unsigned int index; + + struct ptp_clock_time device_time; + u64 event_count; +}; + /** * struct ptp_clock_info - decribes a PTP hardware clock * @@ -134,6 +144,8 @@ struct ptp_clock_info { struct ptp_system_timestamp *sts); int (*getcrosststamp)(struct ptp_clock_info *ptp, struct system_device_crosststamp *cts); + int (*counttstamp)(struct ptp_clock_info *ptp, + struct ptp_event_count_tstamp *count); int (*settime64)(struct ptp_clock_info *p, const struct timespec64 *ts); int (*enable)(struct ptp_clock_info *ptp, struct ptp_clock_request *request, int on); -- 2.22.0