All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/5] Input: elan_i2c - Correct the x and y trace number.
@ 2015-04-15  1:55 ` DusonLin
  0 siblings, 0 replies; 6+ messages in thread
From: DusonLin @ 2015-04-15  1:55 UTC (permalink / raw)
  To: linux-kernel, linux-input, 'Dmitry Torokhov'
  Cc: '黃世鵬'

The trace number does not need to subtract 1 now.

Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
---
 drivers/input/mouse/elan_i2c_i2c.c   |    4 ++--
 drivers/input/mouse/elan_i2c_smbus.c |    4 ++--
 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 029941f..550f905 100644
--- a/drivers/input/mouse/elan_i2c_i2c.c
+++ b/drivers/input/mouse/elan_i2c_i2c.c
@@ -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;
 }
diff --git a/drivers/input/mouse/elan_i2c_smbus.c
b/drivers/input/mouse/elan_i2c_smbus.c
index 06a2bcd..0b04151 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,
 		return error;
 	}
 
-	*x_traces = val[1] - 1;
-	*y_traces = val[2] - 1;
+	*x_traces = val[1];
+	*y_traces = val[2];
 
 	return 0;
 }


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 5/5] Input: elan_i2c - Correct the x and y trace number.
@ 2015-04-15  1:55 ` DusonLin
  0 siblings, 0 replies; 6+ messages in thread
From: DusonLin @ 2015-04-15  1:55 UTC (permalink / raw)
  To: linux-kernel, linux-input, 'Dmitry Torokhov'
  Cc: '黃世鵬'

The trace number does not need to subtract 1 now.

Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
---
 drivers/input/mouse/elan_i2c_i2c.c   |    4 ++--
 drivers/input/mouse/elan_i2c_smbus.c |    4 ++--
 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 029941f..550f905 100644
--- a/drivers/input/mouse/elan_i2c_i2c.c
+++ b/drivers/input/mouse/elan_i2c_i2c.c
@@ -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;
 }
diff --git a/drivers/input/mouse/elan_i2c_smbus.c
b/drivers/input/mouse/elan_i2c_smbus.c
index 06a2bcd..0b04151 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,
 		return error;
 	}
 
-	*x_traces = val[1] - 1;
-	*y_traces = val[2] - 1;
+	*x_traces = val[1];
+	*y_traces = val[2];
 
 	return 0;
 }

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/5] Input: elan_i2c - Correct the x and y trace number.
  2015-04-15  1:55 ` DusonLin
  (?)
@ 2015-04-15 17:47 ` 'Dmitry Torokhov'
  2015-04-16  1:37   ` duson
  -1 siblings, 1 reply; 6+ messages in thread
From: 'Dmitry Torokhov' @ 2015-04-15 17:47 UTC (permalink / raw)
  To: DusonLin; +Cc: linux-kernel, linux-input, '黃世鵬'

On Wed, Apr 15, 2015 at 09:55:43AM +0800, DusonLin wrote:
> 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!

> 
> Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
> ---
>  drivers/input/mouse/elan_i2c_i2c.c   |    4 ++--
>  drivers/input/mouse/elan_i2c_smbus.c |    4 ++--
>  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 029941f..550f905 100644
> --- a/drivers/input/mouse/elan_i2c_i2c.c
> +++ b/drivers/input/mouse/elan_i2c_i2c.c
> @@ -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;
>  }
> diff --git a/drivers/input/mouse/elan_i2c_smbus.c
> b/drivers/input/mouse/elan_i2c_smbus.c
> index 06a2bcd..0b04151 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,
>  		return error;
>  	}
>  
> -	*x_traces = val[1] - 1;
> -	*y_traces = val[2] - 1;
> +	*x_traces = val[1];
> +	*y_traces = val[2];
>  
>  	return 0;
>  }
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/5] Input: elan_i2c - Correct the x and y trace number.
  2015-04-15 17:47 ` 'Dmitry Torokhov'
@ 2015-04-16  1:37   ` duson
  2015-04-21  0:47       ` duson
  0 siblings, 1 reply; 6+ messages in thread
From: duson @ 2015-04-16  1:37 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, 黃世鵬

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: dusonlin@emc.com.tw
----------------------------------------------





