1
0
Fork 0
Commit Graph

9 Commits (redonkable)

Author SHA1 Message Date
Huacai Chen f948f1d022 rtc: goldfish: Enable interrupt in set_alarm() when necessary
[ Upstream commit 22f8d5a1bf ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-08-26 10:40:54 +02:00
Alexandre Belloni 2be7f1b5d0 rtc: goldfish: convert to SPDX identifier
Use SPDX-License-Identifier instead of a verbose license text

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:09 +02:00
Alexandre Belloni b509306d1f rtc: goldfish: switch to rtc_time64_to_tm/rtc_tm_to_time64
This RTC handles dates after 2106 (up to July 2554), call the 64bit
versions of rtc_tm time conversion.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:09 +02:00
Alexandre Belloni 6a6ec8c15d rtc: goldfish: allow building on more than MIPS
Goldfish can be ARM or x86, allow building the driver for more than just
MIPS.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:08 +02:00
Alexandre Belloni bd01386e2c rtc: goldfish: sort headers
Sort headers alphabetically.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:08 +02:00
Alexandre Belloni 5e2954fd8e rtc: goldfish: add range
This RTC has a 64bit nanosecond counter.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:08 +02:00
Alexandre Belloni 409b84e3eb rtc: goldfish: convert to devm_rtc_allocate_device
This allows further improvement of the driver.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04 10:07:08 +02:00
James Hogan 82d632b85e rtc: goldfish: Add missing MODULE_LICENSE
Fix the following warning in MIPS allmodconfig by adding a
MODULE_LICENSE() at the end of rtc-goldfish.c, based on the file header
comment which says GNU General Public License version 2:

WARNING: modpost: missing MODULE_LICENSE() in drivers/rtc/rtc-goldfish.o

Fixes: f22d9cdcb5 ("rtc: goldfish: Add RTC driver for Android emulator")
Signed-off-by: James Hogan <jhogan@kernel.org>
Cc: Miodrag Dinic <miodrag.dinic@mips.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: linux-rtc@vger.kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-02-13 21:46:04 +01:00
Miodrag Dinic f22d9cdcb5 rtc: goldfish: Add RTC driver for Android emulator
Add device driver for a virtual RTC device in Android emulator.

The compatible string used by OS for binding the driver is defined
as "google,goldfish-rtc".

Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
Signed-off-by: Goran Ferenc <goran.ferenc@imgtec.com>
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
2017-09-01 01:10:18 +02:00