[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <fa133ada6c2f42ebe4f83998b7f3480b1a3b1f26.1348245523.git.richardcochran@gmail.com>
Date: Fri, 21 Sep 2012 19:00:26 +0200
From: Richard Cochran <richardcochran@...il.com>
To: <netdev@...r.kernel.org>
Cc: Ben Hutchings <bhutchings@...arflare.com>,
David Miller <davem@...emloft.net>,
Jacob Keller <jacob.e.keller@...el.com>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
John Stultz <john.stultz@...aro.org>,
Matthew Vick <matthew.vick@...el.com>
Subject: [PATCH net-next 2/3] ptp: provide the clock's adjusted frequency
If the timex.mode field indicates a query, then we provide the value of
the current frequency adjustment.
Signed-off-by: Richard Cochran <richardcochran@...il.com>
---
drivers/ptp/ptp_clock.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index fbd7104..6e47450 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -148,6 +148,11 @@ static int ptp_clock_adjtime(struct posix_clock *pc, struct timex *tx)
err = ops->adjfreq(ops, scaled_ppm_to_ppb(tx->freq));
ptp->dialed_frequency = tx->freq;
+
+ } else if (tx->modes == 0) {
+
+ tx->freq = ptp->dialed_frequency;
+ err = 0;
}
return err;
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists