From d8c1acb1664d17dd995e34507533321e986d9215 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Tue, 22 Sep 2009 16:46:32 -0700 Subject: rtc: add boot_timesource sysfs attribute CONFIG_RTC_HCTOSYS allows the kernel to read the system time from the RTC at boot and resume, avoiding the need for userspace to do so. Unfortunately userspace currently has no way to know whether this configuration option is enabled and thus cannot sensibly choose whether to run hwclock itself or not. Add a hctosys sysfs attribute which indicates whether a given RTC set the system clock. Signed-off-by: Matthew Garrett Acked-by: Alessandro Zummo Cc: Mark Brown Cc: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Documentation/rtc.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Documentation/rtc.txt') diff --git a/Documentation/rtc.txt b/Documentation/rtc.txt index 2745e8197fd..9104c106208 100644 --- a/Documentation/rtc.txt +++ b/Documentation/rtc.txt @@ -143,6 +143,8 @@ rtc attributes without requiring the use of ioctls. All dates and times are in the RTC's timezone, rather than in system time. date: RTC-provided date +hctosys: 1 if the RTC provided the system time at boot via the + CONFIG_RTC_HCTOSYS kernel option, 0 otherwise max_user_freq: The maximum interrupt rate an unprivileged user may request from this RTC. name: The name of the RTC corresponding to this sysfs directory -- cgit v1.2.3-70-g09d2