From a5969cabbb4660eab42b6ef0412cbbd1200cf14d Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 12 Oct 2024 07:10:09 +0000
Subject: [PATCH] 修改led为gpio
---
kernel/drivers/input/touchscreen/gt1x/gt1x.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/kernel/drivers/input/touchscreen/gt1x/gt1x.c b/kernel/drivers/input/touchscreen/gt1x/gt1x.c
index 5871d5d..8c8e06d 100644
--- a/kernel/drivers/input/touchscreen/gt1x/gt1x.c
+++ b/kernel/drivers/input/touchscreen/gt1x/gt1x.c
@@ -656,6 +656,18 @@
}
#if defined(CONFIG_FB)
+#include <linux/async.h>
+
+static void gt1x_resume_async(void *data, async_cookie_t cookie)
+{
+ gt1x_resume();
+}
+
+static void gt1x_suspend_async(void *data, async_cookie_t cookie)
+{
+ gt1x_suspend();
+}
+
/* frame buffer notifier block control the suspend/resume procedure */
static struct notifier_block gt1x_fb_notifier;
static int tp_status;
@@ -686,7 +698,7 @@
if (*blank == FB_BLANK_UNBLANK) {
tp_status = *blank;
GTP_DEBUG("Resume by fb notifier.");
- gt1x_resume();
+ async_schedule(gt1x_resume_async, NULL);
}
}
#endif
@@ -697,7 +709,7 @@
if (*blank == FB_BLANK_POWERDOWN) {
tp_status = *blank;
GTP_DEBUG("Suspend by fb notifier.");
- gt1x_suspend();
+ async_schedule(gt1x_suspend_async, NULL);
}
}
--
Gitblit v1.6.2