Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752251AbbDPBiG (ORCPT ); Wed, 15 Apr 2015 21:38:06 -0400 Received: from elanic.emc.com.tw ([192.72.220.188]:52819 "EHLO elanic.emc.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751042AbbDPBh4 convert rfc822-to-8bit (ORCPT ); Wed, 15 Apr 2015 21:37:56 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: [PATCH 5/5] Input: elan_i2c - Correct the x and y trace number. From: duson In-Reply-To: <20150415174752.GC27779@dtor-ws> Date: Thu, 16 Apr 2015 09:37:51 +0800 Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, =?utf-8?B?6buD5LiW6bWs?= Content-Transfer-Encoding: 8BIT Message-Id: <8C83F24C-D32F-459B-8D43-00974542AB3E@emc.com.tw> References: <000401d0771f$4b7f9b90$e27ed2b0$@emc.com.tw> <20150415174752.GC27779@dtor-ws> To: Dmitry Torokhov X-Mailer: Apple Mail (2.2098) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2298 Lines: 79 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 於 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 >> --- >> 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/