Re: [PATCH] Input: ili210x - add missing negation for touch indication on ili210x

From: Marek Vasut
Date: Thu May 06 2021 - 13:51:05 EST


On 5/6/21 7:32 PM, Hansem Ro wrote:
This adds the negation needed for proper finger detection on Ilitek
ili2107/ili210x. This fixes the polling and coordinate parsing issues
(on Amazon Kindle Fire) caused by returning false for the cooresponding
finger on the touchscreen.

Signed-off-by: Hansem Ro <hansemro@xxxxxxxxxxx>
---
drivers/input/touchscreen/ili210x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/ili210x.c b/drivers/input/touchscreen/ili210x.c
index d8fccf048bf4..30576a5f2f04 100644
--- a/drivers/input/touchscreen/ili210x.c
+++ b/drivers/input/touchscreen/ili210x.c
@@ -87,7 +87,7 @@ static bool ili210x_touchdata_to_coords(const u8 *touchdata,
unsigned int *x, unsigned int *y,
unsigned int *z)
{
- if (touchdata[0] & BIT(finger))
+ if (!(touchdata[0] & BIT(finger)))

This makes the behavior consistent with the other ILI21xx touchscreen controllers too, so I think this patch is OK, thanks.

It would be nice if you could add Fixes: tag, so this could get picked into linux-stable too.