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

Luca Ellero posted 3 patches 2 years, 10 months ago
There is a newer version of this series
[PATCH 1/3] Input: ads7846 - don't report pressure for ads7845
Posted by Luca Ellero 2 years, 10 months ago
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(-)

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
-- 
2.25.1
Re: [PATCH 1/3] Input: ads7846 - don't report pressure for ads7845
Posted by Andy Shevchenko 2 years, 10 months ago
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?

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH 1/3] Input: ads7846 - don't report pressure for ads7845
Posted by Luca Ellero 2 years, 10 months ago
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




-- 
Luca Ellero

E-mail: luca.ellero@brickedbrain.com
Internet: www.brickedbrain.com
Re: [PATCH 1/3] Input: ads7846 - don't report pressure for ads7845
Posted by Andy Shevchenko 2 years, 10 months ago
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.

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH 1/3] Input: ads7846 - don't report pressure for ads7845
Posted by Luca Ellero 2 years, 10 months ago
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