aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse
diff options
context:
space:
mode:
authorDuson Lin <dusonlin@emc.com.tw>2015-04-20 13:19:24 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-04-20 13:30:09 -0400
commit9f423801c9e849df56b37833df895685c9d8a940 (patch)
tree2fcb2973ca8422f12540f5a65fbd6fd3a161ed22 /drivers/input/mouse
parent090ad325068810a9edb09dfe8fec97a724c5743f (diff)
Input: elan_i2c - fix calculating number of x and y traces.
According to Elan's firmware engineers we should not be subtracting 1 form the raw number of x and y traces so that the pitch size is correct. For example, if the touchpad x resolution is 2800 and x trace number is 20, the pitch size of x should be 2800/20 = 140, not 2800/19 = 147.36. Signed-off-by: Duson Lin <dusonlin@emc.com.tw> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse')
-rw-r--r--drivers/input/mouse/elan_i2c_i2c.c4
-rw-r--r--drivers/input/mouse/elan_i2c_smbus.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/mouse/elan_i2c_i2c.c b/drivers/input/mouse/elan_i2c_i2c.c
index df221401c12a..a0acbbf83bfd 100644
--- a/drivers/input/mouse/elan_i2c_i2c.c
+++ b/drivers/input/mouse/elan_i2c_i2c.c
@@ -365,8 +365,8 @@ static int elan_i2c_get_num_traces(struct i2c_client *client,
365 return error; 365 return error;
366 } 366 }
367 367
368 *x_traces = val[0] - 1; 368 *x_traces = val[0];
369 *y_traces = val[1] - 1; 369 *y_traces = val[1];
370 370
371 return 0; 371 return 0;
372} 372}
diff --git a/drivers/input/mouse/elan_i2c_smbus.c b/drivers/input/mouse/elan_i2c_smbus.c
index 62391b281020..30ab80dbcdd6 100644
--- a/drivers/input/mouse/elan_i2c_smbus.c
+++ b/drivers/input/mouse/elan_i2c_smbus.c
@@ -268,8 +268,8 @@ static int elan_smbus_get_num_traces(struct i2c_client *client,
268 return error; 268 return error;
269 } 269 }
270 270
271 *x_traces = val[1] - 1; 271 *x_traces = val[1];
272 *y_traces = val[2] - 1; 272 *y_traces = val[2];
273 273
274 return 0; 274 return 0;
275} 275}