rtc: goldfish: Enable interrupt in set_alarm() when necessary
authorHuacai Chen <chenhc@lemote.com>
Sat, 20 Jun 2020 12:04:43 +0000 (20:04 +0800)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 16 Jul 2020 09:15:43 +0000 (11:15 +0200)
commit22f8d5a1bf230cf8567a4121fc3789babb46336d
tree72cb58f4a9bf02254a9b6aeedc3ad4f301598fc9
parentd8f090dbeafdcc3d30761aa0062f19d1adf9ef08
rtc: goldfish: Enable interrupt in set_alarm() when necessary

When use goldfish rtc, the "hwclock" command fails with "select() to
/dev/rtc to wait for clock tick timed out". This is because "hwclock"
need the set_alarm() hook to enable interrupt when alrm->enabled is
true. This operation is missing in goldfish rtc (but other rtc drivers,
such as cmos rtc, enable interrupt here), so add it.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/1592654683-31314-1-git-send-email-chenhc@lemote.com
drivers/rtc/rtc-goldfish.c