From patchwork Wed May 15 22:34:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martijn Braam X-Patchwork-Id: 10945399 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 361791390 for ; Wed, 15 May 2019 22:35:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FECA286A7 for ; Wed, 15 May 2019 22:35:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 142A428864; Wed, 15 May 2019 22:35:08 +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,DKIM_SIGNED, DKIM_VALID,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 F2843286A7 for ; Wed, 15 May 2019 22:35:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725977AbfEOWfF (ORCPT ); Wed, 15 May 2019 18:35:05 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:41119 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725937AbfEOWfF (ORCPT ); Wed, 15 May 2019 18:35:05 -0400 Received: by mail-ed1-f65.google.com with SMTP id m4so2029858edd.8 for ; Wed, 15 May 2019 15:35:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brixit-nl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4z1t32FdEzj8XZPm7eJqjTmXhy1MX24MxU4NWCyxaNA=; b=Sa5ItKI7IldE0KhpRmLZWjMqxMMdGZo8s6GhwP8ocVWt54Dx3hUSxHOjBHeALIzBFx js+HqPIooCbGX5RZ9ChOZ3pH7X7UnB8Cl0v0x0B5Fi5wh8EkpYhGKaQgGaBAHtsmO5O3 BIKLmhEsairgYtVX4oYlwV/mTQljmmB0ouVLamWpckGwTdgmCqHIZ+TYR/KVJG7cryjn ehQe62fZjy4gcOL7Hzh5H8GGr8q9z9WkO6Hhbl9p5C3Iv1obfiV108aqaqUIIQANLuM2 wv7+0qPAEQvMp7jC9N7aIRQRcPNjlqqS0NjAQj6Etr9JsXBlr38tqBt197h4j95TrE34 eudg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4z1t32FdEzj8XZPm7eJqjTmXhy1MX24MxU4NWCyxaNA=; b=UxDv9+wL23vxSKap8AFzf/mIiOqTIzFLCNgx3P0/XyEfeKdlprhQjzPS15DYzEbHHC qfOwz/tNG/2LfBia4HwdEkAIiUdB78MYlKziVgtv7Osbj+WeZRqEV9rOblXbp9ccGMp0 cHnLDtbDGc9FYC15UafMRxO+tGLEaa5HbWA/SkGO2yWqcWG8kzfAvcF6Tm+eSnlvl26Z zUDZYsk2NVibcECREeW2fAJW9ZstH7ofkxPL1waTNro1OOHg4h/O76+ZuLTFLeMzKJ2/ uhOFQGODzQi8YKnNW69HDE3VkNJmTLwk79O5zLLNSMRETuy82BZjjOBGxkbOMXtLPHZ9 1D0A== X-Gm-Message-State: APjAAAVmZJocQyxcOBbelZVxf4FxmRnQJvQwgVO3q9J13HOpv8wySxJM Kl0xEgvPHdGGRpC1JK7tGTQcPA== X-Google-Smtp-Source: APXvYqxn2E1Hqz3p2AVbSx6ZLmWl7guB/4opI8uCLhnGgU5+isY75OrlFYuSPuUcQog0QpfxZvtk8A== X-Received: by 2002:a50:ba1a:: with SMTP id g26mr46843043edc.90.1557959703240; Wed, 15 May 2019 15:35:03 -0700 (PDT) Received: from msi.localhost ([185.54.207.135]) by smtp.gmail.com with ESMTPSA id a17sm1178498edt.63.2019.05.15.15.35.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2019 15:35:02 -0700 (PDT) From: Martijn Braam To: dmitry.torokhov@gmail.com Cc: m.felsch@pengutronix.de, robh@kernel.org, martijn@brixit.nl, linux-input@vger.kernel.org Subject: [PATCH v2 1/2] Input: edt-ft5x06 - add vdd supply Date: Thu, 16 May 2019 00:34:20 +0200 Message-Id: <20190515223420.13609-1-martijn@brixit.nl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515044116.ss6usdlc2yb2aqwe@pengutronix.de> References: <20190515044116.ss6usdlc2yb2aqwe@pengutronix.de> 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 Add a regulator supply request for the controller power Signed-off-by: Martijn Braam --- drivers/input/touchscreen/edt-ft5x06.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 702bfda7ee77..226c623f8d46 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -103,6 +104,7 @@ struct edt_ft5x06_ts_data { struct gpio_desc *reset_gpio; struct gpio_desc *wake_gpio; + struct regulator *vdd; #if defined(CONFIG_DEBUG_FS) struct dentry *debug_dir; @@ -1092,6 +1094,22 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, return error; } + tsdata->vdd = devm_regulator_get(&client->dev, "vdd"); + if (IS_ERR(tsdata->vdd)) { + error = PTR_ERR(tsdata->vdd); + if (error != -EPROBE_DEFER) + dev_err(&client->dev, + "Failed to get vdd regulator: %d\n", error); + return error; + } + + /* power the controller */ + error = regulator_enable(tsdata->vdd); + if (error) { + dev_err(&client->dev, "Controller fail to enable vdd\n"); + return error; + } + tsdata->wake_gpio = devm_gpiod_get_optional(&client->dev, "wake", GPIOD_OUT_LOW); if (IS_ERR(tsdata->wake_gpio)) { @@ -1204,6 +1222,7 @@ static int edt_ft5x06_ts_remove(struct i2c_client *client) { struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client); + regulator_disable(tsdata->vdd); edt_ft5x06_ts_teardown_debugfs(tsdata); return 0; From patchwork Wed May 15 22:34:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martijn Braam X-Patchwork-Id: 10945401 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 6C52D1390 for ; Wed, 15 May 2019 22:35:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BE17286A7 for ; Wed, 15 May 2019 22:35:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FC8C2887B; Wed, 15 May 2019 22:35:18 +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,DKIM_SIGNED, DKIM_VALID,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 C26F9286A7 for ; Wed, 15 May 2019 22:35:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726039AbfEOWfR (ORCPT ); Wed, 15 May 2019 18:35:17 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:44583 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725937AbfEOWfR (ORCPT ); Wed, 15 May 2019 18:35:17 -0400 Received: by mail-ed1-f65.google.com with SMTP id b8so1993880edm.11 for ; Wed, 15 May 2019 15:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brixit-nl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/GhtiO2xljpPjlyBlulu/gGvVVN1c2y+XZMUkNyBbH8=; b=EuqUqi+yf+nboFvDDFDY8BKBrqg8dIW5eyDYoIGS/IIFGoyGpE6EQ2yqFG59KQOsFh tR7QlLFktFGeVeYKfKWhMF6ZaHrNY3gSbfgxFvKXypd7/vTyCqjTv4hnlJdEdMbstHCq FfAz3rgemiLFYlExh2vv6LmObAiArgATS0WmCIExcfFiV1ZmDMKkuS3c1xGP5cQggVh8 SJgKiDaKqt2MBw/xyhgz+3W6hD+d6TaRuZGITZMb0q3pXzWBZikQbwFRzVnyvXfbDS9F fqeKtChJdyXrjj9xIgHxgqdFooHdU1O78kI76fP5V0mJ/4W0N2JQ91SLhkifwBTJsp7Q WLqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/GhtiO2xljpPjlyBlulu/gGvVVN1c2y+XZMUkNyBbH8=; b=ayuszAY7uttjovEQ1h2QR1tHLaJd4xzCaJmLHITE+kB+8ulCWKoQqFXSSpE3KFW7G2 Bs3rUgBoIRk/4b7Ts7cH2NT9ifIQ1TXw2staw7Z07GaBCA25+88w8Iw3aIuoo3QBMuIE baUYc3U/vSlGKlcJA78BtGmKDr8MPuQbwfPM4VVV/chBZp+AG3dZZONpMxQF9JkJL5NK 1VNVYJwIdyQFQV8mig0mHKAl6h1VhOiNV6WV9tCmdDf+yep4PSQ6PLZJxQ1ieaZxWOPX Z5sgmWQLAqLXLHtL4cdZHBbqQJc+XSZeJYs0XskrmUnMzwrbQ4VeHEDvTgP7q0RRUTjb xltQ== X-Gm-Message-State: APjAAAXrhY/TKNiXNAxiw5XABiJwZwT9gA2265wTvQ6Anr40OGmkxz/K BDxtFv4/mDEpiaJGkj0FoCohBQ== X-Google-Smtp-Source: APXvYqzHCvuv/UcoQ6STbp7RB9rv51C6JDaYAajIclucnlcxduq38yWz9OhrrySK8/FvRofKAd2K2A== X-Received: by 2002:a17:906:5e4e:: with SMTP id b14mr25337922eju.100.1557959715812; Wed, 15 May 2019 15:35:15 -0700 (PDT) Received: from msi.localhost ([185.54.207.135]) by smtp.gmail.com with ESMTPSA id a17sm1178498edt.63.2019.05.15.15.35.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 May 2019 15:35:15 -0700 (PDT) From: Martijn Braam To: dmitry.torokhov@gmail.com Cc: m.felsch@pengutronix.de, robh@kernel.org, martijn@brixit.nl, linux-input@vger.kernel.org Subject: [PATCH v2 2/2] Input: edt-ft5x06 - add vdd supply Date: Thu, 16 May 2019 00:34:22 +0200 Message-Id: <20190515223420.13609-2-martijn@brixit.nl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190515044116.ss6usdlc2yb2aqwe@pengutronix.de> References: <20190515044116.ss6usdlc2yb2aqwe@pengutronix.de> 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 This adds the bindings for the vdd-supply property Signed-off-by: Martijn Braam --- .../devicetree/bindings/input/touchscreen/edt-ft5x06.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt index 870b8c5cce9b..4b3e54733bc8 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt @@ -35,6 +35,8 @@ Optional properties: - pinctrl-0: a phandle pointing to the pin settings for the control gpios + - vdd-supply: The controller supply + - threshold: allows setting the "click"-threshold in the range from 0 to 80. @@ -65,6 +67,7 @@ Example: polytouch: edt-ft5x06@38 { compatible = "edt,edt-ft5406", "edt,edt-ft5x06"; reg = <0x38>; + vdd-supply = <®_ldo_io0>; pinctrl-names = "default"; pinctrl-0 = <&edt_ft5x06_pins>; interrupt-parent = <&gpio2>;