aboutsummaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-goldfish.c
AgeCommit message (Collapse)AuthorFilesLines
2024-06-28rtc: add missing MODULE_DESCRIPTION() macroJeff Johnson1-0/+1
On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/lib_test.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-goldfish.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-omap.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-rc5t583.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-tps65910.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/rtc/rtc-twl.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes rtc-mpc5121.c, which does not produce a warning with the x86 allmodconfig since it is not built for x86, but it may cause this warning with Freescale PPC configurations. Signed-off-by: Jeff Johnson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2022-04-11clocksource/drivers: Add a goldfish-timer clocksourceLaurent Vivier1-12/+1
Add a clocksource based on the goldfish-rtc device. Move the timer register definition to <clocksource/timer-goldfish.h> This kernel implementation is based on the QEMU upstream implementation: https://git.qemu.org/?p=qemu.git;a=blob_plain;f=hw/rtc/goldfish_rtc.c goldfish-timer is a high-precision signed 64-bit nanosecond timer. It is part of the 'goldfish' virtual hardware platform used to run some emulated Android systems under QEMU. This timer only supports oneshot event. Signed-off-by: Laurent Vivier <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
2022-04-11rtc: goldfish: Use gf_ioread32()/gf_iowrite32()Laurent Vivier1-15/+16
Replace readl()/writel() by gf_ioread32()/gf_iowrite32() as done for goldfish-tty. Signed-off-by: Laurent Vivier <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
2020-11-19rtc: rework rtc_register_device() resource managementBartosz Golaszewski1-1/+1
rtc_register_device() is a managed interface but it doesn't use devres by itself - instead it marks an rtc_device as "registered" and the devres callback for devm_rtc_allocate_device() takes care of resource release. This doesn't correspond with the design behind devres where managed structures should not be aware of being managed. The correct solution here is to register a separate devres callback for unregistering the device. While at it: rename rtc_register_device() to devm_rtc_register_device() and add it to the list of managed interfaces in devres.rst. This way we can avoid any potential confusion of driver developers who may expect there to exist a corresponding unregister function. Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-07-16rtc: goldfish: Enable interrupt in set_alarm() when necessaryHuacai Chen1-0/+1
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 <[email protected]> Signed-off-by: Jiaxun Yang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-05-30rtc: goldfish: Use correct return value for goldfish_rtc_probe()Tiezhu Yang1-1/+1
When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Signed-off-by: Tiezhu Yang <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2019-10-06rtc: Use devm_platform_ioremap_resource()Markus Elfring1-7/+1
Simplify probe by using a known wrapper function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Akinobu Mita <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2019-04-04rtc: goldfish: convert to SPDX identifierAlexandre Belloni1-10/+1
Use SPDX-License-Identifier instead of a verbose license text Signed-off-by: Alexandre Belloni <[email protected]>
2019-04-04rtc: goldfish: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni1-19/+8
This RTC handles dates after 2106 (up to July 2554), call the 64bit versions of rtc_tm time conversion. Signed-off-by: Alexandre Belloni <[email protected]>
2019-04-04rtc: goldfish: allow building on more than MIPSAlexandre Belloni1-0/+1
Goldfish can be ARM or x86, allow building the driver for more than just MIPS. Signed-off-by: Alexandre Belloni <[email protected]>
2019-04-04rtc: goldfish: sort headersAlexandre Belloni1-1/+1
Sort headers alphabetically. Signed-off-by: Alexandre Belloni <[email protected]>
2019-04-04rtc: goldfish: add rangeAlexandre Belloni1-0/+1
This RTC has a 64bit nanosecond counter. Signed-off-by: Alexandre Belloni <[email protected]>
2019-04-04rtc: goldfish: convert to devm_rtc_allocate_deviceAlexandre Belloni1-4/+4
This allows further improvement of the driver. Signed-off-by: Alexandre Belloni <[email protected]>
2018-02-13rtc: goldfish: Add missing MODULE_LICENSEJames Hogan1-0/+2
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: f22d9cdcb5eb ("rtc: goldfish: Add RTC driver for Android emulator") Signed-off-by: James Hogan <[email protected]> Cc: Miodrag Dinic <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: [email protected] Signed-off-by: Alexandre Belloni <[email protected]>
2017-09-01rtc: goldfish: Add RTC driver for Android emulatorMiodrag Dinic1-0/+237
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 <[email protected]> Signed-off-by: Goran Ferenc <[email protected]> Signed-off-by: Aleksandar Markovic <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>