diff mbox

[v12,4/5] Input: goodix - fix reset sequence

Message ID 1473530257-7495-5-git-send-email-irina.tirdea@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

tip-bot for Irina Tirdea Sept. 10, 2016, 5:57 p.m. UTC
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 <troy.kisky@boundarydevices.com>
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
---
 drivers/input/touchscreen/goodix.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Bastien Nocera Oct. 27, 2016, 1:44 p.m. UTC | #1
On Sat, 2016-09-10 at 20:57 +0300, Irina Tirdea wrote:
> 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 <troy.kisky@boundarydevices.com>
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>

Code looks fine. Again, would be nice to know on which devices this was
tested.

> ---
>  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;
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;