From: Benoit Parrot <bparrot@ti.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: <linux-input@vger.kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Marco Felsch <m.felsch@pengutronix.de>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] Input: edt-ft5x06 - simplify event reporting code
Date: Fri, 28 Jun 2019 12:37:02 -0500 [thread overview]
Message-ID: <20190628173702.6wr453fmcyfdxoid@ti.com> (raw)
In-Reply-To: <20190623063153.261546-2-dmitry.torokhov@gmail.com>
Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote on Sat [2019-Jun-22 23:31:53 -0700]:
> Now that input_mt_report_slot_state() returns true if slot is active we no
> longer need a temporary for the slot state.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Appears to work fine in my test:
Tested-by: Benoit Parrot <bparrot@ti.com>
> ---
> drivers/input/touchscreen/edt-ft5x06.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c
> index ec770226e119..3cc4341bbdff 100644
> --- a/drivers/input/touchscreen/edt-ft5x06.c
> +++ b/drivers/input/touchscreen/edt-ft5x06.c
> @@ -229,7 +229,6 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
>
> for (i = 0; i < tsdata->max_support_points; i++) {
> u8 *buf = &rdbuf[i * tplen + offset];
> - bool down;
>
> type = buf[0] >> 6;
> /* ignore Reserved events */
> @@ -247,16 +246,12 @@ static irqreturn_t edt_ft5x06_ts_isr(int irq, void *dev_id)
> swap(x, y);
>
> id = (buf[2] >> 4) & 0x0f;
> - down = type != TOUCH_EVENT_UP;
>
> input_mt_slot(tsdata->input, id);
> - input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER, down);
> -
> - if (!down)
> - continue;
> -
> - touchscreen_report_pos(tsdata->input, &tsdata->prop, x, y,
> - true);
> + if (input_mt_report_slot_state(tsdata->input, MT_TOOL_FINGER,
> + type != TOUCH_EVENT_UP))
> + touchscreen_report_pos(tsdata->input, &tsdata->prop,
> + x, y, true);
> }
>
> input_mt_report_pointer_emulation(tsdata->input, true);
> --
> 2.22.0.410.gd8fdbe21b5-goog
>
next prev parent reply other threads:[~2019-06-28 17:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-23 6:31 [PATCH 1/2] Input: edt-ft5x06 - use get_unaligned_be16() Dmitry Torokhov
2019-06-23 6:31 ` [PATCH 2/2] Input: edt-ft5x06 - simplify event reporting code Dmitry Torokhov
2019-06-23 7:59 ` Andy Shevchenko
2019-06-30 7:05 ` Dmitry Torokhov
2019-07-01 10:41 ` Andy Shevchenko
2019-06-28 17:37 ` Benoit Parrot [this message]
2019-06-23 8:00 ` [PATCH 1/2] Input: edt-ft5x06 - use get_unaligned_be16() Andy Shevchenko
2019-06-25 8:44 ` David Laight
2019-06-25 10:50 ` Andy Shevchenko
2019-06-25 13:00 ` David Laight
2019-06-28 17:36 ` Benoit Parrot
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=20190628173702.6wr453fmcyfdxoid@ti.com \
--to=bparrot@ti.com \
--cc=andy.shevchenko@gmail.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.felsch@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
Powered by JetHome