Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: pps.h
/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* PPS API header
[2] Fix | Delete
*
[3] Fix | Delete
* Copyright (C) 2005-2009 Rodolfo Giometti <giometti@linux.it>
[4] Fix | Delete
*
[5] Fix | Delete
* This program is free software; you can redistribute it and/or modify
[6] Fix | Delete
* it under the terms of the GNU General Public License as published by
[7] Fix | Delete
* the Free Software Foundation; either version 2 of the License, or
[8] Fix | Delete
* (at your option) any later version.
[9] Fix | Delete
*
[10] Fix | Delete
* This program is distributed in the hope that it will be useful,
[11] Fix | Delete
* but WITHOUT ANY WARRANTY; without even the implied warranty of
[12] Fix | Delete
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[13] Fix | Delete
* GNU General Public License for more details.
[14] Fix | Delete
*
[15] Fix | Delete
* You should have received a copy of the GNU General Public License
[16] Fix | Delete
* along with this program; if not, write to the Free Software
[17] Fix | Delete
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
[18] Fix | Delete
*/
[19] Fix | Delete
[20] Fix | Delete
[21] Fix | Delete
#ifndef _PPS_H_
[22] Fix | Delete
#define _PPS_H_
[23] Fix | Delete
[24] Fix | Delete
#include <linux/types.h>
[25] Fix | Delete
[26] Fix | Delete
#define PPS_VERSION "5.3.6"
[27] Fix | Delete
#define PPS_MAX_SOURCES 16 /* should be enough... */
[28] Fix | Delete
[29] Fix | Delete
/* Implementation note: the logical states ``assert'' and ``clear''
[30] Fix | Delete
* are implemented in terms of the chip register, i.e. ``assert''
[31] Fix | Delete
* means the bit is set. */
[32] Fix | Delete
[33] Fix | Delete
/*
[34] Fix | Delete
* 3.2 New data structures
[35] Fix | Delete
*/
[36] Fix | Delete
[37] Fix | Delete
#define PPS_API_VERS_1 1
[38] Fix | Delete
#define PPS_API_VERS PPS_API_VERS_1 /* we use API version 1 */
[39] Fix | Delete
#define PPS_MAX_NAME_LEN 32
[40] Fix | Delete
[41] Fix | Delete
/* 32-bit vs. 64-bit compatibility.
[42] Fix | Delete
*
[43] Fix | Delete
* 0n i386, the alignment of a uint64_t is only 4 bytes, while on most other
[44] Fix | Delete
* architectures it's 8 bytes. On i386, there will be no padding between the
[45] Fix | Delete
* two consecutive 'struct pps_ktime' members of struct pps_kinfo and struct
[46] Fix | Delete
* pps_kparams. But on most platforms there will be padding to ensure correct
[47] Fix | Delete
* alignment.
[48] Fix | Delete
*
[49] Fix | Delete
* The simple fix is probably to add an explicit padding.
[50] Fix | Delete
* [David Woodhouse]
[51] Fix | Delete
*/
[52] Fix | Delete
struct pps_ktime {
[53] Fix | Delete
__s64 sec;
[54] Fix | Delete
__s32 nsec;
[55] Fix | Delete
__u32 flags;
[56] Fix | Delete
};
[57] Fix | Delete
[58] Fix | Delete
struct pps_ktime_compat {
[59] Fix | Delete
__s64 sec;
[60] Fix | Delete
__s32 nsec;
[61] Fix | Delete
__u32 flags;
[62] Fix | Delete
} __attribute__((packed, aligned(4)));
[63] Fix | Delete
#define PPS_TIME_INVALID (1<<0) /* used to specify timeout==NULL */
[64] Fix | Delete
[65] Fix | Delete
struct pps_kinfo {
[66] Fix | Delete
__u32 assert_sequence; /* seq. num. of assert event */
[67] Fix | Delete
__u32 clear_sequence; /* seq. num. of clear event */
[68] Fix | Delete
struct pps_ktime assert_tu; /* time of assert event */
[69] Fix | Delete
struct pps_ktime clear_tu; /* time of clear event */
[70] Fix | Delete
int current_mode; /* current mode bits */
[71] Fix | Delete
};
[72] Fix | Delete
[73] Fix | Delete
struct pps_kinfo_compat {
[74] Fix | Delete
__u32 assert_sequence; /* seq. num. of assert event */
[75] Fix | Delete
__u32 clear_sequence; /* seq. num. of clear event */
[76] Fix | Delete
struct pps_ktime_compat assert_tu; /* time of assert event */
[77] Fix | Delete
struct pps_ktime_compat clear_tu; /* time of clear event */
[78] Fix | Delete
int current_mode; /* current mode bits */
[79] Fix | Delete
};
[80] Fix | Delete
[81] Fix | Delete
struct pps_kparams {
[82] Fix | Delete
int api_version; /* API version # */
[83] Fix | Delete
int mode; /* mode bits */
[84] Fix | Delete
struct pps_ktime assert_off_tu; /* offset compensation for assert */
[85] Fix | Delete
struct pps_ktime clear_off_tu; /* offset compensation for clear */
[86] Fix | Delete
};
[87] Fix | Delete
[88] Fix | Delete
/*
[89] Fix | Delete
* 3.3 Mode bit definitions
[90] Fix | Delete
*/
[91] Fix | Delete
[92] Fix | Delete
/* Device/implementation parameters */
[93] Fix | Delete
#define PPS_CAPTUREASSERT 0x01 /* capture assert events */
[94] Fix | Delete
#define PPS_CAPTURECLEAR 0x02 /* capture clear events */
[95] Fix | Delete
#define PPS_CAPTUREBOTH 0x03 /* capture assert and clear events */
[96] Fix | Delete
[97] Fix | Delete
#define PPS_OFFSETASSERT 0x10 /* apply compensation for assert event */
[98] Fix | Delete
#define PPS_OFFSETCLEAR 0x20 /* apply compensation for clear event */
[99] Fix | Delete
[100] Fix | Delete
#define PPS_CANWAIT 0x100 /* can we wait for an event? */
[101] Fix | Delete
#define PPS_CANPOLL 0x200 /* bit reserved for future use */
[102] Fix | Delete
[103] Fix | Delete
/* Kernel actions */
[104] Fix | Delete
#define PPS_ECHOASSERT 0x40 /* feed back assert event to output */
[105] Fix | Delete
#define PPS_ECHOCLEAR 0x80 /* feed back clear event to output */
[106] Fix | Delete
[107] Fix | Delete
/* Timestamp formats */
[108] Fix | Delete
#define PPS_TSFMT_TSPEC 0x1000 /* select timespec format */
[109] Fix | Delete
#define PPS_TSFMT_NTPFP 0x2000 /* select NTP format */
[110] Fix | Delete
[111] Fix | Delete
/*
[112] Fix | Delete
* 3.4.4 New functions: disciplining the kernel timebase
[113] Fix | Delete
*/
[114] Fix | Delete
[115] Fix | Delete
/* Kernel consumers */
[116] Fix | Delete
#define PPS_KC_HARDPPS 0 /* hardpps() (or equivalent) */
[117] Fix | Delete
#define PPS_KC_HARDPPS_PLL 1 /* hardpps() constrained to
[118] Fix | Delete
use a phase-locked loop */
[119] Fix | Delete
#define PPS_KC_HARDPPS_FLL 2 /* hardpps() constrained to
[120] Fix | Delete
use a frequency-locked loop */
[121] Fix | Delete
/*
[122] Fix | Delete
* Here begins the implementation-specific part!
[123] Fix | Delete
*/
[124] Fix | Delete
[125] Fix | Delete
struct pps_fdata {
[126] Fix | Delete
struct pps_kinfo info;
[127] Fix | Delete
struct pps_ktime timeout;
[128] Fix | Delete
};
[129] Fix | Delete
[130] Fix | Delete
struct pps_fdata_compat {
[131] Fix | Delete
struct pps_kinfo_compat info;
[132] Fix | Delete
struct pps_ktime_compat timeout;
[133] Fix | Delete
};
[134] Fix | Delete
[135] Fix | Delete
struct pps_bind_args {
[136] Fix | Delete
int tsformat; /* format of time stamps */
[137] Fix | Delete
int edge; /* selected event type */
[138] Fix | Delete
int consumer; /* selected kernel consumer */
[139] Fix | Delete
};
[140] Fix | Delete
[141] Fix | Delete
#include <linux/ioctl.h>
[142] Fix | Delete
[143] Fix | Delete
#define PPS_GETPARAMS _IOR('p', 0xa1, struct pps_kparams *)
[144] Fix | Delete
#define PPS_SETPARAMS _IOW('p', 0xa2, struct pps_kparams *)
[145] Fix | Delete
#define PPS_GETCAP _IOR('p', 0xa3, int *)
[146] Fix | Delete
#define PPS_FETCH _IOWR('p', 0xa4, struct pps_fdata *)
[147] Fix | Delete
#define PPS_KC_BIND _IOW('p', 0xa5, struct pps_bind_args *)
[148] Fix | Delete
[149] Fix | Delete
#endif /* _PPS_H_ */
[150] Fix | Delete
[151] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function