Received: by 10.213.65.68 with SMTP id h4csp239457imn; Mon, 12 Mar 2018 12:14:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELu2BlAJ6AM0CEwlM/oKueVG1ZyCai0KQJBDXvIJwjT6d/4tDO7ECVj19shf7sKDU0QUGe0K X-Received: by 2002:a17:902:690b:: with SMTP id j11-v6mr9317350plk.124.1520882053234; Mon, 12 Mar 2018 12:14:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520882053; cv=none; d=google.com; s=arc-20160816; b=q+eoaezChDXQohoPcHN01WkBeP5Pdcs/T4iAjGLiS0qq5h+DLmO2mvLXJiUdkwkQ3y lH/hmean63ysVpRQKa72bNg2UjVjRXzl1IFJTK5cOpsb/LEPo0lda9lf3xoc3ZW7urdl acYrxIeqoFWr5Rogpu1kAUNPsg11iesxGIqr7v31+lE1bVZ4lrwwPme4uTV0kE+vQfoo YwPfyJxO/hjtpIZnmMLiszRC/wJTzGM48900BSfKqZsMfIWEidaLuHsvfrbR4Yu+80T7 UiT40MOqFv0yWsbXcw+1saZ3Nz2/ahb9CjayQYxeVMVp1Ef5HxyhGBwah+62mqJgiSj3 z7Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=P2/4JHY62N0FLA6KElNa47drY+JsXL5GGofoonkLabA=; b=kfiUzk+bdvhPlxp2xCSEYQAUf/C1Rxo+8P+uTg0J1cA531pPXx79pOdBCTCuqDstQl Jd8WbYDTw8wMwMlGTbP5GoaGmxjCn1vOsuXysivRcbIsH3UcudzIBrwh0sFoSZ8g0X7g xd1wx6izMYSYWnYQG/cWeMecB29ZH6P2Z+EQVK1CB2rP6waDlmZn5mQO5RaobpMawLkr z1DS+fr93AQmUpDCFon5HH2iRAIPHJystAW8nVxw6oC6RTtCfV0nGrGcE/8cHfq6oSVW etytuRJ05ZOE9VW7ZyYQr0LbgVjfwvqPtdrOa9U5sxplTLLWgo6FlsIRmgHS4+LXztHp SwOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZQMoTVT0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x13si5352155pgt.412.2018.03.12.12.13.58; Mon, 12 Mar 2018 12:14:13 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZQMoTVT0; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932449AbeCLTJP (ORCPT + 99 others); Mon, 12 Mar 2018 15:09:15 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:41867 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751327AbeCLTJN (ORCPT ); Mon, 12 Mar 2018 15:09:13 -0400 Received: by mail-pl0-f68.google.com with SMTP id d9-v6so9874152plo.8; Mon, 12 Mar 2018 12:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=P2/4JHY62N0FLA6KElNa47drY+JsXL5GGofoonkLabA=; b=ZQMoTVT0AqmgUDcsFPncobl1zWV+gg41Uy/88qCFI+Gpyf903CyRhhoU2b+Ordfi3n +S/H05diu4UF1saojL8bnG4uUbDbykQEziEgdKKO9AD3YCIeRAtH9EhjYIiX+U8bPgJq hr5GDbWu1vH/ZwUao3KfFTDXShnyAktZZMcdS4ekttHAUwk+RObtBi3+Q3nGryuBf+fw b8GtldP2K9QBURLI+a7LdKVFinUvN19yDC8fqKqjXZqk8aFRqzL1NnNqWIwy8JIQQyNm JxlSuyQvyGIDNp0mSm79G2Nl/GYgoZZoqWoHo7VycBYIbZ35C3+7anLNtvum31k82fgH TqNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=P2/4JHY62N0FLA6KElNa47drY+JsXL5GGofoonkLabA=; b=mXzw0iLltFwnuy3jjafE8KzSKbKwQymmwIgnOtlA3CtkLzpoSx4FdbMI1yEU6MB9SS 91J3N7eRAIVZhV0UACdP58wrpsXab2garWz8Vian0IE1di6LF9fs7lJYYjNDoq09Q6lI KYFv8iG4gNtCyjVH954akRzLv5VPhLVwzA1H0qhIeJ016pGzb5bYh+JffEYD7Fq4y/v8 K1oZNv6q1LR4wiaLYpQBrTAtDxVMLD+l68ktKIjwoUja5G8OqgkFQMs5q+wehhsVaRGr /VBYhU469M4OkDMrujOWG9lirWfi9oKpnw9IOcRJwCMgC4StF5+Ybc8GlyZvZnkB+XMM OPYQ== X-Gm-Message-State: AElRT7HuDkQkvoBCggYg9takR9/DojMbjG0exuJqNTCYQasQBWGO3Hpd MgxMtsUQyVA3xO8CELQ8ZfGm9mhA X-Received: by 2002:a17:902:529:: with SMTP id 38-v6mr3740869plf.64.1520881752087; Mon, 12 Mar 2018 12:09:12 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id s67sm18038477pfg.104.2018.03.12.12.09.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Mar 2018 12:09:11 -0700 (PDT) From: Dmitry Torokhov To: linux-input@vger.kernel.org, Benson Leung Cc: Nick Dyer , Olof Johansson , linux-kernel@vger.kernel.org Subject: [PATCH 01/14] Input: atmel_mxt_ts - do not pass suspend mode in platform data Date: Mon, 12 Mar 2018 12:08:54 -0700 Message-Id: <20180312190907.174301-2-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.16.2.660.g709887971b-goog In-Reply-To: <20180312190907.174301-1-dmitry.torokhov@gmail.com> References: <20180312190907.174301-1-dmitry.torokhov@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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