mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
touch: ilitek: Replace wakeup_source API with macro
Use common mmi_wake_lock macros instead directly using kernel API, which is version specific. Change-Id: I0f8263d8a4b9bd7e32b6821550ec6a7731fec7ac Signed-off-by: Kanagarathina Kalathi <kalath(CR)@motorola.com> Reviewed-on: https://gerrit.mot.com/1727578 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Vijayakumar Gn <vijaygn@motorola.com> Reviewed-by: Konstantin Makariev <kmakariev@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
428e028101
commit
e411bffd23
4 changed files with 17 additions and 11 deletions
|
|
@ -651,7 +651,7 @@ int ili_report_handler(void)
|
|||
ili_wq_ctrl(WQ_BAT, DISABLE);
|
||||
|
||||
if (ilits->actual_tp_mode == P5_X_FW_GESTURE_MODE) {
|
||||
__pm_stay_awake(ilits->ws);
|
||||
PM_STAY_AWAKE(ilits->ws);
|
||||
|
||||
if (ilits->pm_suspend) {
|
||||
/* Waiting for pm resume completed */
|
||||
|
|
@ -760,7 +760,7 @@ out:
|
|||
}
|
||||
|
||||
if (ilits->actual_tp_mode == P5_X_FW_GESTURE_MODE)
|
||||
__pm_relax(ilits->ws);
|
||||
PM_RELAX(ilits->ws);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -1010,9 +1010,11 @@ int ili_tddi_init(void)
|
|||
ilits->boot = true;
|
||||
#endif
|
||||
|
||||
ilits->ws = wakeup_source_register("ili_wakelock");
|
||||
if (!ilits->ws)
|
||||
PM_WAKEUP_REGISTER(NULL, ilits->ws, "ili_wakelock");
|
||||
if (!ilits->ws) {
|
||||
ILI_ERR("wakeup source request failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1039,7 +1041,7 @@ void ili_dev_remove(void)
|
|||
}
|
||||
|
||||
if (ilits->ws)
|
||||
wakeup_source_unregister(ilits->ws);
|
||||
PM_WAKEUP_UNREGISTER(ilits->ws);
|
||||
|
||||
kfree(ilits->tr_buf);
|
||||
kfree(ilits->gcoord);
|
||||
|
|
|
|||
|
|
@ -106,6 +106,7 @@
|
|||
#include "mt_spi.h"
|
||||
#include "sync_write.h"
|
||||
#endif
|
||||
#include <linux/mmi_wake_lock.h>
|
||||
|
||||
#define DRIVER_VERSION "3.0.3.0.200610"
|
||||
|
||||
|
|
|
|||
|
|
@ -667,7 +667,7 @@ int ili_report_handler(void)
|
|||
ili_wq_ctrl(WQ_BAT, DISABLE);
|
||||
|
||||
if (ilits->actual_tp_mode == P5_X_FW_GESTURE_MODE) {
|
||||
__pm_stay_awake(ilits->ws);
|
||||
PM_STAY_AWAKE(ilits->ws);
|
||||
|
||||
if (ilits->pm_suspend) {
|
||||
/* Waiting for pm resume completed */
|
||||
|
|
@ -763,7 +763,7 @@ out:
|
|||
}
|
||||
|
||||
if (ilits->actual_tp_mode == P5_X_FW_GESTURE_MODE)
|
||||
__pm_relax(ilits->ws);
|
||||
PM_RELAX(ilits->ws);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -1006,9 +1006,11 @@ int ili_tddi_init(void)
|
|||
ilits->boot = true;
|
||||
#endif
|
||||
|
||||
ilits->ws = wakeup_source_register("ili_wakelock");
|
||||
if (!ilits->ws)
|
||||
PM_WAKEUP_REGISTER(NULL, ilits->ws, "ili_wakelock");
|
||||
if (!ilits->ws) {
|
||||
ILI_ERR("wakeup source request failed\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1035,7 +1037,7 @@ void ili_dev_remove(void)
|
|||
}
|
||||
|
||||
if (ilits->ws)
|
||||
wakeup_source_unregister(ilits->ws);
|
||||
PM_WAKEUP_UNREGISTER(ilits->ws);
|
||||
|
||||
if (ilits->charger_notif.notifier_call)
|
||||
power_supply_unreg_notifier(&ilits->charger_notif);
|
||||
|
|
@ -1069,7 +1071,7 @@ void ilitek_spi_shutdown(struct spi_device *spi)
|
|||
}
|
||||
|
||||
if (ilits->ws)
|
||||
wakeup_source_unregister(ilits->ws);
|
||||
PM_WAKEUP_UNREGISTER(ilits->ws);
|
||||
|
||||
ilits->gesture = DISABLE;
|
||||
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@
|
|||
#ifdef ILI_CONFIG_PANEL_NOTIFICATIONS
|
||||
#include <linux/panel_notifier.h>
|
||||
#endif
|
||||
#include <linux/mmi_wake_lock.h>
|
||||
|
||||
#define DRIVER_VERSION "3.0.2.0.200512"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue