diff mbox series

[1/3] Input: ads7846 - don't report pressure for ads7845

Message ID 20230120124544.5993-2-l.ellero@asem.it (mailing list archive)
State Superseded
Headers show
Series Input: ads7846 - fix support for ADS7845 | expand

Commit Message

Luca Ellero Jan. 20, 2023, 12:45 p.m. UTC
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>
---
 drivers/input/touchscreen/ads7846.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Andy Shevchenko Jan. 20, 2023, 3:16 p.m. UTC | #1
On Fri, Jan 20, 2023 at 01:45:42PM +0100, Luca Ellero wrote:
> ADS7845 doesn't support pressure.
> This patch avoids the following error reported by libinput-list-devices:

s/This patch avoids/Avoid/

(This rule is written in Submitting Patches documentation.)

> "ADS7845 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE".

Do you need a Fixes tag?
Luca Ellero Jan. 23, 2023, 8:27 a.m. UTC | #2
On 20/01/2023 16:16, Andy Shevchenko wrote:
> On Fri, Jan 20, 2023 at 01:45:42PM +0100, Luca Ellero wrote:
>> ADS7845 doesn't support pressure.
>> This patch avoids the following error reported by libinput-list-devices:
> 
> s/This patch avoids/Avoid/
> 
> (This rule is written in Submitting Patches documentation.)
> 
>> "ADS7845 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE".
> 
> Do you need a Fixes tag?
> 

Hi Andy,
thank you for your reply.
I haven't found a specific bug report to apply to this patches.
Could you kindly provide a "Fixes:" tag that I can apply?

It's more like this driver has never been tested with ADS7845.
Maybe the patches should be considered as a new implementation instead 
than a bug fix?


Thanks
Regards
Luca Ellero
Andy Shevchenko Jan. 23, 2023, 12:25 p.m. UTC | #3
On Mon, Jan 23, 2023 at 09:27:37AM +0100, Luca Ellero wrote:
> On 20/01/2023 16:16, Andy Shevchenko wrote:
> > On Fri, Jan 20, 2023 at 01:45:42PM +0100, Luca Ellero wrote:
> > > ADS7845 doesn't support pressure.
> > > This patch avoids the following error reported by libinput-list-devices:
> > 
> > s/This patch avoids/Avoid/
> > 
> > (This rule is written in Submitting Patches documentation.)
> > 
> > > "ADS7845 Touchscreen: kernel bug: device has min == max on ABS_PRESSURE".
> > 
> > Do you need a Fixes tag?
> > 
> 
> Hi Andy,
> thank you for your reply.
> I haven't found a specific bug report to apply to this patches.
> Could you kindly provide a "Fixes:" tag that I can apply?

The Fixes tag in accordance with the documentation should refer to the commit
in the Git history which brought the problem (regression).

> It's more like this driver has never been tested with ADS7845.
> Maybe the patches should be considered as a new implementation instead than
> a bug fix?

If it's indeed from day 1, then the initial commit can be considered as Fixes
tag, but I leave it to maintainer to decide.
Luca Ellero Jan. 24, 2023, 8:40 a.m. UTC | #4
On 23/01/2023 13:25, Andy Shevchenko wrote:
> The Fixes tag in accordance with the documentation should refer to the commit
> in the Git history which brought the problem (regression).
> 
>> It's more like this driver has never been tested with ADS7845.
>> Maybe the patches should be considered as a new implementation instead than
>> a bug fix?
> If it's indeed from day 1, then the initial commit can be considered as Fixes
> tag, but I leave it to maintainer to decide.

Hi Andy,
thank you for your reply.
OK, I will add the initial commit as Fixes: tag and resend all the series.
Regards
Luca Ellero
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 4c3dd01902d0..f11b444f2138 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