Skip to contentSkip to conversation

Calculate the monotonic clock from the timespec clock to generate PPS elapsed real-time event value and stores the result into /sys/class/pps/pps0/assert_elapsed.

PATCH New Alexander Komrakov 1 participant 2 messages Jan 10, 2022 PPS support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Calculate the monotonic clock from the timespec clock to generate PPS elapsed real-time event value and stores the result into /sys/class/pps/pps0/assert_elapsed.

From: alexander komrakov <[email protected]>

*** BLURB HERE ***

alexander komrakov (1):

Replacing ktime_get_ts64 by ktime_get_boottime_ts64 because elapsedRealtime includes time spent in sleep and pps should be also including sleep time.

 drivers/pps/kapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 15 lines
2.25.1


-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.
#1 lore raw

PATCH 1/1 Signed-off-by: alexander komrakov <[email protected]> Replacing ktime_get_ts64 by ktime_get_boottime_ts64 because elapsedRealtime includes time spent in sleep and pps should be also including sleep time.

From: alexander komrakov <[email protected]>

---
 drivers/pps/kapi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pps/kapi.c +1 -1
index 149c29e498fc..6d1fbe4a8c40 100644
@@ -38,7 +38,7 @@ static __u64 clock_gettime(struct pps_ktime *kt)
 {
 	struct timespec64 ts = { .tv_sec = 0, .tv_nsec = 0 };
 
-	ktime_get_ts64(&ts);
+	ktime_get_boottime_ts64(&ts);
 	kt->sec = ts.tv_sec;
 	kt->nsec = ts.tv_nsec;
 	return (__u64) ts.tv_sec * NANOSEC_PER_SEC + ts.tv_nsec;
Signature · 15 lines
2.25.1


-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.