summaryrefslogtreecommitdiffstats
path: root/drivers/ptp/ptp_clock.c
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2012-09-22 09:02:01 +0200
committerDavid S. Miller <davem@davemloft.net>2012-09-22 21:41:29 +0200
commit39a8cbd9ca051fb164db70315e7972de5c153c33 (patch)
treec273bdec9420a47bf34a6e8985b102481d41bca3 /drivers/ptp/ptp_clock.c
parentMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsh... (diff)
downloadlinux-39a8cbd9ca051fb164db70315e7972de5c153c33.tar.xz
linux-39a8cbd9ca051fb164db70315e7972de5c153c33.zip
ptp: remember the adjusted frequency
This patch adds a field to the representation of a PTP hardware clock in order to remember the frequency adjustment value dialed by the user. Adding this field will let us answer queries in the manner of adjtimex in a follow on patch. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp/ptp_clock.c')
-rw-r--r--drivers/ptp/ptp_clock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index 966875dcda56..67e628ee0365 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -147,6 +147,7 @@ static int ptp_clock_adjtime(struct posix_clock *pc, struct timex *tx)
} else if (tx->modes & ADJ_FREQUENCY) {
err = ops->adjfreq(ops, scaled_ppm_to_ppb(tx->freq));
+ ptp->dialed_frequency = tx->freq;
}
return err;