drivers: input: touchscreen: xiaomi: Remove references to lpm_disable_for_dev and touch_irq_boost
Change-Id: I8c697c51e7522c33ebb8b0371d0fe6779bac22ca
This commit is contained in:
committed by
Sebastiano Barezzi
parent
ed003aaeb7
commit
5495ff8886
@@ -72,10 +72,6 @@ struct fts_ts_data *fts_data;
|
|||||||
static int fts_ts_suspend(struct device *dev);
|
static int fts_ts_suspend(struct device *dev);
|
||||||
static int fts_ts_resume(struct device *dev);
|
static int fts_ts_resume(struct device *dev);
|
||||||
|
|
||||||
#define LPM_EVENT_INPUT 0x1
|
|
||||||
extern void lpm_disable_for_dev(bool on, char event_dev);
|
|
||||||
extern void touch_irq_boost(void);
|
|
||||||
|
|
||||||
#ifdef CONFIG_TOUCHSCREEN_XIAOMI_TOUCHFEATURE
|
#ifdef CONFIG_TOUCHSCREEN_XIAOMI_TOUCHFEATURE
|
||||||
static void fts_read_palm_data(u8 reg_value);
|
static void fts_read_palm_data(u8 reg_value);
|
||||||
static int fts_palm_sensor_cmd(int value);
|
static int fts_palm_sensor_cmd(int value);
|
||||||
@@ -423,7 +419,6 @@ void fts_release_all_finger(void)
|
|||||||
#endif
|
#endif
|
||||||
input_report_key(input_dev, BTN_TOUCH, 0);
|
input_report_key(input_dev, BTN_TOUCH, 0);
|
||||||
input_sync(input_dev);
|
input_sync(input_dev);
|
||||||
lpm_disable_for_dev(false, LPM_EVENT_INPUT);
|
|
||||||
|
|
||||||
fts_data->touchs = 0;
|
fts_data->touchs = 0;
|
||||||
fts_data->key_state = 0;
|
fts_data->key_state = 0;
|
||||||
@@ -555,7 +550,6 @@ static int fts_input_report_b(struct fts_ts_data *data)
|
|||||||
FTS_DEBUG("[B]Points All Up!");
|
FTS_DEBUG("[B]Points All Up!");
|
||||||
}
|
}
|
||||||
input_report_key(data->input_dev, BTN_TOUCH, 0);
|
input_report_key(data->input_dev, BTN_TOUCH, 0);
|
||||||
lpm_disable_for_dev(false, LPM_EVENT_INPUT);
|
|
||||||
} else {
|
} else {
|
||||||
input_report_key(data->input_dev, BTN_TOUCH, 1);
|
input_report_key(data->input_dev, BTN_TOUCH, 1);
|
||||||
}
|
}
|
||||||
@@ -774,7 +768,6 @@ static irqreturn_t fts_irq_handler(int irq, void *data)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct fts_ts_data *ts_data = fts_data;
|
struct fts_ts_data *ts_data = fts_data;
|
||||||
|
|
||||||
touch_irq_boost();
|
|
||||||
if ((ts_data->suspended) && (ts_data->pm_suspend)) {
|
if ((ts_data->suspended) && (ts_data->pm_suspend)) {
|
||||||
ret = wait_for_completion_timeout(
|
ret = wait_for_completion_timeout(
|
||||||
&ts_data->pm_completion,
|
&ts_data->pm_completion,
|
||||||
@@ -785,12 +778,9 @@ static irqreturn_t fts_irq_handler(int irq, void *data)
|
|||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
touch_irq_boost();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pm_stay_awake(fts_data->dev);
|
pm_stay_awake(fts_data->dev);
|
||||||
lpm_disable_for_dev(true, LPM_EVENT_INPUT);
|
|
||||||
fts_irq_read_report();
|
fts_irq_read_report();
|
||||||
pm_relax(fts_data->dev);
|
pm_relax(fts_data->dev);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
|
|||||||
@@ -72,10 +72,6 @@ struct fts_ts_data *fts_data;
|
|||||||
static int fts_ts_suspend(struct device *dev);
|
static int fts_ts_suspend(struct device *dev);
|
||||||
static int fts_ts_resume(struct device *dev);
|
static int fts_ts_resume(struct device *dev);
|
||||||
|
|
||||||
#define LPM_EVENT_INPUT 0x1
|
|
||||||
extern void lpm_disable_for_dev(bool on, char event_dev);
|
|
||||||
extern void touch_irq_boost(void);
|
|
||||||
|
|
||||||
#ifdef CONFIG_TOUCHSCREEN_XIAOMI_TOUCHFEATURE
|
#ifdef CONFIG_TOUCHSCREEN_XIAOMI_TOUCHFEATURE
|
||||||
static void fts_read_palm_data(u8 reg_value);
|
static void fts_read_palm_data(u8 reg_value);
|
||||||
static int fts_palm_sensor_cmd(int value);
|
static int fts_palm_sensor_cmd(int value);
|
||||||
@@ -423,7 +419,6 @@ void fts_release_all_finger(void)
|
|||||||
#endif
|
#endif
|
||||||
input_report_key(input_dev, BTN_TOUCH, 0);
|
input_report_key(input_dev, BTN_TOUCH, 0);
|
||||||
input_sync(input_dev);
|
input_sync(input_dev);
|
||||||
lpm_disable_for_dev(false, LPM_EVENT_INPUT);
|
|
||||||
|
|
||||||
fts_data->touchs = 0;
|
fts_data->touchs = 0;
|
||||||
fts_data->key_state = 0;
|
fts_data->key_state = 0;
|
||||||
@@ -555,7 +550,6 @@ static int fts_input_report_b(struct fts_ts_data *data)
|
|||||||
FTS_DEBUG("[B]Points All Up!");
|
FTS_DEBUG("[B]Points All Up!");
|
||||||
}
|
}
|
||||||
input_report_key(data->input_dev, BTN_TOUCH, 0);
|
input_report_key(data->input_dev, BTN_TOUCH, 0);
|
||||||
lpm_disable_for_dev(false, LPM_EVENT_INPUT);
|
|
||||||
} else {
|
} else {
|
||||||
input_report_key(data->input_dev, BTN_TOUCH, 1);
|
input_report_key(data->input_dev, BTN_TOUCH, 1);
|
||||||
}
|
}
|
||||||
@@ -771,7 +765,6 @@ static irqreturn_t fts_irq_handler(int irq, void *data)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct fts_ts_data *ts_data = fts_data;
|
struct fts_ts_data *ts_data = fts_data;
|
||||||
|
|
||||||
touch_irq_boost();
|
|
||||||
if ((ts_data->suspended) && (ts_data->pm_suspend)) {
|
if ((ts_data->suspended) && (ts_data->pm_suspend)) {
|
||||||
ret = wait_for_completion_timeout(
|
ret = wait_for_completion_timeout(
|
||||||
&ts_data->pm_completion,
|
&ts_data->pm_completion,
|
||||||
@@ -782,12 +775,9 @@ static irqreturn_t fts_irq_handler(int irq, void *data)
|
|||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
touch_irq_boost();
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
pm_stay_awake(fts_data->dev);
|
pm_stay_awake(fts_data->dev);
|
||||||
lpm_disable_for_dev(true, LPM_EVENT_INPUT);
|
|
||||||
fts_irq_read_report();
|
fts_irq_read_report();
|
||||||
pm_relax(fts_data->dev);
|
pm_relax(fts_data->dev);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
|
|||||||
@@ -93,10 +93,6 @@ extern int fts_charger_mode_set(struct i2c_client *client, bool on);
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
* Static function prototypes
|
* Static function prototypes
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
#define EVENT_INPUT 0x1
|
|
||||||
extern void lpm_disable_for_dev(bool on, char event_dev);
|
|
||||||
extern void touch_irq_boost(void);
|
|
||||||
|
|
||||||
#ifndef CONFIG_FACTORY_BUILD
|
#ifndef CONFIG_FACTORY_BUILD
|
||||||
static int fts_ts_clear_buffer(void);
|
static int fts_ts_clear_buffer(void);
|
||||||
#endif
|
#endif
|
||||||
@@ -614,7 +610,6 @@ static void fts_release_all_finger(void)
|
|||||||
input_report_key(input_dev, BTN_INFO, 0);
|
input_report_key(input_dev, BTN_INFO, 0);
|
||||||
input_report_key(input_dev, BTN_TOUCH, 0);
|
input_report_key(input_dev, BTN_TOUCH, 0);
|
||||||
input_sync(input_dev);
|
input_sync(input_dev);
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
FTS_FUNC_EXIT();
|
FTS_FUNC_EXIT();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -707,7 +702,6 @@ static int fts_input_report_b(struct fts_ts_data *data)
|
|||||||
if (EVENT_NO_DOWN(data) || (!touchs)) {
|
if (EVENT_NO_DOWN(data) || (!touchs)) {
|
||||||
FTS_DEBUG("[B]Points All Up!");
|
FTS_DEBUG("[B]Points All Up!");
|
||||||
input_report_key(data->input_dev, BTN_TOUCH, 0);
|
input_report_key(data->input_dev, BTN_TOUCH, 0);
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
} else {
|
} else {
|
||||||
input_report_key(data->input_dev, BTN_TOUCH, 1);
|
input_report_key(data->input_dev, BTN_TOUCH, 1);
|
||||||
}
|
}
|
||||||
@@ -1003,7 +997,6 @@ static irqreturn_t fts_ts_interrupt(int irq, void *data)
|
|||||||
FTS_ERROR("[INTR]: Invalid fts_ts_data");
|
FTS_ERROR("[INTR]: Invalid fts_ts_data");
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
touch_irq_boost();
|
|
||||||
|
|
||||||
#if FTS_ESDCHECK_EN
|
#if FTS_ESDCHECK_EN
|
||||||
fts_esdcheck_set_intr(1);
|
fts_esdcheck_set_intr(1);
|
||||||
@@ -1020,7 +1013,6 @@ static irqreturn_t fts_ts_interrupt(int irq, void *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lpm_disable_for_dev(true, EVENT_INPUT);
|
|
||||||
ret = fts_read_touchdata(ts_data);
|
ret = fts_read_touchdata(ts_data);
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
mutex_lock(&ts_data->report_mutex);
|
mutex_lock(&ts_data->report_mutex);
|
||||||
|
|||||||
@@ -141,9 +141,6 @@ static int fts_mode_handler(struct fts_ts_info *info, int force);
|
|||||||
static int fts_set_cur_value(int mode, int value);
|
static int fts_set_cur_value(int mode, int value);
|
||||||
#endif
|
#endif
|
||||||
extern int power_supply_is_system_supplied(void);
|
extern int power_supply_is_system_supplied(void);
|
||||||
extern void touch_irq_boost(void);
|
|
||||||
#define EVENT_INPUT 0x1
|
|
||||||
extern void lpm_disable_for_dev(bool on, char event_dev);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Release all the touches in the linux input subsystem
|
* Release all the touches in the linux input subsystem
|
||||||
@@ -168,7 +165,6 @@ void release_all_touches(struct fts_ts_info *info)
|
|||||||
input_sync(info->input_dev);
|
input_sync(info->input_dev);
|
||||||
input_report_key(info->input_dev, BTN_INFO, 0);
|
input_report_key(info->input_dev, BTN_INFO, 0);
|
||||||
input_sync(info->input_dev);
|
input_sync(info->input_dev);
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
info->touch_id = 0;
|
info->touch_id = 0;
|
||||||
info->touch_skip = 0;
|
info->touch_skip = 0;
|
||||||
info->fod_id = 0;
|
info->fod_id = 0;
|
||||||
@@ -3890,7 +3886,6 @@ static void fts_leave_pointer_event_handler(struct fts_ts_info *info,
|
|||||||
input_report_key(info->input_dev, BTN_TOUCH, touch_condition);
|
input_report_key(info->input_dev, BTN_TOUCH, touch_condition);
|
||||||
if (!touch_condition)
|
if (!touch_condition)
|
||||||
input_report_key(info->input_dev, BTN_TOOL_FINGER, 0);
|
input_report_key(info->input_dev, BTN_TOOL_FINGER, 0);
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
|
|
||||||
info->fod_pressed = false;
|
info->fod_pressed = false;
|
||||||
input_report_key(info->input_dev, BTN_INFO, 0);
|
input_report_key(info->input_dev, BTN_INFO, 0);
|
||||||
@@ -4642,7 +4637,6 @@ static void fts_ts_sleep_work(struct work_struct *work)
|
|||||||
tag);
|
tag);
|
||||||
pm_relax(info->dev);
|
pm_relax(info->dev);
|
||||||
fts_enableInterrupt();
|
fts_enableInterrupt();
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
logError(
|
logError(
|
||||||
@@ -4702,7 +4696,6 @@ static void fts_ts_sleep_work(struct work_struct *work)
|
|||||||
#endif
|
#endif
|
||||||
pm_relax(info->dev);
|
pm_relax(info->dev);
|
||||||
fts_enableInterrupt();
|
fts_enableInterrupt();
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4726,7 +4719,6 @@ static irqreturn_t fts_event_handler(int irq, void *ts_info)
|
|||||||
static char pre_id[3];
|
static char pre_id[3];
|
||||||
event_dispatch_handler_t event_handler;
|
event_dispatch_handler_t event_handler;
|
||||||
|
|
||||||
touch_irq_boost();
|
|
||||||
if (info->tp_pm_suspend) {
|
if (info->tp_pm_suspend) {
|
||||||
MI_TOUCH_LOGI(1, "%s %s: device in suspend, schedue to work",
|
MI_TOUCH_LOGI(1, "%s %s: device in suspend, schedue to work",
|
||||||
tag, __func__);
|
tag, __func__);
|
||||||
@@ -4744,7 +4736,6 @@ static irqreturn_t fts_event_handler(int irq, void *ts_info)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lpm_disable_for_dev(true, EVENT_INPUT);
|
|
||||||
info->irq_status = true;
|
info->irq_status = true;
|
||||||
error = fts_writeReadU8UX(regAdd, 0, 0, data, FIFO_EVENT_SIZE,
|
error = fts_writeReadU8UX(regAdd, 0, 0, data, FIFO_EVENT_SIZE,
|
||||||
DUMMY_FIFO);
|
DUMMY_FIFO);
|
||||||
@@ -4788,8 +4779,6 @@ static irqreturn_t fts_event_handler(int irq, void *ts_info)
|
|||||||
}
|
}
|
||||||
input_sync(info->input_dev);
|
input_sync(info->input_dev);
|
||||||
info->irq_status = false;
|
info->irq_status = false;
|
||||||
if (!info->touch_id)
|
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
#ifdef CONFIG_TOUCHSCREEN_XIAOMI_TOUCHFEATURE
|
#ifdef CONFIG_TOUCHSCREEN_XIAOMI_TOUCHFEATURE
|
||||||
wake_up(&info->wait_queue);
|
wake_up(&info->wait_queue);
|
||||||
#endif
|
#endif
|
||||||
@@ -6579,7 +6568,6 @@ static void fts_suspend_work(struct work_struct *work)
|
|||||||
if (info->gesture_enabled || fts_need_enter_lp_mode())
|
if (info->gesture_enabled || fts_need_enter_lp_mode())
|
||||||
fts_enableInterrupt();
|
fts_enableInterrupt();
|
||||||
#endif
|
#endif
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_DRM
|
#ifdef CONFIG_DRM
|
||||||
|
|||||||
@@ -146,13 +146,6 @@ static int fts_enable_reg(struct fts_ts_info *info, bool enable);
|
|||||||
static int fts_set_cur_value(int mode, int value);
|
static int fts_set_cur_value(int mode, int value);
|
||||||
#endif
|
#endif
|
||||||
extern int power_supply_is_system_supplied(void);
|
extern int power_supply_is_system_supplied(void);
|
||||||
#ifdef CONFIG_FTS_BOOST
|
|
||||||
extern void touch_irq_boost(void);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_FTS_BOOST
|
|
||||||
#define EVENT_INPUT 0x1
|
|
||||||
extern void lpm_disable_for_dev(bool on, char event_dev);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_FTS_POWERSUPPLY_CB
|
#ifdef CONFIG_FTS_POWERSUPPLY_CB
|
||||||
static int fts_write_charge_status(int status);
|
static int fts_write_charge_status(int status);
|
||||||
#endif
|
#endif
|
||||||
@@ -185,9 +178,6 @@ void release_all_touches(struct fts_ts_info *info)
|
|||||||
input_report_key(info->input_dev, BTN_INFO, 0);
|
input_report_key(info->input_dev, BTN_INFO, 0);
|
||||||
mi_disp_set_fod_queue_work(0, true);
|
mi_disp_set_fod_queue_work(0, true);
|
||||||
input_sync(info->input_dev);
|
input_sync(info->input_dev);
|
||||||
#ifdef CONFIG_FTS_BOOST
|
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
#endif
|
|
||||||
info->touch_id = 0;
|
info->touch_id = 0;
|
||||||
info->touch_skip = 0;
|
info->touch_skip = 0;
|
||||||
info->fod_id = 0;
|
info->fod_id = 0;
|
||||||
@@ -4130,9 +4120,6 @@ static void fts_leave_pointer_event_handler(struct fts_ts_info *info,
|
|||||||
input_report_key(info->input_dev, BTN_TOUCH, touch_condition);
|
input_report_key(info->input_dev, BTN_TOUCH, touch_condition);
|
||||||
if (!touch_condition)
|
if (!touch_condition)
|
||||||
input_report_key(info->input_dev, BTN_TOOL_FINGER, 0);
|
input_report_key(info->input_dev, BTN_TOOL_FINGER, 0);
|
||||||
#ifdef CONFIG_FTS_BOOST
|
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
info->fod_pressed = false;
|
info->fod_pressed = false;
|
||||||
input_report_key(info->input_dev, BTN_INFO, 0);
|
input_report_key(info->input_dev, BTN_INFO, 0);
|
||||||
@@ -4891,9 +4878,6 @@ static void fts_ts_sleep_work(struct work_struct *work)
|
|||||||
tag);
|
tag);
|
||||||
pm_relax(info->dev);
|
pm_relax(info->dev);
|
||||||
fts_enableInterrupt();
|
fts_enableInterrupt();
|
||||||
#ifdef CONFIG_FTS_BOOST
|
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
logError(
|
logError(
|
||||||
@@ -4953,9 +4937,6 @@ static void fts_ts_sleep_work(struct work_struct *work)
|
|||||||
#endif
|
#endif
|
||||||
pm_relax(info->dev);
|
pm_relax(info->dev);
|
||||||
fts_enableInterrupt();
|
fts_enableInterrupt();
|
||||||
#ifdef CONFIG_FTS_BOOST
|
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -4979,9 +4960,6 @@ static irqreturn_t fts_event_handler(int irq, void *ts_info)
|
|||||||
static char pre_id[3];
|
static char pre_id[3];
|
||||||
event_dispatch_handler_t event_handler;
|
event_dispatch_handler_t event_handler;
|
||||||
|
|
||||||
#ifdef CONFIG_FTS_BOOST
|
|
||||||
touch_irq_boost();
|
|
||||||
#endif
|
|
||||||
if (info->tp_pm_suspend) {
|
if (info->tp_pm_suspend) {
|
||||||
logError(1, "%s device in suspend, schedue to work", tag);
|
logError(1, "%s device in suspend, schedue to work", tag);
|
||||||
pm_wakeup_event(info->dev, 0);
|
pm_wakeup_event(info->dev, 0);
|
||||||
@@ -4996,9 +4974,6 @@ static irqreturn_t fts_event_handler(int irq, void *ts_info)
|
|||||||
if (!fts_secure_filter_interrupt(info)) {
|
if (!fts_secure_filter_interrupt(info)) {
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_FTS_BOOST
|
|
||||||
lpm_disable_for_dev(true, EVENT_INPUT);
|
|
||||||
#endif
|
#endif
|
||||||
pm_stay_awake(info->dev);
|
pm_stay_awake(info->dev);
|
||||||
#ifdef TOUCH_THP_SUPPORT
|
#ifdef TOUCH_THP_SUPPORT
|
||||||
@@ -5072,10 +5047,6 @@ static irqreturn_t fts_event_handler(int irq, void *ts_info)
|
|||||||
} else if (!info->touch_id)
|
} else if (!info->touch_id)
|
||||||
info->clicktouch_count = info->clicktouch_num;
|
info->clicktouch_count = info->clicktouch_num;
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_FTS_BOOST
|
|
||||||
if (!info->touch_id)
|
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
#endif
|
|
||||||
#ifdef FTS_XIAOMI_TOUCHFEATURE
|
#ifdef FTS_XIAOMI_TOUCHFEATURE
|
||||||
wake_up(&info->wait_queue);
|
wake_up(&info->wait_queue);
|
||||||
#endif
|
#endif
|
||||||
@@ -7192,9 +7163,6 @@ static void fts_suspend_work(struct work_struct *work)
|
|||||||
#else
|
#else
|
||||||
if (info->gesture_enabled || fts_need_enter_lp_mode())
|
if (info->gesture_enabled || fts_need_enter_lp_mode())
|
||||||
fts_enableInterrupt();
|
fts_enableInterrupt();
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_FTS_BOOST
|
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
#endif
|
#endif
|
||||||
// xiaomi_touch_set_suspend_state(XIAOMI_TOUCH_SUSPEND);
|
// xiaomi_touch_set_suspend_state(XIAOMI_TOUCH_SUSPEND);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,13 +38,6 @@
|
|||||||
#define PINCTRL_STATE_SUSPEND "pmx_ts_suspend"
|
#define PINCTRL_STATE_SUSPEND "pmx_ts_suspend"
|
||||||
#define PINCTRL_STATE_BOOT "pmx_ts_boot"
|
#define PINCTRL_STATE_BOOT "pmx_ts_boot"
|
||||||
|
|
||||||
#ifdef CONFIG_TOUCH_BOOST
|
|
||||||
extern void touch_irq_boost(void);
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_TOUCH_BOOST
|
|
||||||
#define EVENT_INPUT 0x1
|
|
||||||
extern void lpm_disable_for_dev(bool on, char event_dev);
|
|
||||||
#endif
|
|
||||||
extern struct device *global_spi_parent_device;
|
extern struct device *global_spi_parent_device;
|
||||||
struct goodix_module goodix_modules;
|
struct goodix_module goodix_modules;
|
||||||
int core_module_prob_sate = CORE_MODULE_UNPROBED;
|
int core_module_prob_sate = CORE_MODULE_UNPROBED;
|
||||||
@@ -1384,9 +1377,6 @@ static irqreturn_t goodix_ts_threadirq_func(int irq, void *data)
|
|||||||
|
|
||||||
ts_esd->irq_status = true;
|
ts_esd->irq_status = true;
|
||||||
core_data->irq_trig_cnt++;
|
core_data->irq_trig_cnt++;
|
||||||
#ifdef CONFIG_TOUCH_BOOST
|
|
||||||
touch_irq_boost();
|
|
||||||
#endif
|
|
||||||
pm_stay_awake(core_data->bus->dev);
|
pm_stay_awake(core_data->bus->dev);
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
if (core_data->tp_pm_suspend) {
|
if (core_data->tp_pm_suspend) {
|
||||||
@@ -1400,9 +1390,6 @@ static irqreturn_t goodix_ts_threadirq_func(int irq, void *data)
|
|||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_TOUCH_BOOST
|
|
||||||
lpm_disable_for_dev(true, EVENT_INPUT);
|
|
||||||
#endif
|
#endif
|
||||||
/* inform external module */
|
/* inform external module */
|
||||||
mutex_lock(&goodix_modules.mutex);
|
mutex_lock(&goodix_modules.mutex);
|
||||||
@@ -1413,9 +1400,6 @@ static irqreturn_t goodix_ts_threadirq_func(int irq, void *data)
|
|||||||
ret = ext_module->funcs->irq_event(core_data, ext_module);
|
ret = ext_module->funcs->irq_event(core_data, ext_module);
|
||||||
if (ret == EVT_CANCEL_IRQEVT) {
|
if (ret == EVT_CANCEL_IRQEVT) {
|
||||||
mutex_unlock(&goodix_modules.mutex);
|
mutex_unlock(&goodix_modules.mutex);
|
||||||
#ifdef CONFIG_TOUCH_BOOST
|
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
#endif
|
|
||||||
pm_relax(core_data->bus->dev);
|
pm_relax(core_data->bus->dev);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
@@ -1443,9 +1427,6 @@ static irqreturn_t goodix_ts_threadirq_func(int irq, void *data)
|
|||||||
if (!core_data->tools_ctrl_sync && !ts_event->retry)
|
if (!core_data->tools_ctrl_sync && !ts_event->retry)
|
||||||
hw_ops->after_event_handler(core_data);
|
hw_ops->after_event_handler(core_data);
|
||||||
ts_event->retry = 0;
|
ts_event->retry = 0;
|
||||||
#ifdef CONFIG_TOUCH_BOOST
|
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
#endif
|
|
||||||
pm_relax(core_data->bus->dev);
|
pm_relax(core_data->bus->dev);
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
@@ -2030,9 +2011,6 @@ static int goodix_ts_suspend(struct goodix_ts_core *core_data)
|
|||||||
goodix_ts_power_off(core_data);
|
goodix_ts_power_off(core_data);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
#ifdef CONFIG_TOUCH_BOOST
|
|
||||||
lpm_disable_for_dev(false, EVENT_INPUT);
|
|
||||||
#endif
|
|
||||||
goodix_ts_release_connects(core_data);
|
goodix_ts_release_connects(core_data);
|
||||||
ts_info("Suspend end");
|
ts_info("Suspend end");
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ uint8_t esd_check = false;
|
|||||||
uint8_t esd_retry = 0;
|
uint8_t esd_retry = 0;
|
||||||
#endif /* #if NVT_TOUCH_ESD_PROTECT */
|
#endif /* #if NVT_TOUCH_ESD_PROTECT */
|
||||||
|
|
||||||
extern void touch_irq_boost(void);
|
|
||||||
extern void lpm_disable_for_dev(bool on, char event_dev);
|
|
||||||
extern int pen_charge_state_notifier_register_client(struct notifier_block *nb);
|
extern int pen_charge_state_notifier_register_client(struct notifier_block *nb);
|
||||||
extern int
|
extern int
|
||||||
pen_charge_state_notifier_unregister_client(struct notifier_block *nb);
|
pen_charge_state_notifier_unregister_client(struct notifier_block *nb);
|
||||||
@@ -1685,9 +1683,7 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
touch_irq_boost();
|
|
||||||
pm_stay_awake(&ts->client->dev);
|
pm_stay_awake(&ts->client->dev);
|
||||||
lpm_disable_for_dev(true, 0x1);
|
|
||||||
|
|
||||||
mutex_lock(&ts->lock);
|
mutex_lock(&ts->lock);
|
||||||
|
|
||||||
@@ -1763,7 +1759,6 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||||||
input_id = (uint8_t)(point_data[1] >> 3);
|
input_id = (uint8_t)(point_data[1] >> 3);
|
||||||
nvt_ts_wakeup_gesture_report(input_id, point_data);
|
nvt_ts_wakeup_gesture_report(input_id, point_data);
|
||||||
mutex_unlock(&ts->lock);
|
mutex_unlock(&ts->lock);
|
||||||
lpm_disable_for_dev(false, 0x1);
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1955,7 +1950,6 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||||||
XFER_ERROR:
|
XFER_ERROR:
|
||||||
|
|
||||||
mutex_unlock(&ts->lock);
|
mutex_unlock(&ts->lock);
|
||||||
lpm_disable_for_dev(false, 0x1);
|
|
||||||
pm_relax(&ts->client->dev);
|
pm_relax(&ts->client->dev);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,8 +87,6 @@ static int32_t nvt_ts_resume(struct device *dev);
|
|||||||
extern int dsi_panel_lockdown_info_read(unsigned char *plockdowninfo);
|
extern int dsi_panel_lockdown_info_read(unsigned char *plockdowninfo);
|
||||||
extern void dsi_panel_doubleclick_enable(bool on);
|
extern void dsi_panel_doubleclick_enable(bool on);
|
||||||
static int32_t nvt_check_palm(uint8_t input_id, uint8_t *data);
|
static int32_t nvt_check_palm(uint8_t input_id, uint8_t *data);
|
||||||
extern void touch_irq_boost(void);
|
|
||||||
extern void lpm_disable_for_dev(bool on, char event_dev);
|
|
||||||
extern void xiaomi_touch_send_btn_tap_key(int status);
|
extern void xiaomi_touch_send_btn_tap_key(int status);
|
||||||
uint32_t ENG_RST_ADDR = 0x7FFF80;
|
uint32_t ENG_RST_ADDR = 0x7FFF80;
|
||||||
uint32_t SWRST_N8_ADDR = 0; /* read from dtsi */
|
uint32_t SWRST_N8_ADDR = 0; /* read from dtsi */
|
||||||
@@ -1438,20 +1436,12 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||||||
pm_wakeup_event(&ts->input_dev->dev, 5000);
|
pm_wakeup_event(&ts->input_dev->dev, 5000);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (ts->debug_flag == TOUCH_IRQ_BOOST)
|
|
||||||
touch_irq_boost();
|
|
||||||
mutex_lock(&ts->lock);
|
mutex_lock(&ts->lock);
|
||||||
if (ts->debug_flag >= TOUCH_DISABLE_LPM) {
|
|
||||||
lpm_disable_for_dev(true, 0x1);
|
|
||||||
}
|
|
||||||
if (ts->dev_pm_suspend) {
|
if (ts->dev_pm_suspend) {
|
||||||
ret = wait_for_completion_timeout(
|
ret = wait_for_completion_timeout(
|
||||||
&ts->dev_pm_suspend_completion, msecs_to_jiffies(500));
|
&ts->dev_pm_suspend_completion, msecs_to_jiffies(500));
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
NVT_ERR("system(spi) can't finished resuming procedure, skip it\n");
|
NVT_ERR("system(spi) can't finished resuming procedure, skip it\n");
|
||||||
if (ts->debug_flag >= TOUCH_DISABLE_LPM) {
|
|
||||||
lpm_disable_for_dev(false, 0x1);
|
|
||||||
}
|
|
||||||
goto XFER_ERROR;
|
goto XFER_ERROR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1459,9 +1449,6 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||||||
ret = CTP_SPI_READ(ts->client, point_data, POINT_DATA_LEN + 1);
|
ret = CTP_SPI_READ(ts->client, point_data, POINT_DATA_LEN + 1);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
NVT_ERR("CTP_SPI_READ failed.(%d)\n", ret);
|
NVT_ERR("CTP_SPI_READ failed.(%d)\n", ret);
|
||||||
if (ts->debug_flag >= TOUCH_DISABLE_LPM) {
|
|
||||||
lpm_disable_for_dev(false, 0x1);
|
|
||||||
}
|
|
||||||
goto XFER_ERROR;
|
goto XFER_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1486,9 +1473,6 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||||||
} else {
|
} else {
|
||||||
nvt_update_firmware(ts->fw_name);
|
nvt_update_firmware(ts->fw_name);
|
||||||
}
|
}
|
||||||
if (ts->debug_flag >= TOUCH_DISABLE_LPM) {
|
|
||||||
lpm_disable_for_dev(false, 0x1);
|
|
||||||
}
|
|
||||||
goto XFER_ERROR;
|
goto XFER_ERROR;
|
||||||
}
|
}
|
||||||
#endif /* #if NVT_TOUCH_WDT_RECOVERY */
|
#endif /* #if NVT_TOUCH_WDT_RECOVERY */
|
||||||
@@ -1497,9 +1481,6 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||||||
/* ESD protect by FW handshake */
|
/* ESD protect by FW handshake */
|
||||||
if (nvt_fw_recovery(point_data)) {
|
if (nvt_fw_recovery(point_data)) {
|
||||||
nvt_esd_check_enable(true);
|
nvt_esd_check_enable(true);
|
||||||
if (ts->debug_flag >= TOUCH_DISABLE_LPM) {
|
|
||||||
lpm_disable_for_dev(false, 0x1);
|
|
||||||
}
|
|
||||||
goto XFER_ERROR;
|
goto XFER_ERROR;
|
||||||
}
|
}
|
||||||
#endif /* #if NVT_TOUCH_ESD_PROTECT */
|
#endif /* #if NVT_TOUCH_ESD_PROTECT */
|
||||||
@@ -1508,9 +1489,6 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||||||
input_id = (uint8_t)(point_data[1] >> 3);
|
input_id = (uint8_t)(point_data[1] >> 3);
|
||||||
|
|
||||||
if (nvt_check_palm(input_id, point_data)) {
|
if (nvt_check_palm(input_id, point_data)) {
|
||||||
if (ts->debug_flag >= TOUCH_DISABLE_LPM) {
|
|
||||||
lpm_disable_for_dev(false, 0x1);
|
|
||||||
}
|
|
||||||
goto XFER_ERROR; /* to skip point data parsing */
|
goto XFER_ERROR; /* to skip point data parsing */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1519,9 +1497,6 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||||||
if (bTouchIsAwake == 0) {
|
if (bTouchIsAwake == 0) {
|
||||||
input_id = (uint8_t)(point_data[1] >> 3);
|
input_id = (uint8_t)(point_data[1] >> 3);
|
||||||
nvt_ts_wakeup_gesture_report(input_id, point_data);
|
nvt_ts_wakeup_gesture_report(input_id, point_data);
|
||||||
if (ts->debug_flag >= TOUCH_DISABLE_LPM) {
|
|
||||||
lpm_disable_for_dev(false, 0x1);
|
|
||||||
}
|
|
||||||
mutex_unlock(&ts->lock);
|
mutex_unlock(&ts->lock);
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
@@ -1590,9 +1565,6 @@ static irqreturn_t nvt_ts_work_func(int irq, void *data)
|
|||||||
input_report_key(ts->input_dev, BTN_TOUCH, 0);
|
input_report_key(ts->input_dev, BTN_TOUCH, 0);
|
||||||
input_report_key(ts->input_dev, BTN_TOOL_FINGER,
|
input_report_key(ts->input_dev, BTN_TOOL_FINGER,
|
||||||
0);
|
0);
|
||||||
if (ts->debug_flag >= TOUCH_DISABLE_LPM) {
|
|
||||||
lpm_disable_for_dev(false, 0x1);
|
|
||||||
}
|
|
||||||
#if XIAOMI_ROI
|
#if XIAOMI_ROI
|
||||||
roi_frame_cnt = 0;
|
roi_frame_cnt = 0;
|
||||||
xiaomi_touch_send_btn_tap_key(0);
|
xiaomi_touch_send_btn_tap_key(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user