]> git.baikalelectronics.ru Git - kernel.git/commit
um: add a pseudo RTC
authorJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jan 2021 12:12:18 +0000 (13:12 +0100)
committerRichard Weinberger <richard@nod.at>
Fri, 12 Feb 2021 20:38:52 +0000 (21:38 +0100)
commitfcf818445cdfe25609bf8482aeba660cef4244aa
tree1536dfa429585580bdc252afb9bc0639d937d830
parent2202329b1073cff6e960ea6bc1535dce581f674a
um: add a pseudo RTC

Add a pseudo RTC that simply is able to send an alarm signal
waking up the system at a given time in the future.

Since apparently timerfd_create() FDs don't support SIGIO, we
use the sigio-creating helper thread, which just learned to do
suspend/resume properly in the previous patch.

For time-travel mode, OTOH, just add an event at the specified
time in the future, and that's already sufficient to wake up
the system at that point in time since suspend will just be in
an "endless wait".

For s2idle support also call pm_system_wakeup().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
arch/um/drivers/Kconfig
arch/um/drivers/Makefile
arch/um/drivers/rtc.h [new file with mode: 0644]
arch/um/drivers/rtc_kern.c [new file with mode: 0644]
arch/um/drivers/rtc_user.c [new file with mode: 0644]
arch/um/include/linux/time-internal.h
arch/um/kernel/time.c