* Circular synaptics pads
@ 2007-03-24 4:27 Matthew Garrett
2007-03-24 4:33 ` Matthew Garrett
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Garrett @ 2007-03-24 4:27 UTC (permalink / raw)
To: linux-input
Hi,
After looking through some dumps, I've come to the conclusion that bit 6
of the extended capabilities field in Synaptics pads seems to be
associated with the pad being circular. Does this sound broadly
plausible, or is it more likely that that information would be in the
model ID field? In any case, what would be the best way to export this
information to userspace?
Thanks,
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Circular synaptics pads
2007-03-24 4:27 Circular synaptics pads Matthew Garrett
@ 2007-03-24 4:33 ` Matthew Garrett
2007-03-25 5:27 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Garrett @ 2007-03-24 4:33 UTC (permalink / raw)
To: linux-input
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.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Circular synaptics pads
2007-03-24 4:33 ` Matthew Garrett
@ 2007-03-25 5:27 ` Dmitry Torokhov
2007-03-25 14:29 ` Matthew Garrett
0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2007-03-25 5:27 UTC (permalink / raw)
To: Matthew Garrett; +Cc: linux-input
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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Circular synaptics pads
2007-03-25 5:27 ` Dmitry Torokhov
@ 2007-03-25 14:29 ` Matthew Garrett
2007-03-25 14:46 ` Dmitry Torokhov
0 siblings, 1 reply; 5+ messages in thread
From: Matthew Garrett @ 2007-03-25 14:29 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input
On Sun, Mar 25, 2007 at 01:27:34AM -0400, Dmitry Torokhov wrote:
> Would something like below do (untested)?
Looks good to me.
> + * input device->id.verssion and be visible to userspace.
id.version rather than id.verssion?
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Circular synaptics pads
2007-03-25 14:29 ` Matthew Garrett
@ 2007-03-25 14:46 ` Dmitry Torokhov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry Torokhov @ 2007-03-25 14:46 UTC (permalink / raw)
To: Matthew Garrett; +Cc: linux-input
On Sunday 25 March 2007 10:29, Matthew Garrett wrote:
> On Sun, Mar 25, 2007 at 01:27:34AM -0400, Dmitry Torokhov wrote:
>
> > Would something like below do (untested)?
>
> Looks good to me.
>
> > + * input device->id.verssion and be visible to userspace.
>
> id.version rather than id.verssion?
>
Yep, thanks for spotting. I am terrible with typos in comments.
--
Dmitry
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-25 14:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-24 4:27 Circular synaptics pads Matthew Garrett
2007-03-24 4:33 ` Matthew Garrett
2007-03-25 5:27 ` Dmitry Torokhov
2007-03-25 14:29 ` Matthew Garrett
2007-03-25 14:46 ` Dmitry Torokhov
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).