summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/sysfs.c
AgeCommit message (Collapse)AuthorFilesLines
2021-06-20rtc: sysfs: Correct kerneldoc function name hctosys_show()Yang Yingliang1-1/+1
Fix the following make W=1 kernel build warning: drivers/rtc/sysfs.c:115: warning: expecting prototype for rtc_sysfs_show_hctosys(). Prototype was for hctosys_show() instead Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210517045901.3461800-1-yangyingliang@huawei.com
2021-04-29rtc: sysfs: check features instead of opsAlexandre Belloni1-1/+1
Test RTC_FEATURE_ALARM instead of relying on .set_alarm to know whether alarms are available. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210429214403.2610952-1-alexandre.belloni@bootlin.com
2020-11-19rtc: rework rtc_register_device() resource managementBartosz Golaszewski1-2/+0
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
2020-03-16rtc: sysfs: use kobj_to_devsuguosong1-1/+1
use kobj_to_dev instead of open-conding it Signed-off-by: suguosong <suguosong@xiaomi.com> Link: https://lore.kernel.org/r/20200225021923.8570-1-guosongsu@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-11-27rtc: sysfs: fix hctosys_show kerneldocAlexandre Belloni1-1/+4
Fix undocumented function parameters: drivers/rtc/sysfs.c:112: warning: Function parameter or member 'dev' not described in 'hctosys_show' drivers/rtc/sysfs.c:112: warning: Function parameter or member 'attr' not described in 'hctosys_show' drivers/rtc/sysfs.c:112: warning: Function parameter or member 'buf' not described in 'hctosys_show' Link: https://lore.kernel.org/r/20191122102212.400158-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-04-04rtc: core: correct trivial checkpatch warningsAlexandre Belloni1-9/+7
Correct trivial checkpatch warnings, mostly whitespace issues and unbalanced braces. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2019-03-18rtc: convert core to SPDX identifierAlexandre Belloni1-5/+2
Use SPDX-License-Identifier instead of a verbose license text. Also fix the block comment alignment. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-12-31rtc: rename core filesAlexandre Belloni1-0/+358
Rename core files so there is a clearer separation between the RTC core and the RTC drivers. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>