mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
himax_v2_mmi: Enable TP reset in resume.
TP: Enable TP reset in resume. This can ensure TP panel working normal. If panel is 0flash panel, we can decrease delay time Change-Id: I880a4e82e845c79c37ed5be74d59a9e4d9f5105d Signed-off-by: haojl2 <haojl2@motorola.com> Reviewed-on: https://gerrit.mot.com/1380206 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
b3e5067a9b
commit
e98ba6016d
4 changed files with 40 additions and 19 deletions
|
|
@ -3474,7 +3474,7 @@ END:
|
|||
|
||||
int himax_chip_common_resume(struct himax_ts_data *ts)
|
||||
{
|
||||
#if defined(HX_RST_PIN_FUNC) && defined(HX_RESUME_HW_RESET) && defined(HX_ZERO_FLASH)
|
||||
#if defined(HX_ZERO_FLASH) && defined(HX_RESUME_SET_FW)
|
||||
int result = 0;
|
||||
#endif
|
||||
I("%s: enter\n", __func__);
|
||||
|
|
@ -3497,21 +3497,15 @@ int himax_chip_common_resume(struct himax_ts_data *ts)
|
|||
if (ts->pdata->powerOff3V3 && ts->pdata->power)
|
||||
ts->pdata->power(1);
|
||||
|
||||
|
||||
#if defined(HX_SMART_WAKEUP) || defined(HX_HIGH_SENSE) || defined(HX_USB_DETECT_GLOBAL)
|
||||
if (g_core_fp.fp_resend_cmd_func != NULL)
|
||||
g_core_fp.fp_resend_cmd_func(ts->suspended);
|
||||
|
||||
#ifdef HX_CODE_OVERLAY
|
||||
if (ts->SMWP_enable && ts->in_self_test == 0)
|
||||
g_core_fp.fp_0f_overlay(3, 0);
|
||||
#endif
|
||||
|
||||
#elif defined(HX_RST_PIN_FUNC) && defined(HX_RESUME_HW_RESET)
|
||||
#if defined(HX_RST_PIN_FUNC) && defined(HX_RESUME_HW_RESET)
|
||||
if (g_core_fp.fp_ic_reset != NULL)
|
||||
g_core_fp.fp_ic_reset(false, false);
|
||||
#ifdef HX_ZERO_FLASH
|
||||
I("It will update fw after esd event in zero flash mode!\n");
|
||||
#endif
|
||||
#if defined(HX_ZERO_FLASH) && defined(HX_RESUME_SET_FW)
|
||||
#ifdef HX_SMART_WAKEUP
|
||||
if (!ts->SMWP_enable) {
|
||||
#endif
|
||||
I("It will update fw after resume in zero flash mode!\n");
|
||||
if (g_core_fp.fp_0f_operation_dirly != NULL) {
|
||||
result = g_core_fp.fp_0f_operation_dirly();
|
||||
if (result) {
|
||||
|
|
@ -3523,6 +3517,17 @@ int himax_chip_common_resume(struct himax_ts_data *ts)
|
|||
g_core_fp.fp_reload_disable(0);
|
||||
if (g_core_fp.fp_sense_on != NULL)
|
||||
g_core_fp.fp_sense_on(0x00);
|
||||
#ifdef HX_SMART_WAKEUP
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#if defined(HX_SMART_WAKEUP) || defined(HX_HIGH_SENSE) || defined(HX_USB_DETECT_GLOBAL)
|
||||
if (g_core_fp.fp_resend_cmd_func != NULL)
|
||||
g_core_fp.fp_resend_cmd_func(ts->suspended);
|
||||
|
||||
#ifdef HX_CODE_OVERLAY
|
||||
if (ts->SMWP_enable && ts->in_self_test == 0)
|
||||
g_core_fp.fp_0f_overlay(3, 0);
|
||||
#endif
|
||||
#endif
|
||||
himax_report_all_leave_event(ts);
|
||||
|
|
@ -3530,7 +3535,7 @@ int himax_chip_common_resume(struct himax_ts_data *ts)
|
|||
if (g_core_fp.fp_sense_on != NULL)
|
||||
g_core_fp.fp_resume_ic_action();
|
||||
himax_int_enable(1);
|
||||
#if defined(HX_RST_PIN_FUNC) && defined(HX_RESUME_HW_RESET) && defined(HX_ZERO_FLASH)
|
||||
#if defined(HX_ZERO_FLASH) && defined(HX_RESUME_SET_FW)
|
||||
ESCAPE_0F_UPDATE:
|
||||
#endif
|
||||
END:
|
||||
|
|
|
|||
|
|
@ -76,10 +76,11 @@
|
|||
/*#define HX_USB_DETECT_GLOBAL*/
|
||||
/*#define HX_USB_DETECT_CALLBACK*/
|
||||
/*#define HX_PROTOCOL_A*/ /* for MTK special platform.If turning on,it will report to system by using specific format. */
|
||||
/*#define HX_RESUME_HW_RESET*/
|
||||
#define HX_RESUME_HW_RESET
|
||||
#define HX_PROTOCOL_B_3PA
|
||||
/*#define HX_FIX_TOUCH_INFO*/ /* if open, you need to change the touch info in the fix_touch_info*/
|
||||
/*#define HX_ZERO_FLASH*/
|
||||
/*#define HX_RESUME_SET_FW*/
|
||||
/*#if defined(HX_ZERO_FLASH)*/
|
||||
/*#define HX_CODE_OVERLAY*/
|
||||
/*#define HX_EDGE_LIMIT*/
|
||||
|
|
@ -361,6 +362,7 @@ struct himax_ts_data {
|
|||
int use_irq;
|
||||
int (*power)(int on);
|
||||
int pre_finger_data[10][2];
|
||||
bool vdd_1v8_always_on;
|
||||
|
||||
struct device *dev;
|
||||
struct workqueue_struct *himax_wq;
|
||||
|
|
|
|||
|
|
@ -2019,11 +2019,20 @@ static int himax_mcu_fw_ver_bin(void)
|
|||
#ifdef HX_RST_PIN_FUNC
|
||||
static void himax_mcu_pin_reset(void)
|
||||
{
|
||||
I("%s: Now reset the Touch chip.\n", __func__);
|
||||
I("%s: Now reset the Touch chip,private_ts->vdd_1v8_always_on = %d \n",
|
||||
__func__,private_ts->vdd_1v8_always_on);
|
||||
himax_rst_gpio_set(private_ts->rst_gpio, 0);
|
||||
msleep(20);
|
||||
if(private_ts->vdd_1v8_always_on)
|
||||
msleep(10);
|
||||
else
|
||||
msleep(20);
|
||||
himax_rst_gpio_set(private_ts->rst_gpio, 1);
|
||||
msleep(50);
|
||||
#ifdef HX_ZERO_FLASH
|
||||
msleep(10);
|
||||
#else
|
||||
msleep(50);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static void himax_mcu_ic_reset(uint8_t loadconfig, uint8_t int_off)
|
||||
|
|
|
|||
|
|
@ -196,6 +196,11 @@ int himax_parse_dt(struct himax_ts_data *ts,
|
|||
I(" DT:protocol_type=%d\n", pdata->protocol_type);
|
||||
}
|
||||
|
||||
ts->vdd_1v8_always_on = of_property_read_bool(dt, "himax,vdd_1v8_always_on");
|
||||
if (ts->vdd_1v8_always_on){
|
||||
I(" DT:vdd_1v8_always_on=%d\n", ts->vdd_1v8_always_on);
|
||||
}
|
||||
|
||||
himax_vk_parser(dt, pdata);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue