From 63fc9fdc7304876880a6d159b36a0ae76060caa2 Mon Sep 17 00:00:00 2001 From: Wendly Li Date: Tue, 15 Feb 2022 15:21:45 +0000 Subject: Fully support wake lock for sysfs Bug: 214118711 Test: Check sysfs/wake_lock works properly Change-Id: I84684164f199e86259a2da8b465dc1c989d01d34 Signed-off-by: Wendly Li --- touch_apis.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'touch_apis.h') 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); -- cgit v1.2.3