Explorar el Código

touch: focaltech: fix pinctrl state in suspend resume

In FT8726 touch controller, separate regulators are not needed. But
regulator voting and pinctrl suspend / normal calls are done together.
This leads to wrong pinctrl state during suspend leading to leakage.

Change-Id: Ia9fe89db1c0c87fd02ee4a7cf6f5a485cb7e23d4
Signed-off-by: Ritesh Kumar <[email protected]>
Signed-off-by: Jyothi bommidi <[email protected]>
Jyothi bommidi hace 1 año
padre
commit
0fd74014a7
Se han modificado 1 ficheros con 11 adiciones y 1 borrados
  1. 11 1
      focaltech_touch/focaltech_core.c

+ 11 - 1
focaltech_touch/focaltech_core.c

@@ -3026,6 +3026,11 @@ static int fts_ts_suspend(struct device *dev)
 				FTS_ERROR("power enter suspend fail");
 			}
 #endif
+		} else {
+#if FTS_PINCTRL_EN
+			fts_pinctrl_select_suspend(ts_data);
+#endif
+			gpio_direction_output(ts_data->pdata->reset_gpio, 0);
 		}
 	}
 
@@ -3073,9 +3078,14 @@ static int fts_ts_resume(struct device *dev)
 #if FTS_POWER_SOURCE_CUST_EN
 		fts_power_source_resume(ts_data);
 #endif
-		fts_reset_proc(200);
+	} else {
+#if FTS_PINCTRL_EN
+		fts_pinctrl_select_normal(ts_data);
+#endif
 	}
 
+	fts_reset_proc(200);
+
 	fts_wait_tp_to_valid();
 	fts_ex_mode_recovery(ts_data);