Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp499188imm; Wed, 25 Jul 2018 00:38:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdM0CbmLpoX5J6SAqEYFQszesOv4BWeNHr5RGRviJipBkP6xWj4MzWBV+IHfkkoEh4eQhE/ X-Received: by 2002:a17:902:7688:: with SMTP id m8-v6mr19860749pll.338.1532504314887; Wed, 25 Jul 2018 00:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532504314; cv=none; d=google.com; s=arc-20160816; b=cPl/Xb815+7tp3oY/t3WNIRtuIwZOwIuC1hGYsVYlWW4/WuzSsDo1fg8aD8Vx+gXA4 p6+d0VmwDm7T/tXTqNELZxhiCaCybkokdtZ4T71u05RcYpAXEW94aZ+ItvyJOObqyPFI 1Nm7qCL54XGBzlOFpxEtuzw0xcsOXCf/+zpnpzu3mA+eP/tsWVktpDTizxWYwb0NHifp 4+BN8bYZPxu3cXuY8QAMENmmyP6PXFCiJgJVmOhB0ah9qavkf4zG3EGObGrJn+3Q+wAZ YDXpkwY3W71vDLTb8JafXa0dYXQ6LXpjtOI1eYGVJIj7ko0s9+tbYrcCdLWCL+QL3uUI 8VCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=2XIsphcFlzZEyp0P88fUImBCxlaoiAddNlNPBvI0kL8=; b=rYJdXWCaMiRLUHGNFMsWxZZ6iceV4zDwkN75SCzAQyI+i5POJbEu7G1gKlUfn5YqEE azwEF38TYIogUBRO/Um+bRporjMEhjZHAPoIMLpZCje3GFqAk88ZiLkRTlTiEKv5aNEa ax22lt9VbWNejY6HBGhnUwudSSfEZJa9Z4CtgC2s2/22Y1ad9izt8KpmZT3dlbSFhKdh 0iPg/YiofnstuXbbOHaT64xSYTrLOf7Y/P6QitVPz1SnNwLmeutvCdbV1Z9gtPPtQGY3 PCGaD6wClF5VeGOrbI5v0ZcNxogQQEdX9EpsxNxOihMMBPgetUFbsoarZYLbQei8pj/f Namg== 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 y5-v6si12823693pgc.493.2018.07.25.00.38.20; Wed, 25 Jul 2018 00:38:34 -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 S1728586AbeGYIqx (ORCPT + 99 others); Wed, 25 Jul 2018 04:46:53 -0400 Received: from mail.bootlin.com ([62.4.15.54]:54114 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728407AbeGYIqw (ORCPT ); Wed, 25 Jul 2018 04:46:52 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 3B86B207B0; Wed, 25 Jul 2018 09:36:26 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from dell-desktop.home (AAubervilliers-681-1-78-122.w90-88.abo.wanadoo.fr [90.88.20.122]) by mail.bootlin.com (Postfix) with ESMTPSA id E5A1620618; Wed, 25 Jul 2018 09:36:25 +0200 (CEST) From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?= To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@bootlin.com, wens@csie.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, thomas.petazzoni@bootlin.com, mylene.josserand@bootlin.com Subject: [PATCH v4 2/3] Input: edt-ft5x06 - Set wake/reset values on resume/suspend Date: Wed, 25 Jul 2018 09:34:09 +0200 Message-Id: <20180725073410.730-3-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180725073410.730-1-mylene.josserand@bootlin.com> References: <20180725073410.730-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On resume and suspend, set the value of wake and reset gpios to be sure that we are in a know state after suspending/resuming. Signed-off-by: Mylène Josserand --- drivers/input/touchscreen/edt-ft5x06.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index dcde719094f7..dad2f1f8bf89 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1158,6 +1158,12 @@ static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev) else regulator_disable(tsdata->vcc); + if (tsdata->wake_gpio) + gpiod_set_value(tsdata->wake_gpio, 0); + + if (tsdata->reset_gpio) + gpiod_set_value(tsdata->reset_gpio, 1); + return 0; } @@ -1177,6 +1183,12 @@ static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev) } } + if (tsdata->wake_gpio) + gpiod_set_value(tsdata->wake_gpio, 1); + + if (tsdata->reset_gpio) + gpiod_set_value(tsdata->reset_gpio, 0); + return 0; } -- 2.11.0