]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Input: alps - cache firmware version
authorHans de Goede <hdegoede@redhat.com>
Sat, 26 Jul 2014 05:49:14 +0000 (22:49 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 26 Jul 2014 21:03:19 +0000 (14:03 -0700)
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/alps.c
drivers/input/mouse/alps.h

index 8f794913f4cd87623c6e1d6b34089513e07b1a71..31b963dbf9a9ec5de668ee110d1c700b62da3818 100644 (file)
@@ -1901,6 +1901,9 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
            alps_exit_command_mode(psmouse))
                return -EIO;
 
+       /* Save the Firmware version */
+       memcpy(priv->fw_ver, ec, 3);
+
        if (alps_match_table(psmouse, priv, e7, ec) == 0) {
                return 0;
        } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x50 &&
index 17e3ae39bcb7e6d204e110be21046feb916792b9..e3d0f09aeeb31d18e61d7c309b0a8e7d95327ea5 100644 (file)
@@ -124,6 +124,7 @@ struct alps_fields {
  *   known format for this model.  The first byte of the report, ANDed with
  *   mask0, should match byte0.
  * @mask0: The mask used to check the first byte of the report.
+ * @fw_ver: cached copy of firmware version (EC report)
  * @flags: Additional device capabilities (passthrough port, trackstick, etc.).
  * @x_max: Largest possible X position value.
  * @y_max: Largest possible Y position value.
@@ -149,6 +150,7 @@ struct alps_data {
        int addr_command;
        unsigned char proto_version;
        unsigned char byte0, mask0;
+       unsigned char fw_ver[3];
        int flags;
        int x_max;
        int y_max;