rtc-core.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifdef CONFIG_RTC_INTF_DEV
  3. extern void __init rtc_dev_init(void);
  4. extern void __exit rtc_dev_exit(void);
  5. extern void rtc_dev_prepare(struct rtc_device *rtc);
  6. #else
  7. static inline void rtc_dev_init(void)
  8. {
  9. }
  10. static inline void rtc_dev_exit(void)
  11. {
  12. }
  13. static inline void rtc_dev_prepare(struct rtc_device *rtc)
  14. {
  15. }
  16. #endif
  17. #ifdef CONFIG_RTC_INTF_PROC
  18. extern void rtc_proc_add_device(struct rtc_device *rtc);
  19. extern void rtc_proc_del_device(struct rtc_device *rtc);
  20. #else
  21. static inline void rtc_proc_add_device(struct rtc_device *rtc)
  22. {
  23. }
  24. static inline void rtc_proc_del_device(struct rtc_device *rtc)
  25. {
  26. }
  27. #endif
  28. #ifdef CONFIG_RTC_INTF_SYSFS
  29. const struct attribute_group **rtc_get_dev_attribute_groups(void);
  30. #else
  31. static inline const struct attribute_group **rtc_get_dev_attribute_groups(void)
  32. {
  33. return NULL;
  34. }
  35. #endif
  36. #ifdef CONFIG_RTC_NVMEM
  37. void rtc_nvmem_register(struct rtc_device *rtc);
  38. void rtc_nvmem_unregister(struct rtc_device *rtc);
  39. #else
  40. static inline void rtc_nvmem_register(struct rtc_device *rtc) {}
  41. static inline void rtc_nvmem_unregister(struct rtc_device *rtc) {}
  42. #endif