Received: by 10.213.65.68 with SMTP id h4csp1242631imn; Wed, 14 Mar 2018 14:04:08 -0700 (PDT) X-Google-Smtp-Source: AG47ELu87+pv+N7pZtLqNatQHvle1BFTP3sVBTfmOg7mVHAYvAIJs2CgzYWS7mukNvOOnQ791P2E X-Received: by 10.101.97.139 with SMTP id c11mr4799994pgv.433.1521061448889; Wed, 14 Mar 2018 14:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521061448; cv=none; d=google.com; s=arc-20160816; b=z1QlHZm/AMCYT8aWzph6cTILpGdu9ZmTvPN1R2Fex5GHWQI5Vn4ziZ1NF7uJsmyh5K dV5xbX6ODM18C5jOYXX+o4EFFvC2X3FglzUQI/1pFwx2TChauJDpI5o/XNwPbBHPb3jw Dp7Przv32Wo4z4IXYXK3UkUi/6FRGs9j5EqfIw0EpzAt8g4t1kjnrTjlsZyeabmiNYQ6 OaZtxLG9SqcaRnMif/NyZoHik2mPue5LuSOW+d7rdpK7mTw5Xae8BkyOXQzLihrO0TH+ qNmpLcIxu3TkbPaGNp8t5OFMg5R8yURVdmDvnnhKIpf3OYbWuKnuQu1zxOlSTtTvzk3l udMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=s7lMY+2NqIPD4lODxg4wIMXx9llMBUEkxLBv1dpRv84=; b=jTbIRwDqkjLvwyhOqQOSV11tzQ4CUWD7RS7Kb2HKOCPLtDWwD0xI48poUbB+UzgMhb 1Th4EIy9lAUpOtd7MCk8WXX1IEeedbQl5Oj2w30SO6oSh/I4u0+h6vb1F1ATxFEJOx/0 fcJzhBL2aENj9M/4kU1YL0E41ThxW+k/IzlZWG8/dtc3Qoa9KasiI8HcHiXodGX4kubC v5jsGIrkQVog+Rd9LdKIK55P2yxQIrpKwOn9H31mvwE5E5k82yRfXAN3by2nWCOtwOuZ E0HXdlsQB2r9bnCZdrMiqi9QZK82p9svLiM0lnz90DeB1UTbsqLoGDbcagVM8Yegncqy 6UvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si2519244plb.725.2018.03.14.14.03.54; Wed, 14 Mar 2018 14:04:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751649AbeCNU67 (ORCPT + 99 others); Wed, 14 Mar 2018 16:58:59 -0400 Received: from avasout05.plus.net ([84.93.230.250]:35272 "EHLO avasout05.plus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779AbeCNU65 (ORCPT ); Wed, 14 Mar 2018 16:58:57 -0400 X-Greylist: delayed 450 seconds by postgrey-1.27 at vger.kernel.org; Wed, 14 Mar 2018 16:58:57 EDT Received: from lava ([80.229.148.18]) by smtp with ESMTP id wDMqerVQ71fhEwDMrepwDv; Wed, 14 Mar 2018 20:51:26 +0000 X-CM-Score: 0.00 X-CNFS-Analysis: v=2.3 cv=J9KEEjvS c=1 sm=1 tr=0 a=o7Djd4SkmPXITDn8qH+ssQ==:117 a=o7Djd4SkmPXITDn8qH+ssQ==:17 a=kj9zAlcOel0A:10 a=v2DPQv5-lfwA:10 a=pGLkceISAAAA:8 a=RMjmPgqFiLURycAYgZkA:9 a=CjuIK1q_8ugA:10 Received: from nick by lava with local (Exim 4.86_2) (envelope-from ) id 1ewDMq-0006ww-2f; Wed, 14 Mar 2018 20:51:24 +0000 Date: Wed, 14 Mar 2018 20:51:24 +0000 From: Nick Dyer To: Dmitry Torokhov Cc: linux-input@vger.kernel.org, Benson Leung , Olof Johansson , linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/14] Input: atmel_mxt_ts - do not pass suspend mode in platform data Message-ID: <20180314205123.GA26353@lava.h.shmanahar.org> References: <20180312190907.174301-1-dmitry.torokhov@gmail.com> <20180312190907.174301-2-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180312190907.174301-2-dmitry.torokhov@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-CMAE-Envelope: MS4wfBg5HndNXzZIqiwp/cT9/vwMkDO5FlhTgQcix9op7nQGGmgj6bJ4+8UouebsH0u3X7lL5hUhNv0hZNcu8rYKq+Af4tdWCcdt8uEGWHdwvj0ZY9dBJ7DK RJX5IJ2Gf3AKCbevbJtb35ZT4r8IGptvcf3rA/1/TpwtxRvahUniTR4o Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry- Thanks for sending these patches! On Mon, Mar 12, 2018 at 12:08:54PM -0700, Dmitry Torokhov wrote: > The way we are supposed to put controller to sleep and wake it up does not > depend on the platform, but rather on controller itself. Controllers using > T9 require manipulating T9 control register, while others, using newer > T100, should be put to sleep by adjusting T7 power config. I'm afraid this is actually a misconception. If you look at object table for the older T9 device, you'll find it has the T7 object and it in fact works exactly the same way as the T100-based device. The MXT_SUSPEND_T9_CTRL is in there because on your older Pixel devices the config saved into NVRAM on the touch controller has a zero byte in the T9 CTRL setting, meaning the touch controller will never wake up unless the driver knows to write 0x83 into it. > We'll keep pdata->suspend_mode for now and remove it when we rework > chromeos-laptop driver. > > Signed-off-by: Dmitry Torokhov > --- > drivers/input/touchscreen/atmel_mxt_ts.c | 15 ++++++--------- > 1 file changed, 6 insertions(+), 9 deletions(-) > > diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c > index 7659bc48f1db8..1aabfae1297ba 100644 > --- a/drivers/input/touchscreen/atmel_mxt_ts.c > +++ b/drivers/input/touchscreen/atmel_mxt_ts.c > @@ -2868,8 +2868,8 @@ static const struct attribute_group mxt_attr_group = { > > static void mxt_start(struct mxt_data *data) > { > - switch (data->pdata->suspend_mode) { > - case MXT_SUSPEND_T9_CTRL: > + switch (data->multitouch) { > + case MXT_TOUCH_MULTI_T9: > mxt_soft_reset(data); > > /* Touch enable */ > @@ -2878,7 +2878,7 @@ static void mxt_start(struct mxt_data *data) > MXT_TOUCH_MULTI_T9, MXT_T9_CTRL, 0x83); > break; > > - case MXT_SUSPEND_DEEP_SLEEP: > + case MXT_TOUCH_MULTITOUCHSCREEN_T100: > default: > mxt_set_t7_power_cfg(data, MXT_POWER_CFG_RUN); > > @@ -2886,19 +2886,18 @@ static void mxt_start(struct mxt_data *data) > mxt_t6_command(data, MXT_COMMAND_CALIBRATE, 1, false); > break; > } > - > } > > static void mxt_stop(struct mxt_data *data) > { > - switch (data->pdata->suspend_mode) { > - case MXT_SUSPEND_T9_CTRL: > + switch (data->multitouch) { > + case MXT_TOUCH_MULTI_T9: > /* Touch disable */ > mxt_write_object(data, > MXT_TOUCH_MULTI_T9, MXT_T9_CTRL, 0); > break; > > - case MXT_SUSPEND_DEEP_SLEEP: > + case MXT_TOUCH_MULTITOUCHSCREEN_T100: > default: > mxt_set_t7_power_cfg(data, MXT_POWER_CFG_DEEPSLEEP); > break; > @@ -2954,8 +2953,6 @@ static const struct mxt_platform_data *mxt_parse_dt(struct i2c_client *client) > pdata->t19_keymap = keymap; > } > > - pdata->suspend_mode = MXT_SUSPEND_DEEP_SLEEP; > - > return pdata; > } > #else > -- > 2.16.2.660.g709887971b-goog >