avtimer: kernel driver to expose avtimer to userspace
This driver expose the API to get LPASS subsystem
out of power collapsed state and exposes ioctl control to
read avtimer tick.
Change-Id: I4b50fbfca5741449a8e5f0d0514f5ca7bccec04d
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 3e681aa..39855d3 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -447,3 +447,4 @@
header-y += msm_audio_amrwb.h
header-y += msm_audio_amrwbplus.h
header-y += coresight-stm.h
+header-y += avtimer.h
diff --git a/include/linux/avtimer.h b/include/linux/avtimer.h
new file mode 100644
index 0000000..c6dabba
--- /dev/null
+++ b/include/linux/avtimer.h
@@ -0,0 +1,21 @@
+#ifndef AVTIMER_H
+#define AVTIMER_H
+
+#include <linux/ioctl.h>
+
+#define MAJOR_NUM 100
+
+#define IOCTL_GET_AVTIMER_TICK _IOR(MAJOR_NUM, 0, char *)
+/*
+ * This IOCTL is used to read the avtimer tick value.
+ * Avtimer is a 64 bit timer tick, hence the expected
+ * argument is of type uint64_t
+ */
+struct dev_avtimer_data {
+ uint32_t avtimer_msw_phy_addr;
+ uint32_t avtimer_lsw_phy_addr;
+};
+int avcs_core_open(void);
+int avcs_core_disable_power_collapse(int disable);/* true or false */
+
+#endif