Add basic change for v1453
Change-Id: I9497a61bbc3717f66413794a4e7dee0347c0bc33
diff --git a/mbtk/libql_lib_v2_rilv2/ql_sleep_wakelock.c b/mbtk/libql_lib_v2_rilv2/ql_sleep_wakelock.c
new file mode 100755
index 0000000..622e028
--- /dev/null
+++ b/mbtk/libql_lib_v2_rilv2/ql_sleep_wakelock.c
@@ -0,0 +1,86 @@
+#include <stddef.h>
+#include "ql_sleep_wakelock.h"
+#include "mbtk_sleep.h"
+#include "mbtk_log.h"
+
+/*
+ * create wakelock, return the file description of the wakelock
+ */
+int ql_slp_wakelock_create(const char *name, size_t len)
+{
+ int ret;
+
+ ret = mbtk_wakelock_create(name, len);
+ if (ret == -1)
+ {
+ LOGE("mbtk_wakelock_create is error");
+ }
+
+ return ret;
+}
+
+/*
+ * lock the wakelock by the file description of the wakelock
+ */
+int ql_slp_wakelock_lock(int fd)
+{
+ int ret;
+
+ ret = mbtk_wakelock_lock(fd);
+ if (ret == -1)
+ {
+ LOGE("ql_slp_wakelock_lock is error");
+ }
+
+ return ret;
+}
+
+/*
+ * unlock the wakelock by the file description of the wakelock
+ */
+int ql_slp_wakelock_unlock(int fd)
+{
+ int ret;
+
+ ret = mbtk_wakelock_unlock(fd);
+ if (ret == -1)
+ {
+ LOGE("ql_slp_wakelock_unlock is error");
+ }
+
+ return ret;
+}
+
+/*
+ * destroy the wakelock by the file description of the wakelock
+ */
+int ql_slp_wakelock_destroy(int fd)
+{
+ int ret;
+
+ ret = mbtk_wakelock_destroy(fd);
+ if (ret == -1)
+ {
+ LOGE("ql_slp_wakelock_destroy is error");
+ }
+
+ return ret;
+}
+
+/*
+ * Enable/Disable autosleep function
+ */
+int ql_autosleep_enable(char enable)
+{
+ int ret;
+
+ ret = mbtk_autosuspend_enable(enable);
+ if (ret == -1)
+ {
+ LOGE("ql_autosleep_enable is error");
+ }
+
+ return ret;
+}
+
+