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