From: Dmitry Torokhov <dtor@insightbb.com>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: linux-input@atrey.karlin.mff.cuni.cz
Subject: Re: Circular synaptics pads
Date: Sun, 25 Mar 2007 01:27:34 -0400 [thread overview]
Message-ID: <200703250127.35272.dtor@insightbb.com> (raw)
In-Reply-To: <20070324043312.GB14593@srcf.ucam.org>
Hi Matthew,
On Saturday 24 March 2007 00:33, Matthew Garrett wrote:
> Ah, ignore that - it is in fact defined in the model ID field (should
> have read the specs more closely first!) - if bits 0-3 equal 0x02, then
> the pad is oval rather than rectangular (which matches the dumps I have
> access to). So, the remaining question is how should this be exported to
> userspace? In terms of interpreting scrolling, it's helpful for the
> driver to know that the pad is circular.
>
Would something like below do (untested)?
--
Dmitry
Input: synaptics - export model bits
Encode synaptics model in psmouse->model so it will be
exported via sysfs as input_dev->id.version and become
visible for applications.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
---
drivers/input/mouse/synaptics.c | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: work/drivers/input/mouse/synaptics.c
===================================================================
--- work.orig/drivers/input/mouse/synaptics.c
+++ work/drivers/input/mouse/synaptics.c
@@ -655,6 +655,16 @@ int synaptics_init(struct psmouse *psmou
set_input_params(psmouse->dev, priv);
+ /*
+ * Encode touchpad model so that it can be used to set
+ * input device->id.verssion and be visible to userspace.
+ * Because version is __u16 we have to drop something.
+ * Hardware info bits seem to be good candidates as they
+ * are documented to be for Synapticss corp. internal use.
+ */
+ psmouse->model = ((priv->model_id & 0x00ff0000) >> 8) |
+ (priv->model_id & 0x000000ff);
+
psmouse->protocol_handler = synaptics_process_byte;
psmouse->set_rate = synaptics_set_rate;
psmouse->disconnect = synaptics_disconnect;
next prev parent reply other threads:[~2007-03-25 5:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-24 4:27 Circular synaptics pads Matthew Garrett
2007-03-24 4:33 ` Matthew Garrett
2007-03-25 5:27 ` Dmitry Torokhov [this message]
2007-03-25 14:29 ` Matthew Garrett
2007-03-25 14:46 ` Dmitry Torokhov
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=200703250127.35272.dtor@insightbb.com \
--to=dtor@insightbb.com \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=mjg59@srcf.ucam.org \
/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).