linux/include/uapi/linux/pps.h

/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
/*
 * PPS API header
 *
 * Copyright (C) 2005-2009   Rodolfo Giometti <[email protected]>
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


#ifndef _PPS_H_
#define _PPS_H_

#include <linux/types.h>

#define PPS_VERSION
#define PPS_MAX_SOURCES

/* Implementation note: the logical states ``assert'' and ``clear''
 * are implemented in terms of the chip register, i.e. ``assert''
 * means the bit is set.  */

/*
 * 3.2 New data structures
 */

#define PPS_API_VERS_1
#define PPS_API_VERS
#define PPS_MAX_NAME_LEN

/* 32-bit vs. 64-bit compatibility.
 *
 * 0n i386, the alignment of a uint64_t is only 4 bytes, while on most other
 * architectures it's 8 bytes. On i386, there will be no padding between the
 * two consecutive 'struct pps_ktime' members of struct pps_kinfo and struct
 * pps_kparams. But on most platforms there will be padding to ensure correct
 * alignment.
 *
 * The simple fix is probably to add an explicit padding.
 *					 		[David Woodhouse]
 */
struct pps_ktime {};

struct pps_ktime_compat {} __attribute__((packed, aligned));
#define PPS_TIME_INVALID

struct pps_kinfo {};

struct pps_kinfo_compat {};

struct pps_kparams {};

/*
 * 3.3 Mode bit definitions
 */

/* Device/implementation parameters */
#define PPS_CAPTUREASSERT
#define PPS_CAPTURECLEAR
#define PPS_CAPTUREBOTH

#define PPS_OFFSETASSERT
#define PPS_OFFSETCLEAR

#define PPS_CANWAIT
#define PPS_CANPOLL

/* Kernel actions */
#define PPS_ECHOASSERT
#define PPS_ECHOCLEAR

/* Timestamp formats */
#define PPS_TSFMT_TSPEC
#define PPS_TSFMT_NTPFP

/*
 * 3.4.4 New functions: disciplining the kernel timebase
 */

/* Kernel consumers */
#define PPS_KC_HARDPPS
#define PPS_KC_HARDPPS_PLL
#define PPS_KC_HARDPPS_FLL
/*
 * Here begins the implementation-specific part!
 */

struct pps_fdata {};

struct pps_fdata_compat {};

struct pps_bind_args {};

#include <linux/ioctl.h>

#define PPS_GETPARAMS
#define PPS_SETPARAMS
#define PPS_GETCAP
#define PPS_FETCH
#define PPS_KC_BIND

#endif /* _PPS_H_ */