summaryrefslogtreecommitdiff
path: root/touch_apis.h
diff options
context:
space:
mode:
authorWendly Li <wendlyli@google.com>2022-02-15 15:21:45 +0000
committerWendly Li <wendlyli@google.com>2022-02-16 09:18:28 +0000
commit63fc9fdc7304876880a6d159b36a0ae76060caa2 (patch)
tree06da143c80a74f71039a535f8a54cd5a69520bee /touch_apis.h
parent02d5f71c5166d568ee5edc8859563e42cfdb30d2 (diff)
downloadgoodix_touch-63fc9fdc7304876880a6d159b36a0ae76060caa2.tar.gz
Fully support wake lock for sysfs
Bug: 214118711 Test: Check sysfs/wake_lock works properly Change-Id: I84684164f199e86259a2da8b465dc1c989d01d34 Signed-off-by: Wendly Li <wendlyli@google.com>
Diffstat (limited to 'touch_apis.h')
-rw-r--r--touch_apis.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/touch_apis.h b/touch_apis.h
index db4a1f9..b189957 100644
--- a/touch_apis.h
+++ b/touch_apis.h
@@ -8,6 +8,8 @@
#ifndef _TOUCH_APIS_H_
#define _TOUCH_APIS_H_
+#include "touch_pm.h"
+
enum scan_mode {
SCAN_MODE_AUTO = 0,
SCAN_MODE_NORMAL_ACTIVE,
@@ -17,11 +19,6 @@ enum scan_mode {
SCAN_MODE_MAX,
};
-enum wake_lock_state {
- WAKE_LOCK_STATE_UNLOCKED = 0,
- WAKE_LOCK_STATE_LOCKED,
-};
-
enum reset_result {
RESET_RESULT_SUCCESS = 0,
RESET_RESULT_FAIL = -1,
@@ -42,8 +39,10 @@ struct touch_apis_data {
int (*software_reset)(struct device *dev);
int (*set_scan_mode)(struct device *dev, enum scan_mode mode);
int (*set_sensing_enabled)(struct device *dev, bool enabled);
- int (*get_wake_lock_state)(struct device *dev);
- int (*set_wake_lock_state)(struct device *dev, bool locked);
+ bool (*get_wake_lock_state)(
+ struct device *dev, enum tpm_wakelock_type type);
+ int (*set_wake_lock_state)(
+ struct device *dev, enum tpm_wakelock_type type, bool locked);
};
extern int touch_apis_init(struct device *dev, struct touch_apis_data *data);