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 _PTP_CLOCK_H_ 20#define _PTP_CLOCK_H_ 21#include <linux/ioctl.h> 22#include <linux/types.h> 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24#define PTP_ENABLE_FEATURE (1<<0) 25#define PTP_RISING_EDGE (1<<1) 26#define PTP_FALLING_EDGE (1<<2) 27struct ptp_clock_time { 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 __s64 sec; 30 __u32 nsec; 31 __u32 reserved; 32}; 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34struct ptp_clock_caps { 35 int max_adj; 36 int n_alarm; 37 int n_ext_ts; 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 int n_per_out; 40 int pps; 41 int rsv[15]; 42}; 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44struct ptp_extts_request { 45 unsigned int index; 46 unsigned int flags; 47 unsigned int rsv[2]; 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49}; 50struct ptp_perout_request { 51 struct ptp_clock_time start; 52 struct ptp_clock_time period; 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 unsigned int index; 55 unsigned int flags; 56 unsigned int rsv[4]; 57}; 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59#define PTP_MAX_SAMPLES 25 60struct ptp_sys_offset { 61 unsigned int n_samples; 62 unsigned int rsv[3]; 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 struct ptp_clock_time ts[2 * PTP_MAX_SAMPLES + 1]; 65}; 66#define PTP_CLK_MAGIC '=' 67#define PTP_CLOCK_GETCAPS _IOR(PTP_CLK_MAGIC, 1, struct ptp_clock_caps) 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69#define PTP_EXTTS_REQUEST _IOW(PTP_CLK_MAGIC, 2, struct ptp_extts_request) 70#define PTP_PEROUT_REQUEST _IOW(PTP_CLK_MAGIC, 3, struct ptp_perout_request) 71#define PTP_ENABLE_PPS _IOW(PTP_CLK_MAGIC, 4, int) 72#define PTP_SYS_OFFSET _IOW(PTP_CLK_MAGIC, 5, struct ptp_sys_offset) 73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74struct ptp_extts_event { 75 struct ptp_clock_time t; 76 unsigned int index; 77 unsigned int flags; 78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 unsigned int rsv[2]; 80}; 81#endif 82