From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751827AbcFUMph (ORCPT ); Tue, 21 Jun 2016 08:45:37 -0400 Received: from emcscan.emc.com.tw ([192.72.220.5]:2832 "EHLO emcscan.emc.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbcFUMpe (ORCPT ); Tue, 21 Jun 2016 08:45:34 -0400 From: =?big5?B?ufmxUrph?= To: "'Dmitry Torokhov'" , "'Chris Chiu'" Cc: "'Charlie Mooney'" , "'Michele Curti'" , "'Krzysztof Kozlowski'" , "'Benson Leung'" , , , , =?big5?B?tsClQMRQILhnsno=?= References: <1465306449-28256-1-git-send-email-chiu@endlessm.com> <20160620174251.GC22426@dtor-ws> In-Reply-To: <20160620174251.GC22426@dtor-ws> Subject: RE: [PATCH] Input: elan_i2c - +200 ms delay before setting to ABS mode Date: Tue, 21 Jun 2016 20:40:20 +0800 Message-ID: <008601d1cbba$124c2230$36e46690$@emc.com.tw> MIME-Version: 1.0 Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQKywGA+SkkHjCznp4v5fhf90qzUwwJqLmBNnh6gBTA= Content-Language: zh-tw Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, -----Original Message----- From: Dmitry Torokhov [mailto:dmitry.torokhov@gmail.com] Sent: Tuesday, June 21, 2016 1:43 AM To: Chris Chiu; kt.liao@emc.com.tw Cc: Charlie Mooney; Michele Curti; Krzysztof Kozlowski; Benson Leung; linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; linux@endlessm.com Subject: Re: [PATCH] Input: elan_i2c - +200 ms delay before setting to ABS mode On Tue, Jun 07, 2016 at 09:34:09PM +0800, Chris Chiu wrote: > When performing a warm reboot from a system which does not correctly > support ELAN I2C touchpads, the touchpad will sometimes enter standard > mouse mode, cursor then never respond to touchpad event, and making > the driver discard the HID reports and flood dmesg with following > error messages. > "elan_i2c i2c-ELAN1000:00: invalid report id data (1)" > > This change is from ELAN's correction. It needs 200ms delay before > set_mode() so that the mode setting will correctly take effect. KT, is this feasible? [KT] After internal discussion, we don't agree this patch. It's a work-around to fix firmware bug for specific touchpad and not tested by other device. > > Signed-off-by: Chris Chiu > --- > drivers/input/mouse/elan_i2c_core.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/input/mouse/elan_i2c_core.c > b/drivers/input/mouse/elan_i2c_core.c > index 2f58985..95080f9 100644 > --- a/drivers/input/mouse/elan_i2c_core.c > +++ b/drivers/input/mouse/elan_i2c_core.c > @@ -210,18 +210,20 @@ static int __elan_initialize(struct elan_tp_data *data) > return error; > } > > - data->mode |= ETP_ENABLE_ABS; > - error = data->ops->set_mode(client, data->mode); > + error = data->ops->sleep_control(client, false); > if (error) { > dev_err(&client->dev, > - "failed to switch to absolute mode: %d\n", error); > + "failed to wake device up: %d\n", error); > return error; > } > > - error = data->ops->sleep_control(client, false); > + msleep(200); > + > + data->mode |= ETP_ENABLE_ABS; > + error = data->ops->set_mode(client, data->mode); > if (error) { > dev_err(&client->dev, > - "failed to wake device up: %d\n", error); > + "failed to switch to absolute mode: %d\n", error); > return error; > } > > -- > 2.1.4 > Thanks. -- Dmitry