mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
DLKM: Sync focaltech_0flash_mmi code with bq-sh2019
- (CR): focaltech_0flash_mmi: set deep sleep when predict failed - (CR): focaltech_0flash_mmi: set reset pin to 0 if vio is close - Release all fingers when resume Change-Id: Ia6b8169d560951c3407a8c2b28b2d21d071bf710 Signed-off-by: wengjun1 <wengjun1@motorola.com> Reviewed-on: https://gerrit.mot.com/1427799 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Yeqing Wang <wangyq13@motorola.com> Reviewed-by: Hujun Liao <liaohj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
d2b208e3c5
commit
ce77347141
2 changed files with 23 additions and 0 deletions
|
|
@ -1520,6 +1520,10 @@ static int fts_parse_dt(struct device *dev, struct fts_ts_platform_data *pdata)
|
|||
if (pdata->share_reset_gpio)
|
||||
FTS_INFO("TP reset pin is shared with LCD");
|
||||
|
||||
pdata->always_on_vio = of_property_read_bool(np, "focaltech,always_on_vio");
|
||||
if (pdata->always_on_vio)
|
||||
FTS_INFO("TP VIO always on.");
|
||||
|
||||
pdata->irq_gpio = of_get_named_gpio_flags(np, "focaltech,irq-gpio",
|
||||
0, &pdata->irq_gpio_flags);
|
||||
if (pdata->irq_gpio < 0)
|
||||
|
|
@ -1600,6 +1604,12 @@ int drm_notifier_callback(struct notifier_block *self,
|
|||
FTS_INFO("palm detection is enabled");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
#ifdef FOCALTECH_SENSOR_EN
|
||||
if (fts_data->should_enable_gesture) {
|
||||
FTS_INFO("double tap gesture suspend\n");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
} else if (MSM_DRM_EVENT_BLANK == event) {
|
||||
FTS_INFO("suspend: event = %lu, not care\n", event);
|
||||
|
|
@ -2077,6 +2087,11 @@ static int _fts_ts_suspend(struct device *dev)
|
|||
#endif
|
||||
}
|
||||
|
||||
if (!ts_data->pdata->always_on_vio) {
|
||||
FTS_INFO("Set reset pin to 0 in suspend.");
|
||||
gpio_direction_output(ts_data->pdata->reset_gpio, 0);
|
||||
}
|
||||
|
||||
fts_release_all_finger();
|
||||
ts_data->suspended = true;
|
||||
FTS_FUNC_EXIT();
|
||||
|
|
@ -2114,6 +2129,8 @@ static int _fts_ts_resume(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
fts_release_all_finger();
|
||||
|
||||
if (!ts_data->ic_info.is_incell) {
|
||||
#if FTS_POWER_SOURCE_CUST_EN
|
||||
fts_power_source_resume(ts_data);
|
||||
|
|
@ -2121,6 +2138,11 @@ static int _fts_ts_resume(struct device *dev)
|
|||
//fts_reset_proc(200);
|
||||
}
|
||||
|
||||
if (!ts_data->pdata->always_on_vio) {
|
||||
FTS_INFO("Reset IC in resume");
|
||||
fts_reset_proc(200);
|
||||
}
|
||||
|
||||
fts_tp_state_recovery(ts_data);
|
||||
|
||||
#if FTS_ESDCHECK_EN
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ struct fts_ts_platform_data {
|
|||
u32 irq_gpio_flags;
|
||||
u32 reset_gpio;
|
||||
u32 reset_gpio_flags;
|
||||
bool always_on_vio;
|
||||
bool share_reset_gpio;
|
||||
bool have_key;
|
||||
u32 key_number;
|
||||
|
|
|
|||
Loading…
Reference in a new issue