summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-ps3.c
Commit message (Collapse)AuthorAgeFilesLines
* rtc: rework rtc_register_device() resource managementBartosz Golaszewski2020-11-191-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 <bgolaszewski@baylibre.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20201109163409.24301-8-brgl@bgdev.pl
* rtc: ps3: set rangeAlexandre Belloni2019-04-041-0/+1
| | | | | | | | The PS3 has a 64bit second counter from 2000. While this exceeds the 64bit UNIX timestamp, there is not doubt that non of them will still be working by then. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: ps3: convert to devm_rtc_allocate_deviceAlexandre Belloni2019-04-041-3/+5
| | | | | | This allows further improvement of the driver. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: ps3: convert to SPDX identifierAlexandre Belloni2019-04-041-13/+1
| | | | | | | Use SPDX-License-Identifier instead of a verbose license text. Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: ps3: switch to rtc_time64_to_tm/rtc_tm_to_time64Alexandre Belloni2019-04-041-5/+2
| | | | | | | Call the 64bit versions of rtc_tm time conversion as the PS3 handles 64bit values. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: stop validating rtc_time after rtc_time_to_tmAlexandre Belloni2018-03-011-1/+1
| | | | | | | rtc_time_to_tm never generates an invalid tm. It is not necessary to validate it. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
* rtc: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | 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>
* drivers/rtc/rtc-ps3.c: remove empty functionSachin Kamat2013-07-031-6/+0
| | | | | | | | | | | 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> Acked-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* rtc: rtc-ps3: use devm_rtc_device_register()Jingoo Han2013-04-291-2/+1
| | | | | | | | | 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>
* rtc: rtc-ps3: use module_platform_driver_probe()Jingoo Han2013-04-291-12/+1
| | | | | | | | | | Use module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* powerpc/ps3: Add rtc-ps3Geert Uytterhoeven2009-04-021-0/+104
Create a real RTC driver for PS3, and unhook the deprecated ppc_md.[gs]et_rtc_time. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Acked-by: Alessandro Zummo <a.zummo@towertech.it> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>