From mboxrd@z Thu Jan 1 00:00:00 1970 From: Irina Tirdea Subject: [PATCH v12 4/5] Input: goodix - fix reset sequence Date: Sat, 10 Sep 2016 20:57:36 +0300 Message-ID: <1473530257-7495-5-git-send-email-irina.tirdea@intel.com> References: <1473530257-7495-1-git-send-email-irina.tirdea@intel.com> Return-path: Received: from mga02.intel.com ([134.134.136.20]:26075 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932228AbcIJR6z (ORCPT ); Sat, 10 Sep 2016 13:58:55 -0400 In-Reply-To: <1473530257-7495-1-git-send-email-irina.tirdea@intel.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: linux-input@vger.kernel.org Cc: Dmitry Torokhov , Bastien Nocera , Aleksei Mamlin , Karsten Merker , Mark Rutland , Rob Herring , Octavian Purdila , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Irina Tirdea According to the Goodix datasheet, the reset sequence will leave the reset line set to output high. To end the selection of the I2C address, we just need to set the input line to low for at least 50 ms and then set it to input floating (already implemented by goodix_int_sync). Remove setting the reset line to input from the reset sequence, since that is not reflected in the datasheet. This is based on Goodix datasheets for GT911 and GT9271 and on Goodix driver gt9xx.c for Android (publicly available in Android kernel trees for various devices). Suggested-by: Troy Kisky Signed-off-by: Irina Tirdea --- drivers/input/touchscreen/goodix.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index 182ff9c..6fba804 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -454,10 +454,6 @@ static int goodix_reset(struct goodix_ts_data *ts) usleep_range(6000, 10000); /* T4: > 5ms */ /* end select I2C slave addr */ - error = gpiod_direction_input(ts->gpiod_rst); - if (error) - return error; - error = goodix_int_sync(ts); if (error) return error; -- 1.9.1