xref: /openbmc/linux/drivers/pps/kc.h (revision 58e16d792a6a8c6b750f637a4649967fcac853dc)
1*74ba9207SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2717c0336SAlexander Gordeev /*
3717c0336SAlexander Gordeev  * PPS kernel consumer API header
4717c0336SAlexander Gordeev  *
5717c0336SAlexander Gordeev  * Copyright (C) 2009-2010   Alexander Gordeev <lasaine@lvk.cs.msu.su>
6717c0336SAlexander Gordeev  */
7717c0336SAlexander Gordeev 
8717c0336SAlexander Gordeev #ifndef LINUX_PPS_KC_H
9717c0336SAlexander Gordeev #define LINUX_PPS_KC_H
10717c0336SAlexander Gordeev 
11717c0336SAlexander Gordeev #include <linux/errno.h>
12717c0336SAlexander Gordeev #include <linux/pps_kernel.h>
13717c0336SAlexander Gordeev 
14717c0336SAlexander Gordeev #ifdef CONFIG_NTP_PPS
15717c0336SAlexander Gordeev 
16717c0336SAlexander Gordeev extern int pps_kc_bind(struct pps_device *pps,
17717c0336SAlexander Gordeev 		struct pps_bind_args *bind_args);
18717c0336SAlexander Gordeev extern void pps_kc_remove(struct pps_device *pps);
19717c0336SAlexander Gordeev extern void pps_kc_event(struct pps_device *pps,
20717c0336SAlexander Gordeev 		struct pps_event_time *ts, int event);
21717c0336SAlexander Gordeev 
22717c0336SAlexander Gordeev 
23717c0336SAlexander Gordeev #else /* CONFIG_NTP_PPS */
24717c0336SAlexander Gordeev 
pps_kc_bind(struct pps_device * pps,struct pps_bind_args * bind_args)25717c0336SAlexander Gordeev static inline int pps_kc_bind(struct pps_device *pps,
26717c0336SAlexander Gordeev 		struct pps_bind_args *bind_args) { return -EOPNOTSUPP; }
pps_kc_remove(struct pps_device * pps)27717c0336SAlexander Gordeev static inline void pps_kc_remove(struct pps_device *pps) {}
pps_kc_event(struct pps_device * pps,struct pps_event_time * ts,int event)28717c0336SAlexander Gordeev static inline void pps_kc_event(struct pps_device *pps,
29717c0336SAlexander Gordeev 		struct pps_event_time *ts, int event) {}
30717c0336SAlexander Gordeev 
31717c0336SAlexander Gordeev #endif /* CONFIG_NTP_PPS */
32717c0336SAlexander Gordeev 
33717c0336SAlexander Gordeev #endif /* LINUX_PPS_KC_H */
34