Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=887cc127233f34e833d074380f433a04de207563
Commit:     887cc127233f34e833d074380f433a04de207563
Parent:     598972d4fb39c8a0826b396e45dc2a8c1dbe4f11
Author:     Dmitry Torokhov <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 12 01:30:41 2007 -0400
Committer:  Dmitry Torokhov <[EMAIL PROTECTED]>
CommitDate: Thu Apr 12 01:30:41 2007 -0400

    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 <[EMAIL PROTECTED]>
---
 drivers/input/mouse/synaptics.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index e42a0a4..c77788b 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -655,6 +655,16 @@ int synaptics_init(struct psmouse *psmouse)
 
        set_input_params(psmouse->dev, priv);
 
+       /*
+        * Encode touchpad model so that it can be used to set
+        * input device->id.version 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 Synaptics 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;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to