blob: ecab76a3207c08e2fd9ad58772bbde3104018154 [file] [log] [blame]
David Brownell5726fb22007-05-08 00:33:27 -07001#ifdef CONFIG_RTC_INTF_DEV
2
3extern void __init rtc_dev_init(void);
4extern void __exit rtc_dev_exit(void);
David Brownellcb3a58d2007-05-08 00:33:46 -07005extern void rtc_dev_prepare(struct rtc_device *rtc);
David Brownell5726fb22007-05-08 00:33:27 -07006
7#else
8
David Brownell61a7c362007-05-08 00:33:45 -07009static inline void rtc_dev_init(void)
10{
11}
12
13static inline void rtc_dev_exit(void)
14{
15}
16
David Brownellcb3a58d2007-05-08 00:33:46 -070017static inline void rtc_dev_prepare(struct rtc_device *rtc)
18{
19}
20
David Brownell5726fb22007-05-08 00:33:27 -070021#endif
David Brownell446ecbd2007-05-08 00:33:33 -070022
David Brownell7d9f99e2007-05-08 00:33:38 -070023#ifdef CONFIG_RTC_INTF_PROC
24
David Brownell61a7c362007-05-08 00:33:45 -070025extern void rtc_proc_add_device(struct rtc_device *rtc);
26extern void rtc_proc_del_device(struct rtc_device *rtc);
David Brownell7d9f99e2007-05-08 00:33:38 -070027
28#else
29
David Brownell61a7c362007-05-08 00:33:45 -070030static inline void rtc_proc_add_device(struct rtc_device *rtc)
31{
32}
33
34static inline void rtc_proc_del_device(struct rtc_device *rtc)
35{
36}
David Brownell7d9f99e2007-05-08 00:33:38 -070037
38#endif
39
David Brownell446ecbd2007-05-08 00:33:33 -070040#ifdef CONFIG_RTC_INTF_SYSFS
Dmitry Torokhov3ee2c402015-07-23 16:01:08 -070041const struct attribute_group **rtc_get_dev_attribute_groups(void);
David Brownell446ecbd2007-05-08 00:33:33 -070042#else
Dmitry Torokhov3ee2c402015-07-23 16:01:08 -070043static inline const struct attribute_group **rtc_get_dev_attribute_groups(void)
David Brownell61a7c362007-05-08 00:33:45 -070044{
Dmitry Torokhov3ee2c402015-07-23 16:01:08 -070045 return NULL;
David Brownell61a7c362007-05-08 00:33:45 -070046}
David Brownell446ecbd2007-05-08 00:33:33 -070047#endif
Alexandre Belloni697e5a42017-07-06 11:42:02 +020048
49#ifdef CONFIG_RTC_NVMEM
50void rtc_nvmem_register(struct rtc_device *rtc);
51void rtc_nvmem_unregister(struct rtc_device *rtc);
52#else
53static inline void rtc_nvmem_register(struct rtc_device *rtc) {}
54static inline void rtc_nvmem_unregister(struct rtc_device *rtc) {}
55#endif