From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Luca Ellero <luca.ellero@brickedbrain.com>
Cc: dmitry.torokhov@gmail.com, daniel@zonque.org,
m.felsch@pengutronix.de, u.kleine-koenig@pengutronix.de,
mkl@pengutronix.de, miquel.raynal@bootlin.com,
imre.deak@nokia.com, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org, Luca Ellero <l.ellero@asem.it>
Subject: Re: [PATCH 3/3] ads7846: don't check penirq immediately for 7845
Date: Thu, 14 Jul 2022 14:35:26 +0300 [thread overview]
Message-ID: <Ys//fqwvh9hjP0RZ@smile.fi.intel.com> (raw)
In-Reply-To: <20220714084319.107334-4-luca.ellero@brickedbrain.com>
On Thu, Jul 14, 2022 at 10:43:19AM +0200, Luca Ellero wrote:
> From: Luca Ellero <l.ellero@asem.it>
>
> To discard false readings, one should use "ti,penirq-recheck-delay-usecs".
> Checking get_pendown_state() at the beginning, most of the time fails
> causing malfunctioning.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Luca Ellero <l.ellero@asem.it>
> ---
> drivers/input/touchscreen/ads7846.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
> index 9e15cdf6faa0..122d3a13b7c5 100644
> --- a/drivers/input/touchscreen/ads7846.c
> +++ b/drivers/input/touchscreen/ads7846.c
> @@ -843,14 +843,8 @@ static void ads7846_report_state(struct ads7846 *ts)
> if (x == MAX_12BIT)
> x = 0;
>
> - if (ts->model == 7843) {
> + if (ts->model == 7843 || ts->model == 7845) {
> Rt = ts->pressure_max / 2;
> - } else if (ts->model == 7845) {
> - if (get_pendown_state(ts))
> - Rt = ts->pressure_max / 2;
> - else
> - Rt = 0;
> - dev_vdbg(&ts->spi->dev, "x/y: %d/%d, PD %d\n", x, y, Rt);
> } else if (likely(x && z1)) {
> /* compute touch pressure resistance using equation #2 */
> Rt = z2;
> --
> 2.25.1
>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-07-14 11:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-14 8:43 [PATCH 0/3] ads7846: fix support for ADS7845 Luca Ellero
2022-07-14 8:43 ` [PATCH 1/3] ads7846: don't report pressure for ads7845 Luca Ellero
2022-07-14 11:32 ` Andy Shevchenko
2022-07-15 14:36 ` Luca Ellero
2022-07-14 8:43 ` [PATCH 2/3] ads7846: always set last command to PWRDOWN Luca Ellero
2022-07-14 11:34 ` Andy Shevchenko
2022-07-14 8:43 ` [PATCH 3/3] ads7846: don't check penirq immediately for 7845 Luca Ellero
2022-07-14 11:35 ` Andy Shevchenko [this message]
2022-11-29 15:19 [PATCH 0/3 RESEND] ads7846: fix support for ADS7845 Luca Ellero
2022-11-29 15:19 ` [PATCH 3/3] ads7846: don't check penirq immediately for 7845 Luca Ellero
2022-11-29 16:24 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Ys//fqwvh9hjP0RZ@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=daniel@zonque.org \
--cc=dmitry.torokhov@gmail.com \
--cc=imre.deak@nokia.com \
--cc=l.ellero@asem.it \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ellero@brickedbrain.com \
--cc=m.felsch@pengutronix.de \
--cc=miquel.raynal@bootlin.com \
--cc=mkl@pengutronix.de \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®