From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andrey Moiseev <o2g.org.ru@gmail.com>
Cc: linux-input@vger.kernel.org, arnoques@gmail.com,
russianneuromancer@ya.ru, ike.pan@canonical.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 1/1] input: ideapad_slidebar: new input driver
Date: Tue, 20 Aug 2013 12:45:27 -0700 [thread overview]
Message-ID: <20130820194527.GA22595@core.coreip.homeip.net> (raw)
In-Reply-To: <520DCDA5.8090001@gmail.com>
Hi Andrey,
On Fri, Aug 16, 2013 at 10:58:45AM +0400, Andrey Moiseev wrote:
> v7: fixed things addressed by Dmitry Torokhov to v7 (quoted message goes below the patch)
>
This looks almost perfect, I have just one question:
> +static bool slidebar_i8042_filter(unsigned char data, unsigned char str,
> + struct serio *port)
> +{
> + static bool extended = false;
> +
> + /* Scancodes: e03b on move, e0bb on release */
> + if (unlikely(data == 0xe0)) {
> + extended = true;
> + return false;
> + } else if (unlikely(extended && (data == 0x3b))) {
> + extended = false;
> + input_report_key(slidebar_input_dev, BTN_TOUCH, 1);
> + input_report_abs(slidebar_input_dev, ABS_X, slidebar_pos_get());
> + input_sync(slidebar_input_dev);
> + return false;
> + } else if (unlikely(extended && (data == 0xbb))) {
> + input_report_key(slidebar_input_dev, BTN_TOUCH, 0);
> + input_sync(slidebar_input_dev);
Don't you need to reset 'extended" here as well?
--
Dmitry
prev parent reply other threads:[~2013-08-20 19:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-16 6:58 [PATCH v7 1/1] input: ideapad_slidebar: new input driver Andrey Moiseev
2013-08-20 19:45 ` Dmitry Torokhov [this message]
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=20130820194527.GA22595@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=arnoques@gmail.com \
--cc=ike.pan@canonical.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=o2g.org.ru@gmail.com \
--cc=russianneuromancer@ya.ru \
/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;
as well as URLs for NNTP newsgroup(s).