2023-01-20 13:19:53

by Luca Ellero

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

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 <[email protected]>
---
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


2023-01-20 15:25:03

by Andy Shevchenko

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

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


2023-01-23 08:30:35

by Luca Ellero

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

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: [email protected]
Internet: http://www.brickedbrain.com



2023-01-23 12:25:16

by Andy Shevchenko

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

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



2023-01-24 08:42:13

by Luca Ellero

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

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