> Dmitry Torokhov <dmitry.torokhov@gmail.com> 於 2015年4月16日 上午1:47 寫道:
> 
> On Wed, Apr 15, 2015 at 09:55:43AM +0800, DusonLin wrote:
>> 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!
> 
>> 
>> Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
>> ---
>> drivers/input/mouse/elan_i2c_i2c.c   |    4 ++--
>> drivers/input/mouse/elan_i2c_smbus.c |    4 ++--
>> 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 029941f..550f905 100644
>> --- a/drivers/input/mouse/elan_i2c_i2c.c
>> +++ b/drivers/input/mouse/elan_i2c_i2c.c
>> @@ -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;
>> }
>> diff --git a/drivers/input/mouse/elan_i2c_smbus.c
>> b/drivers/input/mouse/elan_i2c_smbus.c
>> index 06a2bcd..0b04151 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,
>> 		return error;
>> 	}
>> 
>> -	*x_traces = val[1] - 1;
>> -	*y_traces = val[2] - 1;
>> +	*x_traces = val[1];
>> +	*y_traces = val[2];
>> 
>> 	return 0;
>> }
>> 
> 
> -- 
> Dmitry
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/5] Input: elan_i2c - Correct the x and y trace number.
  2015-04-16  1:37   ` duson
@ 2015-04-21  0:47       ` duson
  0 siblings, 0 replies; 6+ messages in thread
From: duson @ 2015-04-21  0:47 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, 黃世鵬

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: dusonlin@emc.com.tw
----------------------------------------------





> duson <dusonlin@emc.com.tw> 於 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. 
> 
> ----------------------------------------------
> Thanks,
> ELAN Duson
> ✉ Email: dusonlin@emc.com.tw
> ----------------------------------------------
> 
> 
> 
> 
> 
>> Dmitry Torokhov <dmitry.torokhov@gmail.com> 於 2015年4月16日 上午1:47 寫道:
>> 
>> On Wed, Apr 15, 2015 at 09:55:43AM +0800, DusonLin wrote:
>>> 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!
>> 
>>> 
>>> Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
>>> ---
>>> drivers/input/mouse/elan_i2c_i2c.c   |    4 ++--
>>> drivers/input/mouse/elan_i2c_smbus.c |    4 ++--
>>> 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 029941f..550f905 100644
>>> --- a/drivers/input/mouse/elan_i2c_i2c.c
>>> +++ b/drivers/input/mouse/elan_i2c_i2c.c
>>> @@ -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;
>>> }
>>> diff --git a/drivers/input/mouse/elan_i2c_smbus.c
>>> b/drivers/input/mouse/elan_i2c_smbus.c
>>> index 06a2bcd..0b04151 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,
>>> 		return error;
>>> 	}
>>> 
>>> -	*x_traces = val[1] - 1;
>>> -	*y_traces = val[2] - 1;
>>> +	*x_traces = val[1];
>>> +	*y_traces = val[2];
>>> 
>>> 	return 0;
>>> }
>>> 
>> 
>> -- 
>> Dmitry
>> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 5/5] Input: elan_i2c - Correct the x and y trace number.
@ 2015-04-21  0:47       ` duson
  0 siblings, 0 replies; 6+ messages in thread
From: duson @ 2015-04-21  0:47 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-kernel, linux-input, 黃世鵬

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: dusonlin@emc.com.tw
----------------------------------------------





> duson <dusonlin@emc.com.tw> 於 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. 
> 
> ----------------------------------------------
> Thanks,
> ELAN Duson
> ✉ Email: dusonlin@emc.com.tw
> ----------------------------------------------
> 
> 
> 
> 
> 
>> Dmitry Torokhov <dmitry.torokhov@gmail.com> 於 2015年4月16日 上午1:47 寫道:
>> 
>> On Wed, Apr 15, 2015 at 09:55:43AM +0800, DusonLin wrote:
>>> 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!
>> 
>>> 
>>> Signed-off-by: Duson Lin <dusonlin@emc.com.tw>
>>> ---
>>> drivers/input/mouse/elan_i2c_i2c.c   |    4 ++--
>>> drivers/input/mouse/elan_i2c_smbus.c |    4 ++--
>>> 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 029941f..550f905 100644
>>> --- a/drivers/input/mouse/elan_i2c_i2c.c
>>> +++ b/drivers/input/mouse/elan_i2c_i2c.c
>>> @@ -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;
>>> }
>>> diff --git a/drivers/input/mouse/elan_i2c_smbus.c
>>> b/drivers/input/mouse/elan_i2c_smbus.c
>>> index 06a2bcd..0b04151 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,
>>> 		return error;
>>> 	}
>>> 
>>> -	*x_traces = val[1] - 1;
>>> -	*y_traces = val[2] - 1;
>>> +	*x_traces = val[1];
>>> +	*y_traces = val[2];
>>> 
>>> 	return 0;
>>> }
>>> 
>> 
>> -- 
>> Dmitry
>> 
> 

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-21  0:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-15  1:55 [PATCH 5/5] Input: elan_i2c - Correct the x and y trace number DusonLin
2015-04-15  1:55 ` DusonLin
2015-04-15 17:47 ` 'Dmitry Torokhov'
2015-04-16  1:37   ` duson
2015-04-21  0:47     ` duson
2015-04-21  0:47       ` duson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.