summaryrefslogtreecommitdiff
path: root/include/linux/rtc.h
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-02-13 01:47:19 +0300
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-03-01 12:49:15 +0300
commitfd5cd21d995e67f87b3eb4adf938be85fe83ef4b (patch)
tree4b79b8f29e8ad0c59100019a747681fa508964d2 /include/linux/rtc.h
parentac75779b72fd52741d7446ad27cf6d58c006c643 (diff)
downloadlinux-fd5cd21d995e67f87b3eb4adf938be85fe83ef4b.tar.xz
rtc: export rtc_nvmem_register() to drivers
Export rtc_nvmem_register() so it can be called from drivers instead of only the core. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'include/linux/rtc.h')
-rw-r--r--include/linux/rtc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index fc6c90b57be0..fbc92fff7c2e 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -271,4 +271,17 @@ extern int rtc_hctosys_ret;
#define rtc_hctosys_ret -ENODEV
#endif
+#ifdef CONFIG_RTC_NVMEM
+int rtc_nvmem_register(struct rtc_device *rtc,
+ struct nvmem_config *nvmem_config);
+void rtc_nvmem_unregister(struct rtc_device *rtc);
+#else
+static inline int rtc_nvmem_register(struct rtc_device *rtc,
+ struct nvmem_config *nvmem_config)
+{
+ return -ENODEV;
+}
+static inline void rtc_nvmem_unregister(struct rtc_device *rtc) {}
+#endif
+
#endif /* _LINUX_RTC_H_ */