pstar: input touch stm fix issue
input touch stm fix issue Change-Id: I9a4a67acc176ea1a283c254f7569ee7b61ded6e2 Signed-off-by: dengwei1 <dengwei1@motorola.com> Reviewed-on: https://gerrit.mot.com/1902528 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
37af4acd77
commit
c3bab7b6df
2 changed files with 14 additions and 0 deletions
|
@ -2161,8 +2161,10 @@ static void fts_enter_pointer_event_handler(struct fts_ts_info *info, unsigned
|
|||
input_report_abs(info->input_dev, ABS_MT_POSITION_Y, y);
|
||||
input_report_abs(info->input_dev, ABS_MT_TOUCH_MAJOR, z);
|
||||
input_report_abs(info->input_dev, ABS_MT_TOUCH_MINOR, z);
|
||||
#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
|
||||
input_report_abs(info->input_dev, ABS_MT_PRESSURE, z);
|
||||
input_report_abs(info->input_dev, ABS_MT_DISTANCE, distance);
|
||||
#endif
|
||||
/* logError(0, "%s %s : Event 0x%02x - ID[%d], (x, y) = (%3d, %3d)
|
||||
* Size = %d\n", tag, __func__, *event, touchId, x, y, touchType); */
|
||||
|
||||
|
@ -3613,6 +3615,9 @@ void fts_resume_func(struct fts_ts_info *info)
|
|||
info->resume_bit = 1;
|
||||
fts_mode_handler(info, 0);
|
||||
info->sensor_sleep = false;
|
||||
#if KERNEL_VERSION(5, 4, 0) > LINUX_VERSION_CODE
|
||||
fts_enableInterrupt();
|
||||
#endif
|
||||
#if 0
|
||||
u8 cmd[3] = { FTS_CMD_SYSTEM, SYS_CMD_INT, 1 };
|
||||
int res;
|
||||
|
@ -4207,10 +4212,12 @@ static int fts_probe(struct spi_device *client)
|
|||
AREA_MAX, 0, 0);
|
||||
input_set_abs_params(info->input_dev, ABS_MT_TOUCH_MINOR, AREA_MIN,
|
||||
AREA_MAX, 0, 0);
|
||||
#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
|
||||
input_set_abs_params(info->input_dev, ABS_MT_PRESSURE, PRESSURE_MIN,
|
||||
PRESSURE_MAX, 0, 0);
|
||||
input_set_abs_params(info->input_dev, ABS_MT_DISTANCE, DISTANCE_MIN,
|
||||
DISTANCE_MAX, 0, 0);
|
||||
#endif
|
||||
|
||||
#ifdef GESTURE_MODE
|
||||
input_set_capability(info->input_dev, EV_KEY, KEY_WAKEUP);
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/version.h>
|
||||
#include "ftsCompensation.h"
|
||||
#include "ftsCore.h"
|
||||
#include "ftsError.h"
|
||||
|
@ -880,10 +881,14 @@ int writeConfig(u16 offset, u8 *data, int len)
|
|||
*/
|
||||
int fts_disableInterrupt(void)
|
||||
{
|
||||
#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
|
||||
unsigned long flag;
|
||||
#endif
|
||||
|
||||
if (getClient() != NULL) {
|
||||
#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
|
||||
spin_lock_irqsave(&fts_int, flag);
|
||||
#endif
|
||||
if (disable_irq_count == 0) {
|
||||
logError(0, "%s Executing Disable...\n", tag);
|
||||
disable_irq(getClient()->irq);
|
||||
|
@ -891,7 +896,9 @@ int fts_disableInterrupt(void)
|
|||
}
|
||||
/* disable_irq is re-entrant so it is required to keep track
|
||||
* of the number of calls of this when reenabling */
|
||||
#if KERNEL_VERSION(5, 4, 0) <= LINUX_VERSION_CODE
|
||||
spin_unlock_irqrestore(&fts_int, flag);
|
||||
#endif
|
||||
return OK;
|
||||
} else {
|
||||
logError(1, "%s %s: Impossible get client irq... ERROR %08X\n",
|
||||
|
|
Loading…
Reference in a new issue