himax_v2_mmi: Stop probe if get power failed

TP:
If TP power request failed, no need go on probe driver.

Change-Id: I999a3b6a8d2381b1cde17b013050db43bbc2ae2a
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1375139
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:
haojl2 2019-06-24 12:46:14 +08:00 • committed by Jialei Hao
commit be0e719a6b

View file

@ -3104,7 +3104,11 @@ int himax_chip_common_init(void)
#ifdef HX_RST_PIN_FUNC
ts->rst_gpio = pdata->gpio_reset;
#endif
himax_gpio_power_config(pdata);
if (himax_gpio_power_config(pdata)) {
err = -1;
E("%s: himax_gpio_power_config failed, stop Himax probe\n", __func__);
goto err_himax_gpio_power_config_failed;
}
#ifndef CONFIG_OF
if (pdata->power) {
@ -3326,6 +3330,7 @@ error_ic_detect_failed:
#ifndef CONFIG_OF
err_power_failed:
#endif
err_himax_gpio_power_config_failed:
err_alloc_dt_pdata_failed:
kfree(hx_touch_data);
hx_touch_data = NULL;