Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp481890ybi; Tue, 16 Jul 2019 00:22:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6XyRo4VFQrCFEHtbnEEEL0jBbZDRTPGZdVca5gV7OubNgUY03/6eI0kTfY4N+3JaZg4j1 X-Received: by 2002:a17:902:aa03:: with SMTP id be3mr33308049plb.240.1563261767396; Tue, 16 Jul 2019 00:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563261767; cv=none; d=google.com; s=arc-20160816; b=elxncAv4JgY97iV+J+8Gkgu5F8jnLfkZAp7zU89eE7R3GI2ygcVIAmqOn5CgaWIxti fi39UlAQ4zHVabHiuB/jJCMk/TduUGcw+0d14uK7pHnTBsJA3JEGK+hdi9qxQhKmUNfR +LHh8E/YhG2ejeU42SUSf2CbHddbbTZomhuMTR7UnFWv5UUe89ik1HSmuFNbf9+CXYh9 5GKCL5AC7kLON9EJ/BFAtRLAmA1mGgjh5TcuS+ydelPHm48IdMDeJbyClnGpa7H4A9L1 clapEqo2b2GVT05ruZXf4RpMhRVq7aLHLB3cPgHLQuLtpA0co0wdIT7MTG9R2++3Xotr 3DwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=DCgG8bT4eiMMDP/a24yy0f4n4yHttN42qkaJJHQHHHU=; b=CrfSKYHhqu0qiwzliSCEPh3smtawTdaVx65fxhHmzNMEQa/3Uj9Z9xPusAOLfrL6tB cmqkc27svri2jWjTgXl/ncwQLOY5ecip/9pi+fJb5k3dXUBSU+rwfx8kxGMafXDHG6eM oqHxKvHFKpCPXQSHdrAmYuAO9xRueWgvxoxhjMep5Vv9UL1xsKc9buiDEck5/uf0WbPu 3rzGNq6R0+mmmWUOwKSlQsCx7Jj4Ms53iZl1rnFoFkRqRuuCSmvpJtZovS1vJ+vjpkJ/ VT758gsG56i7hSgV+RgRqOGeyyZ3CBAwBcbHfSIGmYXR94WZOp1LNYH6TxZ+DnBttg5r 8Ftw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3si19184380pgo.241.2019.07.16.00.22.30; Tue, 16 Jul 2019 00:22:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730754AbfGPHUz (ORCPT + 99 others); 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