aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-07-26 01:49:14 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-07-26 17:03:19 -0400
commitc0cd17f6dc7342a81b61017e6b84e363f86081c6 (patch)
treeef23faa1be9c0d0835b784ecb52ffbd7b39da43d
parent38c11eaaab0cf8ef6004aa704f1bb2ff5e6bc1b0 (diff)
Input: alps - cache firmware version
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/mouse/alps.c3
-rw-r--r--drivers/input/mouse/alps.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 8f794913f4cd..31b963dbf9a9 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -1901,6 +1901,9 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv)
1901 alps_exit_command_mode(psmouse)) 1901 alps_exit_command_mode(psmouse))
1902 return -EIO; 1902 return -EIO;
1903 1903
1904 /* Save the Firmware version */
1905 memcpy(priv->fw_ver, ec, 3);
1906
1904 if (alps_match_table(psmouse, priv, e7, ec) == 0) { 1907 if (alps_match_table(psmouse, priv, e7, ec) == 0) {
1905 return 0; 1908 return 0;
1906 } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x50 && 1909 } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0x50 &&
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
index 17e3ae39bcb7..e3d0f09aeeb3 100644
--- a/drivers/input/mouse/alps.h
+++ b/drivers/input/mouse/alps.h
@@ -124,6 +124,7 @@ struct alps_fields {
124 * known format for this model. The first byte of the report, ANDed with 124 * known format for this model. The first byte of the report, ANDed with
125 * mask0, should match byte0. 125 * mask0, should match byte0.
126 * @mask0: The mask used to check the first byte of the report. 126 * @mask0: The mask used to check the first byte of the report.
127 * @fw_ver: cached copy of firmware version (EC report)
127 * @flags: Additional device capabilities (passthrough port, trackstick, etc.). 128 * @flags: Additional device capabilities (passthrough port, trackstick, etc.).
128 * @x_max: Largest possible X position value. 129 * @x_max: Largest possible X position value.
129 * @y_max: Largest possible Y position value. 130 * @y_max: Largest possible Y position value.
@@ -149,6 +150,7 @@ struct alps_data {
149 int addr_command; 150 int addr_command;
150 unsigned char proto_version; 151 unsigned char proto_version;
151 unsigned char byte0, mask0; 152 unsigned char byte0, mask0;
153 unsigned char fw_ver[3];
152 int flags; 154 int flags;
153 int x_max; 155 int x_max;
154 int y_max; 156 int y_max;