mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
ODROID: replace __pm_stay_awake to wake_lock.
Change-Id: Icef785912995568f665e8c0c65383c8b153d57df
This commit is contained in:
@@ -31,6 +31,7 @@
|
|||||||
#include <linux/input.h>
|
#include <linux/input.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
#include <linux/hrtimer.h>
|
#include <linux/hrtimer.h>
|
||||||
|
#include <linux/wakelock.h>
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
|
|
||||||
bool touch_invert_x;
|
bool touch_invert_x;
|
||||||
@@ -100,7 +101,7 @@ static int __init prevent_sleep_setup(char *s)
|
|||||||
}
|
}
|
||||||
__setup("prevent_sleep=", prevent_sleep_setup);
|
__setup("prevent_sleep=", prevent_sleep_setup);
|
||||||
|
|
||||||
struct wakeup_source wake_src;
|
struct wake_lock wake_src;
|
||||||
|
|
||||||
MODULE_AUTHOR("Hardkernel Co,.Ltd");
|
MODULE_AUTHOR("Hardkernel Co,.Ltd");
|
||||||
MODULE_DESCRIPTION("SYSFS driver for ODROID hardware");
|
MODULE_DESCRIPTION("SYSFS driver for ODROID hardware");
|
||||||
@@ -182,7 +183,8 @@ static int odroid_sysfs_probe(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
int error = 0;
|
int error = 0;
|
||||||
if (prevent_sleep) {
|
if (prevent_sleep) {
|
||||||
__pm_stay_awake(&wake_src);
|
wake_lock(&wake_src);
|
||||||
|
//__pm_stay_awake(&wake_src);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_USE_OF
|
#ifdef CONFIG_USE_OF
|
||||||
@@ -200,8 +202,10 @@ static int odroid_sysfs_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
static int odroid_sysfs_remove(struct platform_device *pdev)
|
static int odroid_sysfs_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
if (prevent_sleep)
|
if (prevent_sleep) {
|
||||||
__pm_relax(&wake_src);
|
wake_unlock(&wake_src);
|
||||||
|
//__pm_relax(&wake_src);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -247,7 +251,8 @@ static int __init odroid_sysfs_init(void)
|
|||||||
int error = class_register(&odroid_sysfs_class);
|
int error = class_register(&odroid_sysfs_class);
|
||||||
|
|
||||||
if (prevent_sleep) {
|
if (prevent_sleep) {
|
||||||
wakeup_source_init(&wake_src, "odroid_sysfs");
|
//wakeup_source_init(&wake_src, "odroid_sysfs");
|
||||||
|
wake_lock_init(&wake_src, WAKE_LOCK_SUSPEND, "odroid_sysfs");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user