History log of /linux-master/drivers/rtc/rtc-sun4v.c
Revision Date Author Comments
# fdcfd854 09-Nov-2020 Bartosz Golaszewski <bgolaszewski@baylibre.com>

rtc: rework rtc_register_device() resource management

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 <bgolaszewski@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20201109163409.24301-8-brgl@bgdev.pl


# 64bef02c 22-Mar-2019 Alexandre Belloni <alexandre.belloni@bootlin.com>

rtc: sun4v: switch to SPDX identifier

Use SPDX-License-Identifier to be clearer on the license. Choose the v2
only as this is the default Linux license.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>


# 3ec99d61 22-Mar-2019 Alexandre Belloni <alexandre.belloni@bootlin.com>

rtc: sun4v: set range

The Sun4v Hypervisor Core API Specification states:
Time is described by a single unsigned 64-bit word equivalent to a time_t
for the POSIX time(2) system call. The word contains the time since the
Epoch (00:00:00 UTC, January 1, 1970), measured in seconds.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>


# 65c6f638 22-Mar-2019 Alexandre Belloni <alexandre.belloni@bootlin.com>

rtc: sun4v: switch to rtc_time64_to_tm/rtc_tm_to_time64

Call the 64bit versions of rtc_tm time conversion as the hypervisor handles
64bit values.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>


# 8b610253 31-Oct-2016 Paul Gortmaker <paul.gortmaker@windriver.com>

rtc: sparc: make sun4v explicitly non-modular

The Kconfig currently controlling compilation of this code is:

drivers/rtc/Kconfig:config RTC_DRV_SUN4V
drivers/rtc/Kconfig: bool "SUN4V Hypervisor RTC"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

We delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Cc: rtc-linux@googlegroups.com
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>


# 0929ae37 20-Oct-2014 Wolfram Sang <wsa@kernel.org>

rtc: drop owner assignment from platform_drivers

A platform_driver does not need to set an owner, it will be populated by the
driver core.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>


# d55b6643 03-Jul-2013 Sachin Kamat <sachin.kamat@linaro.org>

drivers/rtc/rtc-sun4v.c: remove empty function

After the switch to devm_* functions and the removal of
rtc_device_unregister(), the 'remove' function does not do anything.
Delete it.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# cc40d642 29-Apr-2013 Jingoo Han <jg1.han@samsung.com>

rtc: rtc-sun4v: use devm_rtc_device_register()

devm_rtc_device_register() is device managed and makes cleanup paths
simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 61ce8256 29-Apr-2013 Jingoo Han <jg1.han@samsung.com>

rtc: rtc-sun4v: use module_platform_driver_probe()

Use module_platform_driver_probe() macro which makes the code smaller and
simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# d959f731 21-Feb-2013 Jingoo Han <jg1.han@samsung.com>

rtc: rtc-sun4v: use pr_warn() instead of printk()

Fix the checkpatch warning as below:

WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ...

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# cecf61bd 14-Nov-2008 Alessandro Zummo <a.zummo@towertech.it>

rtc: rtc-sun4v fixes, revised

- simplified code
- use platform_driver_probe
- removed locking: it's provided by rtc subsystem

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: David S. Miller <davem@davemloft.net>


# 7a138ede 29-Aug-2008 David S. Miller <davem@davemloft.net>

rtc: Add Sun4V hypervisor RTC driver.

Signed-off-by: David S. Miller <davem@davemloft.net>