kc.h 874 B

123456789101112131415161718192021222324252627282930313233
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * PPS kernel consumer API header
  4. *
  5. * Copyright (C) 2009-2010 Alexander Gordeev <lasaine@lvk.cs.msu.su>
  6. */
  7. #ifndef LINUX_PPS_KC_H
  8. #define LINUX_PPS_KC_H
  9. #include <linux/errno.h>
  10. #include <linux/pps_kernel.h>
  11. #ifdef CONFIG_NTP_PPS
  12. extern int pps_kc_bind(struct pps_device *pps,
  13. struct pps_bind_args *bind_args);
  14. extern void pps_kc_remove(struct pps_device *pps);
  15. extern void pps_kc_event(struct pps_device *pps,
  16. struct pps_event_time *ts, int event);
  17. #else /* CONFIG_NTP_PPS */
  18. static inline int pps_kc_bind(struct pps_device *pps,
  19. struct pps_bind_args *bind_args) { return -EOPNOTSUPP; }
  20. static inline void pps_kc_remove(struct pps_device *pps) {}
  21. static inline void pps_kc_event(struct pps_device *pps,
  22. struct pps_event_time *ts, int event) {}
  23. #endif /* CONFIG_NTP_PPS */
  24. #endif /* LINUX_PPS_KC_H */