OSDN Git Service

Find wall clock RTC through sysfs
authorGreg Hackmann <ghackmann@google.com>
Wed, 26 Feb 2014 20:22:13 +0000 (12:22 -0800)
committerGreg Hackmann <ghackmann@google.com>
Tue, 13 Jan 2015 20:16:56 +0000 (12:16 -0800)
commit0eb5826830592695f4a5b4d1dba18e0ca991163e
treee99cf4f2ed5efd25c966384acc6495e2d586e547
parent66b4d48469c74f7dd889f3f685b436fcb957bf16
Find wall clock RTC through sysfs

Devices may have multiple RTCs.  By default the kernel uses rtc0 to
store the system time, but devices may override this (or even specify
that none of them should be used for system time).

Userspace can indirectly find the designated RTC through sysfs.  During
AlarmManagerService initialization, enumerate through all rtc class
devices to locate the device with attribute hctosys=1.

This is only done on devices without /dev/alarm, which has its own
in-kernel mechanism to pick the RTC.

Change-Id: Ife2b342c3590133ed316ddaf1799cbc1bfa6e6d9
Signed-off-by: Greg Hackmann <ghackmann@google.com>
services/core/jni/com_android_server_AlarmManagerService.cpp