• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _PPS_H_
20 #define _PPS_H_
21 #include <linux/types.h>
22 #define PPS_VERSION "5.3.6"
23 #define PPS_MAX_SOURCES 16
24 #define PPS_API_VERS_1 1
25 #define PPS_API_VERS PPS_API_VERS_1
26 #define PPS_MAX_NAME_LEN 32
27 struct pps_ktime {
28   __s64 sec;
29   __s32 nsec;
30   __u32 flags;
31 };
32 #define PPS_TIME_INVALID (1 << 0)
33 struct pps_kinfo {
34   __u32 assert_sequence;
35   __u32 clear_sequence;
36   struct pps_ktime assert_tu;
37   struct pps_ktime clear_tu;
38   int current_mode;
39 };
40 struct pps_kparams {
41   int api_version;
42   int mode;
43   struct pps_ktime assert_off_tu;
44   struct pps_ktime clear_off_tu;
45 };
46 #define PPS_CAPTUREASSERT 0x01
47 #define PPS_CAPTURECLEAR 0x02
48 #define PPS_CAPTUREBOTH 0x03
49 #define PPS_OFFSETASSERT 0x10
50 #define PPS_OFFSETCLEAR 0x20
51 #define PPS_CANWAIT 0x100
52 #define PPS_CANPOLL 0x200
53 #define PPS_ECHOASSERT 0x40
54 #define PPS_ECHOCLEAR 0x80
55 #define PPS_TSFMT_TSPEC 0x1000
56 #define PPS_TSFMT_NTPFP 0x2000
57 #define PPS_KC_HARDPPS 0
58 #define PPS_KC_HARDPPS_PLL 1
59 #define PPS_KC_HARDPPS_FLL 2
60 struct pps_fdata {
61   struct pps_kinfo info;
62   struct pps_ktime timeout;
63 };
64 struct pps_bind_args {
65   int tsformat;
66   int edge;
67   int consumer;
68 };
69 #include <linux/ioctl.h>
70 #define PPS_GETPARAMS _IOR('p', 0xa1, struct pps_kparams *)
71 #define PPS_SETPARAMS _IOW('p', 0xa2, struct pps_kparams *)
72 #define PPS_GETCAP _IOR('p', 0xa3, int *)
73 #define PPS_FETCH _IOWR('p', 0xa4, struct pps_fdata *)
74 #define PPS_KC_BIND _IOW('p', 0xa5, struct pps_bind_args *)
75 #endif
76