Skip to contentSkip to conversation

Input: elan_i2c - Correct the x and y trace number.

PATCH In review DusonLin 2 participants 4 messages Apr 15, 2015 – Apr 21, 2015

Subsystems (2)
lore
Share & tools
lore

DusonLin

author
#0 lore raw

PATCH 5/5 Input: elan_i2c - Correct the x and y trace number.

The trace number does not need to subtract 1 now.

---
 drivers/input/mouse/elan_i2c_i2c.c   |    4 ++--
 drivers/input/mouse/elan_i2c_smbus.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/input/mouse/elan_i2c_i2c.c
index 029941f..550f905 100644

drivers/input/mouse/elan_i2c_i2c.c +0 -0
@@ -356,8 +356,8 @@ static int elan_i2c_get_num_traces(struct i2c_client

*client,
return error;
}

- *x_traces = val[0] - 1;
- *y_traces = val[1] - 1;
+ *x_traces = val[0];
+ *y_traces = val[1];

return 0;
}

(quoted diff) +0 -0

b/drivers/input/mouse/elan_i2c_smbus.c
index 06a2bcd..0b04151 100644

drivers/input/mouse/elan_i2c_smbus.c +0 -0
@@ -268,8 +268,8 @@ static int elan_smbus_get_num_traces(struct i2c_client

*client,
return error;
}

- *x_traces = val[1] - 1;
- *y_traces = val[2] - 1;
+ *x_traces = val[1];
+ *y_traces = val[2];

return 0;
}

#1 lore raw
Quoted 1 line · DusonLin

The trace number does not need to subtract 1 now.

Could you provide a bit more of background for this change? Why don't we need to decrement the number returned by the firmware anymore? We have been running with the old numbers for many years...

Thanks!

Quoted 42 lines
---
 drivers/input/mouse/elan_i2c_i2c.c   |    4 ++--
 drivers/input/mouse/elan_i2c_smbus.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/input/mouse/elan_i2c_i2c.c +2 -2
index 029941f..550f905 100644
@@ -356,8 +356,8 @@ static int elan_i2c_get_num_traces(struct i2c_client
 *client,
 		return error;
 	}
 
-	*x_traces = val[0] - 1;
-	*y_traces = val[1] - 1;
+	*x_traces = val[0];
+	*y_traces = val[1];
 
 	return 0;

}

drivers/input/mouse/elan_i2c_smbus.c +2 -2
index 06a2bcd..0b04151 100644
@@ -268,8 +268,8 @@ static int elan_smbus_get_num_traces(struct i2c_client
 *client,
 		return error;
 	}
 
-	*x_traces = val[1] - 1;
-	*y_traces = val[2] - 1;
+	*x_traces = val[1];
+	*y_traces = val[2];
 
 	return 0;

}

Signature · 1 line
Dmitry
author
#2 lore raw

Hi Dmitry,

I double check with our firmware team and the SPEC, it looks like the subtract 1 just a misunderstanding. So, the correct should not subtract 1. 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.

----------------------------------------------
Thanks,
ELAN Duson
✉ Email: [email protected]
----------------------------------------------

Quoted 57 lines

Dmitry Torokhov <[email protected]> 於 2015年4月16日 上午1:47 寫道:

Quoted 1 line · DusonLin

The trace number does not need to subtract 1 now.

Could you provide a bit more of background for this change? Why don't we need to decrement the number returned by the firmware anymore? We have been running with the old numbers for many years...

Thanks!

Quoted 42 lines

---

drivers/input/mouse/elan_i2c_i2c.c   |    4 ++--
drivers/input/mouse/elan_i2c_smbus.c |    4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
drivers/input/mouse/elan_i2c_i2c.c +2 -2
index 029941f..550f905 100644
@@ -356,8 +356,8 @@ static int elan_i2c_get_num_traces(struct i2c_client
 *client,
 		return error;
 	}
 
-	*x_traces = val[0] - 1;
-	*y_traces = val[1] - 1;
+	*x_traces = val[0];
+	*y_traces = val[1];
 
 	return 0;

}

drivers/input/mouse/elan_i2c_smbus.c +2 -2
index 06a2bcd..0b04151 100644
@@ -268,8 +268,8 @@ static int elan_smbus_get_num_traces(struct i2c_client
 *client,
 		return error;
 	}
 
-	*x_traces = val[1] - 1;
-	*y_traces = val[2] - 1;
+	*x_traces = val[1];
+	*y_traces = val[2];
 
 	return 0;

}

Signature · 1 line
Dmitry
author
#3 lore raw

Hi Dmitry,

How about the description? Is it looks good for you? Please let me know if you have any concern.

----------------------------------------------
Thank you,
ELAN Duson
✉ Email: [email protected]
----------------------------------------------

Quoted 8 lines

duson <[email protected]> 於 2015年4月16日 上午9:37 寫道:

Hi Dmitry,

I double check with our firmware team and the SPEC, it looks like the subtract 1 just a misunderstanding. So, the correct should not subtract 1. 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.

Quoted 68 lines

----------------------------------------------
Thanks,
ELAN Duson
✉ Email: [email protected]
----------------------------------------------

Quoted 57 lines

Dmitry Torokhov <[email protected]> 於 2015年4月16日 上午1:47 寫道:

Quoted 1 line · DusonLin

The trace number does not need to subtract 1 now.

Could you provide a bit more of background for this change? Why don't we need to decrement the number returned by the firmware anymore? We have been running with the old numbers for many years...

Thanks!

Quoted 42 lines

---

drivers/input/mouse/elan_i2c_i2c.c   |    4 ++--
drivers/input/mouse/elan_i2c_smbus.c |    4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
drivers/input/mouse/elan_i2c_i2c.c +2 -2
index 029941f..550f905 100644
@@ -356,8 +356,8 @@ static int elan_i2c_get_num_traces(struct i2c_client
 *client,
 		return error;
 	}
 
-	*x_traces = val[0] - 1;
-	*y_traces = val[1] - 1;
+	*x_traces = val[0];
+	*y_traces = val[1];
 
 	return 0;

}

drivers/input/mouse/elan_i2c_smbus.c +2 -2
index 06a2bcd..0b04151 100644
@@ -268,8 +268,8 @@ static int elan_smbus_get_num_traces(struct i2c_client
 *client,
 		return error;
 	}
 
-	*x_traces = val[1] - 1;
-	*y_traces = val[2] - 1;
+	*x_traces = val[1];
+	*y_traces = val[2];
 
 	return 0;

}

Signature · 1 line
Dmitry

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html