touchscreen_mmi: Add macro to get touch status

When touch start enter suspend, touch_stop will set to 1.
When touch resumed totally, pm_mode will be TS_MMI_PM_ACTIVE

Add two macro to get touch state.

Change-Id: I20ddb852f277ec6c0ffd38d33851416af4d2d06e
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1543989
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: <litong20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
haojl2 2020-04-28 14:48:32 +08:00 • committed by Jialei Hao
commit 578ac982ce

View file

@ -232,7 +232,8 @@ do { \
ret = touch_cdev->mdata->get_##_method(DEV_TS, ##__VA_ARGS__); \
} \
} while (0)
#define is_touch_stopped (atomic_read(&touch_cdev->touch_stopped) == 1)
#define is_touch_active (touch_cdev->pm_mode == TS_MMI_PM_ACTIVE)
extern int ts_mmi_notifiers_register(struct ts_mmi_dev *touch_cdev);
extern void ts_mmi_notifiers_unregister(struct ts_mmi_dev *touch_cdev);