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