From patchwork Thu May 17 09:05:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 10406043 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 64F2860155 for ; Thu, 17 May 2018 09:07:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 51E40289E9 for ; Thu, 17 May 2018 09:07:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 45AD2289EB; Thu, 17 May 2018 09:07:52 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C5B40289EA for ; Thu, 17 May 2018 09:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=JXjVwoNiid7vMRYJY/hDxqDFqTUlptlUiZuYtdxQ3Z8=; b=FftNaOi5Aq5licpUVmXHtRKW2I 9Waf6xOZAMz3ou0oDoV3Bn5DyOPyTYqL5KXDPEBmieFUzciDcoBeuFVSzTBkeJt7fphLp3CsoPAHt Eaqc7w3JpBPxk9MLoSxepohtCERHVdTH82yJy+ZSFZE++oDvvI5VXy8feYOPq6JZ3JEf1i0HCyaWW xVzb+qTwdho26fdJNKuClVmz9THFJmWvX2g5ZISE8WghUfhnDM6xoVSL9AuamXQfrI65+W7qzV8n5 xjsT2ullariDb9GCQMerVcQzWans7n/GVSN7S+63Tyj0xBOTzVxbhbY1nmuoiSgquSbFzMof1aeGi 1cmMKKEA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJEsq-0004wp-El; Thu, 17 May 2018 09:07:36 +0000 Received: from mail.bugwerft.de ([46.23.86.59]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJErT-0003lR-1b for linux-arm-kernel@lists.infradead.org; Thu, 17 May 2018 09:06:33 +0000 Received: from localhost.localdomain (mue-88-130-49-030.dsl.tropolys.de [88.130.49.30]) by mail.bugwerft.de (Postfix) with ESMTPSA id B76DA2828E0; Thu, 17 May 2018 09:03:31 +0000 (UTC) From: Daniel Mack To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, shawnguo@kernel.org, kernel@pengutronix.de, fabio.estevam@nxp.com Subject: [PATCH v2 1/3] input: touchscreen: edt-ft5x06: don't make device a wakeup source by default Date: Thu, 17 May 2018 11:05:50 +0200 Message-Id: <20180517090552.5704-2-daniel@zonque.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180517090552.5704-1-daniel@zonque.org> References: <20180517090552.5704-1-daniel@zonque.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180517_020611_400230_C3967731 X-CRM114-Status: UNSURE ( 9.85 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Daniel Mack , linux-arm-kernel@lists.infradead.org, linux-input@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Allow configuring the device as wakeup source through device properties, as not all platforms want to wake up on touch screen activity. The I2C core automatically reads the "wakeup-source" DT property to configure a device's wakeup capability, and board supports files can set I2C_CLIENT_WAKE in the flags. Signed-off-by: Daniel Mack --- Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt | 3 +++ drivers/input/touchscreen/edt-ft5x06.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt index 025cf8c9324a..83f792d4d88c 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt @@ -52,6 +52,8 @@ Optional properties: - touchscreen-inverted-y : See touchscreen.txt - touchscreen-swapped-x-y : See touchscreen.txt + - wakeup-source: touchscreen acts as wakeup source + Example: polytouch: edt-ft5x06@38 { compatible = "edt,edt-ft5406", "edt,edt-ft5x06"; @@ -62,4 +64,5 @@ Example: interrupts = <5 IRQ_TYPE_EDGE_FALLING>; reset-gpios = <&gpio2 6 GPIO_ACTIVE_LOW>; wake-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>; + wakeup-source; }; diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 5bf63f76ddda..e18a2f215500 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1007,7 +1007,6 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, goto err_remove_attrs; edt_ft5x06_ts_prepare_debugfs(tsdata, dev_driver_string(&client->dev)); - device_init_wakeup(&client->dev, 1); dev_dbg(&client->dev, "EDT FT5x06 initialized: IRQ %d, WAKE pin %d, Reset pin %d.\n",