Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp834451imm; Wed, 18 Jul 2018 11:28:39 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc8MUj+dd9U4Prug6o1rbYYuZxWu0zlTRKoTtn37c0hXzTWlzwfyItpzawhEQkpt6+uhWxL X-Received: by 2002:a17:902:8d96:: with SMTP id v22-v6mr6902789plo.176.1531938518853; Wed, 18 Jul 2018 11:28:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531938518; cv=none; d=google.com; s=arc-20160816; b=itlSCJh4N+KJRk/svMJY1ZWYR/XRYPyE4JgXF8VsARiEGRMuit2MG5Bg65j2KN9JTH DtpTJBHiWoDeSZyRDooRLWJ8g0CN5xgWH25MoWmz72A2cabejF7Zlh9TJiZMP5a7Tc0V 9zOulAXsB+nTesqWDM3zs/vIAaZ83fWspNiRB5hqn2AbOzMPmPQ/cQSIe50Ssd+lTUXe PZK9FDqLkP6y6hpiBKlBPmSNTqC3WGBxU3I/Z2KOIDm2+/LtNinPFq1QVd4EsuAvmNPf FQeHqfB5K93fU5kAB2Osh3/h+jS5Bu2z63h93fGyVE9/3/MFAn8EM5OfV03B10uh2lMX NgkA== 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=cMgrdcCx9cBeelpMuyuB0R5AYVTJg0kmerRMQrg7U2w=; b=RQ7ujxOGcFoC7sHnzgLZbNpv3wdE+SeReiXbUGUBeGUagyGKs39/U2RYinBASouNBV ZfBktnIddF3mlYBmGi77YEkZe3TVASQiWNzDzLh455EKTsYrFBf42TrhTs86itT9ZYKb +MV+110rcDWUZ/C6WiiNW0+LE1Xr4kj5xB6Mj+rD8k8vx6ormSGw7tUby420ye92u2wg rn5s/89L/Dqy0IgT00vcNUNxriptDSaSlKt3+sYzLL6VmeXS3DbBiT8P9hpYmday+Jn/ 33r0xyaSg7SHaLkyn3+rntIe4Y9kVg0OQ0IInYHyWis+6FAwLbtbGAew1XRkbHbyljjr N8kw== 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 k184-v6si3837700pge.209.2018.07.18.11.28.24; Wed, 18 Jul 2018 11:28:38 -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 S1729742AbeGRTGr (ORCPT + 99 others); Wed, 18 Jul 2018 15:06:47 -0400 Received: from mail.bootlin.com ([62.4.15.54]:36602 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726992AbeGRTGq (ORCPT ); Wed, 18 Jul 2018 15:06:46 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 7072B20876; Wed, 18 Jul 2018 20:27:37 +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 (176-137-37-244.abo.bbox.fr [176.137.37.244]) by mail.bootlin.com (Postfix) with ESMTPSA id C6718206A6; Wed, 18 Jul 2018 20:27:36 +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, mylene.josserand@bootlin.com, thomas.petazzoni@bootlin.com Subject: [PATCH v3 2/3] Input: edt-ft5x06 - Set wake/reset values on resume/suspend Date: Wed, 18 Jul 2018 20:27:18 +0200 Message-Id: <20180718182719.29663-3-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180718182719.29663-1-mylene.josserand@bootlin.com> References: <20180718182719.29663-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 aa94494b06b5..b013d97006e6 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1143,6 +1143,12 @@ static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev) if (device_may_wakeup(dev)) enable_irq_wake(client->irq); + if (tsdata->wake_gpio) + gpiod_set_value(tsdata->wake_gpio, 0); + + if (tsdata->reset_gpio) + gpiod_set_value(tsdata->reset_gpio, 1); + regulator_disable(tsdata->vcc); return 0; @@ -1157,6 +1163,12 @@ static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev) if (device_may_wakeup(dev)) disable_irq_wake(client->irq); + if (tsdata->wake_gpio) + gpiod_set_value(tsdata->wake_gpio, 1); + + if (tsdata->reset_gpio) + gpiod_set_value(tsdata->reset_gpio, 0); + ret = regulator_enable(tsdata->vcc); if (ret < 0) { dev_err(dev, "failed to enable vcc: %d\n", ret); -- 2.11.0