From patchwork Wed Jul 25 07:34:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 10543641 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 041BD14BC for ; Wed, 25 Jul 2018 07:36:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3C932965A for ; Wed, 25 Jul 2018 07:36:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D797929328; Wed, 25 Jul 2018 07:36:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88E6829328 for ; Wed, 25 Jul 2018 07:36:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728567AbeGYIqx (ORCPT ); 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) 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_Josserand?= 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 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }