rtc: Headers for RTC in kernel and user
authorAlan Cox <alan@linux.intel.com>
Wed, 15 Nov 2017 21:09:50 +0000 (21:09 +0000)
committerAlan Cox <alan@linux.intel.com>
Wed, 15 Nov 2017 21:09:50 +0000 (21:09 +0000)
Kernel/include/rtc.h [new file with mode: 0644]
Library/include/sys/rtc.h [new file with mode: 0644]

diff --git a/Kernel/include/rtc.h b/Kernel/include/rtc.h
new file mode 100644 (file)
index 0000000..ca16a89
--- /dev/null
@@ -0,0 +1,17 @@
+
+struct cmos_rtc
+{
+       uint8_t type;
+       union {
+               uint8_t bytes[8];
+               time_t clock;
+       } data;
+};
+
+#define CMOS_RTC_BCD   0
+/* BCD encodded YYYY MM DD HH MM SS */
+#define CMOS_RTC_DEC   1
+/* Byte encoded the same. Year is 2 bytes little endian */
+#define CMOS_RTC_TIME  2
+/* Unix time format */
+
diff --git a/Library/include/sys/rtc.h b/Library/include/sys/rtc.h
new file mode 100644 (file)
index 0000000..3f65e7b
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef _SYS_RTC_H
+#define _SYS_RTC_H
+
+struct cmos_rtc
+{
+       uint8_t type;
+       union {
+               uint8_t bytes[8];
+               time_t clock;
+       } data;
+};
+
+#define CMOS_RTC_BCD   0
+/* BCD encodded YYYY MM DD HH MM SS */
+#define CMOS_RTC_DEC   1
+/* Byte encoded the same. Year is 2 bytes little endian */
+#define CMOS_RTC_TIME  2
+/* Unix time format */
+
+#endif