Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * PPS kernel consumer API header
0004  *
0005  * Copyright (C) 2009-2010   Alexander Gordeev <lasaine@lvk.cs.msu.su>
0006  */
0007 
0008 #ifndef LINUX_PPS_KC_H
0009 #define LINUX_PPS_KC_H
0010 
0011 #include <linux/errno.h>
0012 #include <linux/pps_kernel.h>
0013 
0014 #ifdef CONFIG_NTP_PPS
0015 
0016 extern int pps_kc_bind(struct pps_device *pps,
0017         struct pps_bind_args *bind_args);
0018 extern void pps_kc_remove(struct pps_device *pps);
0019 extern void pps_kc_event(struct pps_device *pps,
0020         struct pps_event_time *ts, int event);
0021 
0022 
0023 #else /* CONFIG_NTP_PPS */
0024 
0025 static inline int pps_kc_bind(struct pps_device *pps,
0026         struct pps_bind_args *bind_args) { return -EOPNOTSUPP; }
0027 static inline void pps_kc_remove(struct pps_device *pps) {}
0028 static inline void pps_kc_event(struct pps_device *pps,
0029         struct pps_event_time *ts, int event) {}
0030 
0031 #endif /* CONFIG_NTP_PPS */
0032 
0033 #endif /* LINUX_PPS_KC_H */