ntp: Make the RTC sync offset less obscure
[linux-2.6-microblaze.git] / drivers / rtc / class.c
index d795737..5855aa2 100644 (file)
@@ -200,8 +200,13 @@ static struct rtc_device *rtc_allocate_device(void)
 
        device_initialize(&rtc->dev);
 
-       /* Drivers can revise this default after allocating the device. */
-       rtc->set_offset_nsec =  5 * NSEC_PER_MSEC;
+       /*
+        * Drivers can revise this default after allocating the device.
+        * The default is what most RTCs do: Increment seconds exactly one
+        * second after the write happened. This adds a default transport
+        * time of 5ms which is at least halfways close to reality.
+        */
+       rtc->set_offset_nsec = NSEC_PER_SEC + 5 * NSEC_PER_MSEC;
 
        rtc->irq_freq = 1;
        rtc->max_user_freq = 64;