From e636c8d336489bf3eed5878299e6cc045bbad077 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Tue, 20 Feb 2024 01:17:29 +0000
Subject: [PATCH] debug lk
---
kernel/drivers/input/touchscreen/tp_suspend.h | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/kernel/drivers/input/touchscreen/tp_suspend.h b/kernel/drivers/input/touchscreen/tp_suspend.h
index 96f63cb..e424866 100644
--- a/kernel/drivers/input/touchscreen/tp_suspend.h
+++ b/kernel/drivers/input/touchscreen/tp_suspend.h
@@ -34,28 +34,26 @@
tp = container_of(self, struct tp_device, fb_notif);
- //printk("%s.....lin=%d tp->status=%x,blank_mode=%x\n",__func__,__LINE__,tp->status,blank_mode);
+ if (action != FB_EVENT_BLANK)
+ return NOTIFY_DONE;
mutex_lock(&tp->ops_lock);
- switch (action) {
- case FB_EARLY_EVENT_BLANK:
- blank_mode = *((int *)event->data);
- if (blank_mode != FB_BLANK_UNBLANK && tp->status == FB_BLANK_UNBLANK) {
- tp->status = blank_mode;
- ret = tp->tp_suspend(tp);
- }
- break;
+ blank_mode = *((int *)event->data);
+ //printk("%s.....lin=%d tp->status=%x,blank_mode=%x\n",__func__,__LINE__,tp->status,blank_mode);
- case FB_EVENT_BLANK:
- blank_mode = *((int *)event->data);
- if (blank_mode == FB_BLANK_UNBLANK && tp->status != FB_BLANK_UNBLANK) {
+ switch (blank_mode) {
+ case FB_BLANK_UNBLANK:
+ if (tp->status != FB_BLANK_UNBLANK) {
tp->status = blank_mode;
tp->tp_resume(tp);
}
break;
-
default:
+ if (tp->status == FB_BLANK_UNBLANK) {
+ tp->status = blank_mode;
+ ret = tp->tp_suspend(tp);
+ }
break;
}
--
Gitblit v1.6.2