فهرست منبع

touch: goodix: Sleep 100ms after reset operation

It is found there might be some i2c NACK error after
power on and reset operation, from goodix datasheet
it is required to wait 100ms after reset operation
before I2C communication, so put a 100ms sleep after
reset.

Change-Id: I2601085f85c83a57bc895915506eaf0c29442678
Signed-off-by: Yu Wu <[email protected]>
Yu Wu 2 سال پیش
والد
کامیت
3d03d5839e
1فایلهای تغییر یافته به همراه5 افزوده شده و 3 حذف شده
  1. 5 3
      goodix_berlin_driver/goodix_brl_hw.c

+ 5 - 3
goodix_berlin_driver/goodix_brl_hw.c

@@ -231,9 +231,12 @@ static int brl_power_on(struct goodix_ts_core *cd, bool on)
 				goto power_off;
 			}
 		}
+
+		gpio_direction_output(cd->board_data.reset_gpio, 0);
 		usleep_range(15000, 15100);
-		gpio_direction_output(reset_gpio, 1);
-		usleep_range(4000, 4100);
+		gpio_direction_output(cd->board_data.reset_gpio, 1);
+		msleep(GOODIX_NORMAL_RESET_DELAY_MS);
+
 		ret = brl_dev_confirm(cd);
 		if (ret < 0)
 			goto power_off;
@@ -241,7 +244,6 @@ static int brl_power_on(struct goodix_ts_core *cd, bool on)
 		if (ret < 0)
 			goto power_off;
 
-		msleep(GOODIX_NORMAL_RESET_DELAY_MS);
 		return 0;
 	}