linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: duson <dusonlin@emc.com.tw>,
	'Dmitry Torokhov' <dmitry.torokhov@gmail.com>,
	'Benjamin Tissoires' <benjamin.tissoires@gmail.com>
Cc: 'linux-input' <linux-input@vger.kernel.org>,
	"'Peter Hutterer'" <peter.hutterer@redhat.com>,
	'黃世鵬' <phoenix@emc.com.tw>
Subject: Re: [PATCH 1/2] elantech: Properly differentiate between clickpads and normal touchpads
Date: Tue, 10 Dec 2013 09:45:36 +0100	[thread overview]
Message-ID: <52A6D4B0.20206@redhat.com> (raw)
In-Reply-To: <CF3F8F5F02EE401CBA8F5EFBCC62074D@elan.corp>

Hi Duson,

On 12/10/2013 09:35 AM, duson wrote:

<snip>

>> We should not advertise events that device does not generate. This
>> should help userspace to decide if emulation is needed or not. Input
>> core will drop events that are not set up as valid for device, so if we
>> clear BTN_RIGHT there it should all work.
> 
> Actually, our touchpad for PS2 protocol implements the left and right click
> function, even thought, it is a click-pad. And the flag for left/right click
> information is recorded in the first byte of the packet (when doing sync
> method).
> 	Byte0 Bit 0 --> for left click flag
> 	Byte0 Bit1 --> for right click flag
> When user presses the left-bottom area of the click-pad, only the left click
> flag will be set to "1". On the other hand, pressing the right-bottom area
> of the click-pad, only the right click flag will be set to "1".
> So, I think this is the cause of the BTN_RIGHT need to be set.

Are you sure? All info we have so far indicates that the right button needs
to be emulated in software in the clickpad case, ie a while back this
commit was added:

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/input/mouse/elantech.c?id=e3dde4fba94e0ba5e1fd79ea9e5389eea1f0cfec

To fix the right button not working, this also removes the checking
for bit 1 / reporting of BTN_RIGHT events, so if the right click area
would actually send right clicks I would expect the above commit to
have broken right clicking for tons of users, and we have no bug reports
about this (my patch fixes the right button being broken in the non
clickpad case).

Note that the Linux driver uses the touchpad in absolute mode, not in
relative / ps/2 mouse emulation mode. Could it be that the handling of the
right button emulation for clickpads is only done in the firmware in
relative mode ?

Or maybe it is done in firmware for hardware v3 clickpads, but not for
v4 clickpads ?

Thanks & Regards,

Hans

  reply	other threads:[~2013-12-10  8:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09 14:32 [PATCH 1/2] elantech: Properly differentiate between clickpads and normal touchpads Hans de Goede
2013-12-09 14:32 ` [PATCH 2/2] elantech: Add support for IC-body version 8 Hans de Goede
2013-12-09 17:50   ` Benjamin Tissoires
2013-12-09 18:02 ` [PATCH 1/2] elantech: Properly differentiate between clickpads and normal touchpads Benjamin Tissoires
2013-12-09 19:14   ` Hans de Goede
2013-12-09 19:21     ` Benjamin Tissoires
2013-12-10  6:12       ` Dmitry Torokhov
2013-12-10  8:35         ` duson
2013-12-10  8:45           ` Hans de Goede [this message]
2013-12-10  9:29             ` duson
2013-12-10  8:37         ` Hans de Goede
2013-12-10  9:58       ` Peter Hutterer
2013-12-10  5:15   ` duson

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=52A6D4B0.20206@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=benjamin.tissoires@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dusonlin@emc.com.tw \
    --cc=linux-input@vger.kernel.org \
    --cc=peter.hutterer@redhat.com \
    --cc=phoenix@emc.com.tw \
    /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).