122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef _UAPI_LINUX_TIMEX_H
2022851890Sopenharmony_ci#define _UAPI_LINUX_TIMEX_H
2122851890Sopenharmony_ci#include <linux/time.h>
2222851890Sopenharmony_ci#define NTP_API 4
2322851890Sopenharmony_cistruct timex {
2422851890Sopenharmony_ci  unsigned int modes;
2522851890Sopenharmony_ci  __kernel_long_t offset;
2622851890Sopenharmony_ci  __kernel_long_t freq;
2722851890Sopenharmony_ci  __kernel_long_t maxerror;
2822851890Sopenharmony_ci  __kernel_long_t esterror;
2922851890Sopenharmony_ci  int status;
3022851890Sopenharmony_ci  __kernel_long_t constant;
3122851890Sopenharmony_ci  __kernel_long_t precision;
3222851890Sopenharmony_ci  __kernel_long_t tolerance;
3322851890Sopenharmony_ci  struct timeval time;
3422851890Sopenharmony_ci  __kernel_long_t tick;
3522851890Sopenharmony_ci  __kernel_long_t ppsfreq;
3622851890Sopenharmony_ci  __kernel_long_t jitter;
3722851890Sopenharmony_ci  int shift;
3822851890Sopenharmony_ci  __kernel_long_t stabil;
3922851890Sopenharmony_ci  __kernel_long_t jitcnt;
4022851890Sopenharmony_ci  __kernel_long_t calcnt;
4122851890Sopenharmony_ci  __kernel_long_t errcnt;
4222851890Sopenharmony_ci  __kernel_long_t stbcnt;
4322851890Sopenharmony_ci  int tai;
4422851890Sopenharmony_ci  int : 32;
4522851890Sopenharmony_ci  int : 32;
4622851890Sopenharmony_ci  int : 32;
4722851890Sopenharmony_ci  int : 32;
4822851890Sopenharmony_ci  int : 32;
4922851890Sopenharmony_ci  int : 32;
5022851890Sopenharmony_ci  int : 32;
5122851890Sopenharmony_ci  int : 32;
5222851890Sopenharmony_ci  int : 32;
5322851890Sopenharmony_ci  int : 32;
5422851890Sopenharmony_ci  int : 32;
5522851890Sopenharmony_ci};
5622851890Sopenharmony_cistruct __kernel_timex_timeval {
5722851890Sopenharmony_ci  __kernel_time64_t tv_sec;
5822851890Sopenharmony_ci  long long tv_usec;
5922851890Sopenharmony_ci};
6022851890Sopenharmony_cistruct __kernel_timex {
6122851890Sopenharmony_ci  unsigned int modes;
6222851890Sopenharmony_ci  int : 32;
6322851890Sopenharmony_ci  long long offset;
6422851890Sopenharmony_ci  long long freq;
6522851890Sopenharmony_ci  long long maxerror;
6622851890Sopenharmony_ci  long long esterror;
6722851890Sopenharmony_ci  int status;
6822851890Sopenharmony_ci  int : 32;
6922851890Sopenharmony_ci  long long constant;
7022851890Sopenharmony_ci  long long precision;
7122851890Sopenharmony_ci  long long tolerance;
7222851890Sopenharmony_ci  struct __kernel_timex_timeval time;
7322851890Sopenharmony_ci  long long tick;
7422851890Sopenharmony_ci  long long ppsfreq;
7522851890Sopenharmony_ci  long long jitter;
7622851890Sopenharmony_ci  int shift;
7722851890Sopenharmony_ci  int : 32;
7822851890Sopenharmony_ci  long long stabil;
7922851890Sopenharmony_ci  long long jitcnt;
8022851890Sopenharmony_ci  long long calcnt;
8122851890Sopenharmony_ci  long long errcnt;
8222851890Sopenharmony_ci  long long stbcnt;
8322851890Sopenharmony_ci  int tai;
8422851890Sopenharmony_ci  int : 32;
8522851890Sopenharmony_ci  int : 32;
8622851890Sopenharmony_ci  int : 32;
8722851890Sopenharmony_ci  int : 32;
8822851890Sopenharmony_ci  int : 32;
8922851890Sopenharmony_ci  int : 32;
9022851890Sopenharmony_ci  int : 32;
9122851890Sopenharmony_ci  int : 32;
9222851890Sopenharmony_ci  int : 32;
9322851890Sopenharmony_ci  int : 32;
9422851890Sopenharmony_ci  int : 32;
9522851890Sopenharmony_ci};
9622851890Sopenharmony_ci#define ADJ_OFFSET 0x0001
9722851890Sopenharmony_ci#define ADJ_FREQUENCY 0x0002
9822851890Sopenharmony_ci#define ADJ_MAXERROR 0x0004
9922851890Sopenharmony_ci#define ADJ_ESTERROR 0x0008
10022851890Sopenharmony_ci#define ADJ_STATUS 0x0010
10122851890Sopenharmony_ci#define ADJ_TIMECONST 0x0020
10222851890Sopenharmony_ci#define ADJ_TAI 0x0080
10322851890Sopenharmony_ci#define ADJ_SETOFFSET 0x0100
10422851890Sopenharmony_ci#define ADJ_MICRO 0x1000
10522851890Sopenharmony_ci#define ADJ_NANO 0x2000
10622851890Sopenharmony_ci#define ADJ_TICK 0x4000
10722851890Sopenharmony_ci#define ADJ_OFFSET_SINGLESHOT 0x8001
10822851890Sopenharmony_ci#define ADJ_OFFSET_SS_READ 0xa001
10922851890Sopenharmony_ci#define MOD_OFFSET ADJ_OFFSET
11022851890Sopenharmony_ci#define MOD_FREQUENCY ADJ_FREQUENCY
11122851890Sopenharmony_ci#define MOD_MAXERROR ADJ_MAXERROR
11222851890Sopenharmony_ci#define MOD_ESTERROR ADJ_ESTERROR
11322851890Sopenharmony_ci#define MOD_STATUS ADJ_STATUS
11422851890Sopenharmony_ci#define MOD_TIMECONST ADJ_TIMECONST
11522851890Sopenharmony_ci#define MOD_TAI ADJ_TAI
11622851890Sopenharmony_ci#define MOD_MICRO ADJ_MICRO
11722851890Sopenharmony_ci#define MOD_NANO ADJ_NANO
11822851890Sopenharmony_ci#define STA_PLL 0x0001
11922851890Sopenharmony_ci#define STA_PPSFREQ 0x0002
12022851890Sopenharmony_ci#define STA_PPSTIME 0x0004
12122851890Sopenharmony_ci#define STA_FLL 0x0008
12222851890Sopenharmony_ci#define STA_INS 0x0010
12322851890Sopenharmony_ci#define STA_DEL 0x0020
12422851890Sopenharmony_ci#define STA_UNSYNC 0x0040
12522851890Sopenharmony_ci#define STA_FREQHOLD 0x0080
12622851890Sopenharmony_ci#define STA_PPSSIGNAL 0x0100
12722851890Sopenharmony_ci#define STA_PPSJITTER 0x0200
12822851890Sopenharmony_ci#define STA_PPSWANDER 0x0400
12922851890Sopenharmony_ci#define STA_PPSERROR 0x0800
13022851890Sopenharmony_ci#define STA_CLOCKERR 0x1000
13122851890Sopenharmony_ci#define STA_NANO 0x2000
13222851890Sopenharmony_ci#define STA_MODE 0x4000
13322851890Sopenharmony_ci#define STA_CLK 0x8000
13422851890Sopenharmony_ci#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
13522851890Sopenharmony_ci#define TIME_OK 0
13622851890Sopenharmony_ci#define TIME_INS 1
13722851890Sopenharmony_ci#define TIME_DEL 2
13822851890Sopenharmony_ci#define TIME_OOP 3
13922851890Sopenharmony_ci#define TIME_WAIT 4
14022851890Sopenharmony_ci#define TIME_ERROR 5
14122851890Sopenharmony_ci#define TIME_BAD TIME_ERROR
14222851890Sopenharmony_ci#endif
143