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: 915228 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=zonque.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40mllg19F5z9s1d for ; Thu, 17 May 2018 19:06:07 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752204AbeEQJGE (ORCPT ); Thu, 17 May 2018 05:06:04 -0400 Received: from mail.bugwerft.de ([46.23.86.59]:41354 "EHLO mail.bugwerft.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751958AbeEQJGB (ORCPT ); Thu, 17 May 2018 05:06:01 -0400 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 Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Daniel Mack 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> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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",