diff mbox series

[v2,1/3] ads7846: don't report pressure for ads7845

Message ID 20220721083458.6412-2-luca.ellero@brickedbrain.com
State New
Headers show
Series ads7846: fix support for ADS7845 | expand

Commit Message

Luca Ellero July 21, 2022, 8:34 a.m. UTC
From: Luca Ellero <l.ellero@asem.it>

ADS7845 doesn't support pressure.
This patch avoids the following error reported by libinput-list-devices:
"ADS7845 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE".

Signed-off-by: Luca Ellero <l.ellero@asem.it>
---
Changes for v2:
 - add missing period in commit message

 drivers/input/touchscreen/ads7846.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Uwe Kleine-König July 21, 2022, 8:48 p.m. UTC | #1
On Thu, Jul 21, 2022 at 10:34:56AM +0200, Luca Ellero wrote:
> From: Luca Ellero <l.ellero@asem.it>
> 
> ADS7845 doesn't support pressure.
> This patch avoids the following error reported by libinput-list-devices:
> "ADS7845 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE".
> 
> Signed-off-by: Luca Ellero <l.ellero@asem.it>

I don't know how picky Dmitry is, but some maintainers would ask you to
either add a Signed-off-by with the email address you sent this patch
from, or make sure to send it from the asem.it address.

Best regards
Uwe
Luca Ellero Aug. 1, 2022, 7:02 a.m. UTC | #2
On 29/07/2022 15:50, Andy Shevchenko wrote:
> On Thu, Jul 21, 2022 at 10:48:35PM +0200, Uwe Kleine-König wrote:
>> On Thu, Jul 21, 2022 at 10:34:56AM +0200, Luca Ellero wrote:
>>> From: Luca Ellero <l.ellero@asem.it>
>>>
>>> ADS7845 doesn't support pressure.
>>> This patch avoids the following error reported by libinput-list-devices:
>>> "ADS7845 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE".
>>>
>>> Signed-off-by: Luca Ellero <l.ellero@asem.it>
>>
>> I don't know how picky Dmitry is, but some maintainers would ask you to
>> either add a Signed-off-by with the email address you sent this patch
>> from, or make sure to send it from the asem.it address.
> 
> It's fine to be sent from different email of the same person.
> But like you said, some maintainers are really picky and that
> may block contribution (I have been seen a case, where actually
> allowing to do as above unblocks contribution since person can't
> re-sent properly the change from another address by some reasons).
> 
> 
Hi Andy,
thank you for your reply.
Ok, I will resend from the proper email.
Regards
Luca
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index bed68a68f330..24605c40d039 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -1316,8 +1316,9 @@  static int ads7846_probe(struct spi_device *spi)
 			pdata->y_min ? : 0,
 			pdata->y_max ? : MAX_12BIT,
 			0, 0);
-	input_set_abs_params(input_dev, ABS_PRESSURE,
-			pdata->pressure_min, pdata->pressure_max, 0, 0);
+	if (ts->model != 7845)
+		input_set_abs_params(input_dev, ABS_PRESSURE,
+				pdata->pressure_min, pdata->pressure_max, 0, 0);
 
 	/*
 	 * Parse common framework properties. Must be done here to ensure the