rtc-core.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. int rtc_add_group(struct rtc_device *rtc, const struct attribute_group *grp);
  31. int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps);
  32. #else
  33. static inline const struct attribute_group **rtc_get_dev_attribute_groups(void)
  34. {
  35. return NULL;
  36. }
  37. static inline
  38. int rtc_add_group(struct rtc_device *rtc, const struct attribute_group *grp)
  39. {
  40. return 0;
  41. }
  42. static inline
  43. int rtc_add_groups(struct rtc_device *rtc, const struct attribute_group **grps)
  44. {
  45. return 0;
  46. }
  47. #endif