Просмотр исходного кода

touch: goodix: move qts initialization to after touch power on

qts initialization will contain an event notifier, sometimes the
qupv engine init fail and causes goodix_ts_power_on failure, it
leads to touch probe function failure. In this case there is no
need to register this notifier, otherwise the resume function may
access resource like irqs, which are not ready because probe failure,
it may cause crash.

Change-Id: I65bf39ec3ca3e2ea92eb84366b75a98ba43b8816
Signed-off-by: Yu Wu <[email protected]>
Yu Wu 2 лет назад
Родитель
Сommit
f650cebc81
1 измененных файлов с 13 добавлено и 12 удалено
  1. 13 12
      goodix_berlin_driver/goodix_ts_core.c

+ 13 - 12
goodix_berlin_driver/goodix_ts_core.c

@@ -2509,18 +2509,6 @@ static int goodix_ts_probe(struct platform_device *pdev)
 	}
 
 	core_data->bus = bus_interface;
-	qts_en = of_property_read_bool(node, "goodix,qts_en");
-	if (qts_en) {
-		mutex_init(&core_data->tui_transition_lock);
-		goodix_ts_fill_qts_vendor_data(&qts_vendor_data, core_data);
-
-		ret = qts_client_register(qts_vendor_data);
-		if (ret) {
-			pr_err("qts client register failed, rc %d\n", ret);
-			goto err_out;
-		}
-		core_data->qts_en = qts_en;
-	}
 
 	if (IS_ENABLED(CONFIG_OF) && bus_interface->dev->of_node) {
 		/* parse devicetree property */
@@ -2575,6 +2563,19 @@ static int goodix_ts_probe(struct platform_device *pdev)
 		goto err_out;
 	}
 
+	qts_en = of_property_read_bool(node, "goodix,qts_en");
+	if (qts_en) {
+		mutex_init(&core_data->tui_transition_lock);
+		goodix_ts_fill_qts_vendor_data(&qts_vendor_data, core_data);
+
+		ret = qts_client_register(qts_vendor_data);
+		if (ret) {
+			pr_err("qts client register failed, rc %d\n", ret);
+			goto err_out;
+		}
+		core_data->qts_en = qts_en;
+	}
+
 #ifdef CONFIG_ARCH_QTI_VM
 skip_to_power_gpio_setup:
 #endif