Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
David Brownell | 5726fb2 | 2007-05-08 00:33:27 -0700 | [diff] [blame] | 2 | #ifdef CONFIG_RTC_INTF_DEV |
| 3 | |
| 4 | extern void __init rtc_dev_init(void); |
| 5 | extern void __exit rtc_dev_exit(void); |
David Brownell | cb3a58d | 2007-05-08 00:33:46 -0700 | [diff] [blame] | 6 | extern void rtc_dev_prepare(struct rtc_device *rtc); |
David Brownell | 5726fb2 | 2007-05-08 00:33:27 -0700 | [diff] [blame] | 7 | |
| 8 | #else |
| 9 | |
David Brownell | 61a7c36 | 2007-05-08 00:33:45 -0700 | [diff] [blame] | 10 | static inline void rtc_dev_init(void) |
| 11 | { |
| 12 | } |
| 13 | |
| 14 | static inline void rtc_dev_exit(void) |
| 15 | { |
| 16 | } |
| 17 | |
David Brownell | cb3a58d | 2007-05-08 00:33:46 -0700 | [diff] [blame] | 18 | static inline void rtc_dev_prepare(struct rtc_device *rtc) |
| 19 | { |
| 20 | } |
| 21 | |
David Brownell | 5726fb2 | 2007-05-08 00:33:27 -0700 | [diff] [blame] | 22 | #endif |
David Brownell | 446ecbd | 2007-05-08 00:33:33 -0700 | [diff] [blame] | 23 | |
David Brownell | 7d9f99e | 2007-05-08 00:33:38 -0700 | [diff] [blame] | 24 | #ifdef CONFIG_RTC_INTF_PROC |
| 25 | |
David Brownell | 61a7c36 | 2007-05-08 00:33:45 -0700 | [diff] [blame] | 26 | extern void rtc_proc_add_device(struct rtc_device *rtc); |
| 27 | extern void rtc_proc_del_device(struct rtc_device *rtc); |
David Brownell | 7d9f99e | 2007-05-08 00:33:38 -0700 | [diff] [blame] | 28 | |
| 29 | #else |
| 30 | |
David Brownell | 61a7c36 | 2007-05-08 00:33:45 -0700 | [diff] [blame] | 31 | static inline void rtc_proc_add_device(struct rtc_device *rtc) |
| 32 | { |
| 33 | } |
| 34 | |
| 35 | static inline void rtc_proc_del_device(struct rtc_device *rtc) |
| 36 | { |
| 37 | } |
David Brownell | 7d9f99e | 2007-05-08 00:33:38 -0700 | [diff] [blame] | 38 | |
| 39 | #endif |
| 40 | |
David Brownell | 446ecbd | 2007-05-08 00:33:33 -0700 | [diff] [blame] | 41 | #ifdef CONFIG_RTC_INTF_SYSFS |
Dmitry Torokhov | 3ee2c40 | 2015-07-23 16:01:08 -0700 | [diff] [blame] | 42 | const struct attribute_group **rtc_get_dev_attribute_groups(void); |
David Brownell | 446ecbd | 2007-05-08 00:33:33 -0700 | [diff] [blame] | 43 | #else |
Dmitry Torokhov | 3ee2c40 | 2015-07-23 16:01:08 -0700 | [diff] [blame] | 44 | static inline const struct attribute_group **rtc_get_dev_attribute_groups(void) |
David Brownell | 61a7c36 | 2007-05-08 00:33:45 -0700 | [diff] [blame] | 45 | { |
Dmitry Torokhov | 3ee2c40 | 2015-07-23 16:01:08 -0700 | [diff] [blame] | 46 | return NULL; |
David Brownell | 61a7c36 | 2007-05-08 00:33:45 -0700 | [diff] [blame] | 47 | } |
David Brownell | 446ecbd | 2007-05-08 00:33:33 -0700 | [diff] [blame] | 48 | #endif |
Alexandre Belloni | 697e5a4 | 2017-07-06 11:42:02 +0200 | [diff] [blame] | 49 | |
| 50 | #ifdef CONFIG_RTC_NVMEM |
| 51 | void rtc_nvmem_register(struct rtc_device *rtc); |
| 52 | void rtc_nvmem_unregister(struct rtc_device *rtc); |
| 53 | #else |
| 54 | static inline void rtc_nvmem_register(struct rtc_device *rtc) {} |
| 55 | static inline void rtc_nvmem_unregister(struct rtc_device *rtc) {} |
| 56 | #endif |