Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: rtc.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
/*
[1] Fix | Delete
* Generic RTC interface.
[2] Fix | Delete
* This version contains the part of the user interface to the Real Time Clock
[3] Fix | Delete
* service. It is used with both the legacy mc146818 and also EFI
[4] Fix | Delete
* Struct rtc_time and first 12 ioctl by Paul Gortmaker, 1996 - separated out
[5] Fix | Delete
* from <linux/mc146818rtc.h> to this file for 2.4 kernels.
[6] Fix | Delete
*
[7] Fix | Delete
* Copyright (C) 1999 Hewlett-Packard Co.
[8] Fix | Delete
* Copyright (C) 1999 Stephane Eranian <eranian@hpl.hp.com>
[9] Fix | Delete
*/
[10] Fix | Delete
#ifndef _LINUX_RTC_H_
[11] Fix | Delete
#define _LINUX_RTC_H_
[12] Fix | Delete
[13] Fix | Delete
/*
[14] Fix | Delete
* The struct used to pass data via the following ioctl. Similar to the
[15] Fix | Delete
* struct tm in <time.h>, but it needs to be here so that the kernel
[16] Fix | Delete
* source is self contained, allowing cross-compiles, etc. etc.
[17] Fix | Delete
*/
[18] Fix | Delete
[19] Fix | Delete
struct rtc_time {
[20] Fix | Delete
int tm_sec;
[21] Fix | Delete
int tm_min;
[22] Fix | Delete
int tm_hour;
[23] Fix | Delete
int tm_mday;
[24] Fix | Delete
int tm_mon;
[25] Fix | Delete
int tm_year;
[26] Fix | Delete
int tm_wday;
[27] Fix | Delete
int tm_yday;
[28] Fix | Delete
int tm_isdst;
[29] Fix | Delete
};
[30] Fix | Delete
[31] Fix | Delete
/*
[32] Fix | Delete
* This data structure is inspired by the EFI (v0.92) wakeup
[33] Fix | Delete
* alarm API.
[34] Fix | Delete
*/
[35] Fix | Delete
struct rtc_wkalrm {
[36] Fix | Delete
unsigned char enabled; /* 0 = alarm disabled, 1 = alarm enabled */
[37] Fix | Delete
unsigned char pending; /* 0 = alarm not pending, 1 = alarm pending */
[38] Fix | Delete
struct rtc_time time; /* time the alarm is set to */
[39] Fix | Delete
};
[40] Fix | Delete
[41] Fix | Delete
/*
[42] Fix | Delete
* Data structure to control PLL correction some better RTC feature
[43] Fix | Delete
* pll_value is used to get or set current value of correction,
[44] Fix | Delete
* the rest of the struct is used to query HW capabilities.
[45] Fix | Delete
* This is modeled after the RTC used in Q40/Q60 computers but
[46] Fix | Delete
* should be sufficiently flexible for other devices
[47] Fix | Delete
*
[48] Fix | Delete
* +ve pll_value means clock will run faster by
[49] Fix | Delete
* pll_value*pll_posmult/pll_clock
[50] Fix | Delete
* -ve pll_value means clock will run slower by
[51] Fix | Delete
* pll_value*pll_negmult/pll_clock
[52] Fix | Delete
*/
[53] Fix | Delete
[54] Fix | Delete
struct rtc_pll_info {
[55] Fix | Delete
int pll_ctrl; /* placeholder for fancier control */
[56] Fix | Delete
int pll_value; /* get/set correction value */
[57] Fix | Delete
int pll_max; /* max +ve (faster) adjustment value */
[58] Fix | Delete
int pll_min; /* max -ve (slower) adjustment value */
[59] Fix | Delete
int pll_posmult; /* factor for +ve correction */
[60] Fix | Delete
int pll_negmult; /* factor for -ve correction */
[61] Fix | Delete
long pll_clock; /* base PLL frequency */
[62] Fix | Delete
};
[63] Fix | Delete
[64] Fix | Delete
/*
[65] Fix | Delete
* ioctl calls that are permitted to the /dev/rtc interface, if
[66] Fix | Delete
* any of the RTC drivers are enabled.
[67] Fix | Delete
*/
[68] Fix | Delete
[69] Fix | Delete
#define RTC_AIE_ON _IO('p', 0x01) /* Alarm int. enable on */
[70] Fix | Delete
#define RTC_AIE_OFF _IO('p', 0x02) /* ... off */
[71] Fix | Delete
#define RTC_UIE_ON _IO('p', 0x03) /* Update int. enable on */
[72] Fix | Delete
#define RTC_UIE_OFF _IO('p', 0x04) /* ... off */
[73] Fix | Delete
#define RTC_PIE_ON _IO('p', 0x05) /* Periodic int. enable on */
[74] Fix | Delete
#define RTC_PIE_OFF _IO('p', 0x06) /* ... off */
[75] Fix | Delete
#define RTC_WIE_ON _IO('p', 0x0f) /* Watchdog int. enable on */
[76] Fix | Delete
#define RTC_WIE_OFF _IO('p', 0x10) /* ... off */
[77] Fix | Delete
[78] Fix | Delete
#define RTC_ALM_SET _IOW('p', 0x07, struct rtc_time) /* Set alarm time */
[79] Fix | Delete
#define RTC_ALM_READ _IOR('p', 0x08, struct rtc_time) /* Read alarm time */
[80] Fix | Delete
#define RTC_RD_TIME _IOR('p', 0x09, struct rtc_time) /* Read RTC time */
[81] Fix | Delete
#define RTC_SET_TIME _IOW('p', 0x0a, struct rtc_time) /* Set RTC time */
[82] Fix | Delete
#define RTC_IRQP_READ _IOR('p', 0x0b, unsigned long) /* Read IRQ rate */
[83] Fix | Delete
#define RTC_IRQP_SET _IOW('p', 0x0c, unsigned long) /* Set IRQ rate */
[84] Fix | Delete
#define RTC_EPOCH_READ _IOR('p', 0x0d, unsigned long) /* Read epoch */
[85] Fix | Delete
#define RTC_EPOCH_SET _IOW('p', 0x0e, unsigned long) /* Set epoch */
[86] Fix | Delete
[87] Fix | Delete
#define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm)/* Set wakeup alarm*/
[88] Fix | Delete
#define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm)/* Get wakeup alarm*/
[89] Fix | Delete
[90] Fix | Delete
#define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */
[91] Fix | Delete
#define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */
[92] Fix | Delete
[93] Fix | Delete
#define RTC_VL_READ _IOR('p', 0x13, int) /* Voltage low detector */
[94] Fix | Delete
#define RTC_VL_CLR _IO('p', 0x14) /* Clear voltage low information */
[95] Fix | Delete
[96] Fix | Delete
/* interrupt flags */
[97] Fix | Delete
#define RTC_IRQF 0x80 /* Any of the following is active */
[98] Fix | Delete
#define RTC_PF 0x40 /* Periodic interrupt */
[99] Fix | Delete
#define RTC_AF 0x20 /* Alarm interrupt */
[100] Fix | Delete
#define RTC_UF 0x10 /* Update interrupt for 1Hz RTC */
[101] Fix | Delete
[102] Fix | Delete
[103] Fix | Delete
#define RTC_MAX_FREQ 8192
[104] Fix | Delete
[105] Fix | Delete
[106] Fix | Delete
#endif /* _LINUX_RTC_H_ */
[107] Fix | Delete
[108] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function