From patchwork Fri Dec 7 14:28:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 10718313 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 01D0A1759 for ; Fri, 7 Dec 2018 14:29:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E52522E155 for ; Fri, 7 Dec 2018 14:29:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9A662E2E5; Fri, 7 Dec 2018 14:29:28 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 5817C2E155 for ; Fri, 7 Dec 2018 14:29:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726318AbeLGO3H (ORCPT ); Fri, 7 Dec 2018 09:29:07 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:41167 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726010AbeLGO3G (ORCPT ); Fri, 7 Dec 2018 09:29:06 -0500 Received: by mail-lf1-f67.google.com with SMTP id c16so3152239lfj.8; Fri, 07 Dec 2018 06:29:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S+OENI6YtzSczLSuymPnFLAriTDDg6DPhxH59mLlxng=; b=Wx9N47JXA0kxNsiHKrumv040W7czuEfj/tQSCfblQxXVckW73b2Z5wN2DcD7Ig9y63 0JwoRZDcFjcV3E+42WvSntm3HZnYAzYsMMJyoCe1oy9ALzbJraLdfH75MohITf8jcXZm +4EGkgFxEOedNHjlSM033SO1Dw+tVZrTdONNCchri5jahpXrn4ZHNs1cjA6txoCVyKFk PENspGs45go8eoOtO1zQFKVZKk6Zucc9YeYtmqgtzp8VN6nKVjGkKrIuwBRHKyt0P5rN NJcIWpu8tJn45jmpe1YL8ggeJGbHF5HfvLwjvKWKLgTKRMzyV1hawSpRtDcHS9xr8f4X 3kJg== 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=S+OENI6YtzSczLSuymPnFLAriTDDg6DPhxH59mLlxng=; b=RsoGAQZpPgff1IxbHP/GykvQ5j8UN+pjT8l/vx9nHWWqU2mTttZZR785QhIVJPFgNF bdaOnwklLd7Kc3GblOeVQYpKYxEkHXsIaIhc2j7rHkeSCJvjScuwmayd77TLblNFePaU uPB8/mLiUc60L9Nia8FolJ4s9b+KYlzkhbvJKhax3xTHo5JBTm0yHwaa3CLfJHsfyL+1 DcS2eJW+6kQBDBgs+Vu/DOSQuY8QKy3+RrUe8ef55c8+yGtAWoo4WVaiM09T0sXWFLn3 q9aCr2kktGvaCC9JIq2dfLVPNzO0cPdDl/GTNU1lVC49R1OmmcRu2IN3HgzNeYUpseMc KvGQ== X-Gm-Message-State: AA+aEWZDIT8z3Grv380O6S8bZ6vbRwlFTlY5vz7SzRvuQjsJcVgpYRjA 6oNSDw7/Jw9qJe2LnPFqpEo= X-Google-Smtp-Source: AFSGD/Xel2TAfxU/X85KmS2yoOaa1eMH70+7GtbBT3zSR22gSbGsDe46di7TQVf6SYoJPVUlKA0YMw== X-Received: by 2002:a19:280f:: with SMTP id o15mr1461603lfo.0.1544192943060; Fri, 07 Dec 2018 06:29:03 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id v64sm630504lfa.48.2018.12.07.06.29.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 06:29:02 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: nick@shmanahar.org Cc: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Pawe=C5=82_Chmiel?= Subject: [PATCH v4 1/3] Input: atmel_mxt_ts: Add support for optional regulators Date: Fri, 7 Dec 2018 15:28:55 +0100 Message-Id: <20181207142857.15818-2-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207142857.15818-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207142857.15818-1-pawel.mikolaj.chmiel@gmail.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 This patch adds optional regulators, which can be used to power up touchscreen. After enabling regulators, we need to wait 150msec. This value is taken from official driver. It was tested on Samsung Galaxy i9000 (based on Samsung S5PV210 SOC). Signed-off-by: Paweł Chmiel --- Changes from v3: - Fix checkpatch issues - Drop sentence punctuation from subject of one of patches Changes from v2: - Move code enabling regulators into separate method, to make code more readable. Changes from v1: - Enable regulators only if reset_gpio is present. - Switch from devm_regulator_get_optional to devm_regulator_get --- drivers/input/touchscreen/atmel_mxt_ts.c | 65 +++++++++++++++++++++--- 1 file changed, 59 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index d3aacd534e9c..1dc8ad0da5af 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -194,10 +195,10 @@ enum t100_type { /* Delay times */ #define MXT_BACKUP_TIME 50 /* msec */ -#define MXT_RESET_GPIO_TIME 20 /* msec */ #define MXT_RESET_INVALID_CHG 100 /* msec */ #define MXT_RESET_TIME 200 /* msec */ #define MXT_RESET_TIMEOUT 3000 /* msec */ +#define MXT_REGULATOR_DELAY 150 /* msec */ #define MXT_CRC_TIMEOUT 1000 /* msec */ #define MXT_FW_RESET_TIME 3000 /* msec */ #define MXT_FW_CHG_TIMEOUT 300 /* msec */ @@ -323,6 +324,8 @@ struct mxt_data { struct t7_config t7_cfg; struct mxt_dbg dbg; struct gpio_desc *reset_gpio; + struct regulator *vdd_reg; + struct regulator *avdd_reg; /* Cached parameters from object table */ u16 T5_address; @@ -3038,6 +3041,38 @@ static const struct dmi_system_id chromebook_T9_suspend_dmi[] = { { } }; +static int mxt_regulator_enable(struct mxt_data *data) +{ + int error; + + if (data->reset_gpio) { + error = regulator_enable(data->vdd_reg); + if (error) { + dev_err(&data->client->dev, + "Failed to enable vdd regulator: %d\n", error); + return error; + } + + error = regulator_enable(data->avdd_reg); + if (error) { + dev_err(&data->client->dev, + "Failed to enable avdd regulator: %d\n", error); + return error; + } + + /* + * According to maXTouch power sequencing specification, + * RESET line must be kept low until some time + * after regulators come up to voltage + */ + msleep(MXT_REGULATOR_DELAY); + gpiod_set_value(data->reset_gpio, 1); + msleep(MXT_RESET_INVALID_CHG); + } + + return 0; +} + static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct mxt_data *data; @@ -3098,6 +3133,22 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id) return error; } + data->vdd_reg = devm_regulator_get(&client->dev, "vdd"); + if (IS_ERR(data->vdd_reg)) { + error = PTR_ERR(data->vdd_reg); + dev_err(&client->dev, "Failed to get vdd regulator: %d\n", + error); + return error; + } + + data->avdd_reg = devm_regulator_get(&client->dev, "avdd"); + if (IS_ERR(data->avdd_reg)) { + error = PTR_ERR(data->avdd_reg); + dev_err(&client->dev, "Failed to get avdd regulator: %d\n", + error); + return error; + } + error = devm_request_threaded_irq(&client->dev, client->irq, NULL, mxt_interrupt, IRQF_ONESHOT, client->name, data); @@ -3108,11 +3159,9 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id) disable_irq(client->irq); - if (data->reset_gpio) { - msleep(MXT_RESET_GPIO_TIME); - gpiod_set_value(data->reset_gpio, 1); - msleep(MXT_RESET_INVALID_CHG); - } + error = mxt_regulator_enable(data); + if (error) + return error; error = mxt_initialize(data); if (error) @@ -3138,6 +3187,10 @@ static int mxt_remove(struct i2c_client *client) struct mxt_data *data = i2c_get_clientdata(client); disable_irq(data->irq); + if (data->reset_gpio) { + regulator_disable(data->avdd_reg); + regulator_disable(data->vdd_reg); + } sysfs_remove_group(&client->dev.kobj, &mxt_attr_group); mxt_free_input_device(data); mxt_free_object_table(data); From patchwork Fri Dec 7 14:28:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 10718311 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 2E5D41731 for ; Fri, 7 Dec 2018 14:29:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16EF42E294 for ; Fri, 7 Dec 2018 14:29:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08F692E353; Fri, 7 Dec 2018 14:29:28 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 E96012E303 for ; Fri, 7 Dec 2018 14:29:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726331AbeLGO3I (ORCPT ); Fri, 7 Dec 2018 09:29:08 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40575 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726054AbeLGO3H (ORCPT ); Fri, 7 Dec 2018 09:29:07 -0500 Received: by mail-lj1-f195.google.com with SMTP id n18-v6so3721001lji.7; Fri, 07 Dec 2018 06:29:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vWNAi8KA5a8AOePm/F4rK7ibKNtgPheT1xDfWNYRieY=; b=e11A58l1OICddwBkd3QPB4OcLgtsliFd4zjJy+N9bQGigToT/1BMutBRd+QtlEq0pO 5LILs7A2Lq1IguK022EApnKfxclTwl6Lk0siOrwEnjOvMPWwhwnJMb7K4znBRl9PMqjY 7iFelOBgQN4qdgQ/Ccn71jD9m5ARPDAyzAvvTuwyZJdkdOqe4qqG2KbuO7F0zu4UqMCq Lbkf79c1fmzl0DIr3/R25r1Z4JJQvquvrsGcs29lV26z6fLl7+MasKIYjRGOeXXScP7k N2bKdnFvRiRdLSBowMW92NXuKlUeaLSqP30c9FPFmpiBbJ9DI5T9b7crQLPV/KH7geN0 ZxbQ== 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=vWNAi8KA5a8AOePm/F4rK7ibKNtgPheT1xDfWNYRieY=; b=ZR+toqXAX8n6ejWxUUuHPIu6rk+w2sWu99lkqrgh04q3NCEgVFkFKp7bZ+eg/p1U1i sYsRcqq5fbMk+GDEoh8vAReVkj41GmroqzsPj0OcyOu331kYHr7eBp/PWmXMOju5Oec4 e2GcCy4XV9xPyylp6PN/X0isMbPsiKsrqCr1uVX1dBJhqFYXRVJd5vrYG9BiWfK5JM6U 5gk7bcjQC0sBjaBFq8Ggka/uMdxfDszoj6hSN0cVFO/4CC7fapp/PeG4qXh5iVo7QigZ 7UItvr79Lag/piuvhPg5jYWSgZylaRfhkmRACbf8YOaEAnQDgzP8yircTnOk9eprHY0o Js8w== X-Gm-Message-State: AA+aEWaZOOsRKKzaeWIHhuL2KsJt1r32mpFzG3fdAyji+jwCLJQvHQi8 9WEK6LI4/ne1RCncYC+An3n+3thzhEg= X-Google-Smtp-Source: AFSGD/Up/wbof3FtQRCE3rUT1ZzDsRe88dk6wQP8OjxkQVHawaLT5xP91x8lz8V2gRHiotkgE7dz3g== X-Received: by 2002:a2e:994:: with SMTP id 142-v6mr1316978ljj.120.1544192944605; Fri, 07 Dec 2018 06:29:04 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id v64sm630504lfa.48.2018.12.07.06.29.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 06:29:04 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: nick@shmanahar.org Cc: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Pawe=C5=82_Chmiel?= Subject: [PATCH v4 2/3] Input: atmel_mxt_ts: Wait for device be ready for communication Date: Fri, 7 Dec 2018 15:28:56 +0100 Message-Id: <20181207142857.15818-3-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207142857.15818-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207142857.15818-1-pawel.mikolaj.chmiel@gmail.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 According to documentation, device isn't ready for communication, until firmware asserts the CHG line. Add missing wait for this. Signed-off-by: Paweł Chmiel --- Changes from v3: - Fix checkpatch issues --- drivers/input/touchscreen/atmel_mxt_ts.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 1dc8ad0da5af..3f956d07d09e 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -202,6 +202,7 @@ enum t100_type { #define MXT_CRC_TIMEOUT 1000 /* msec */ #define MXT_FW_RESET_TIME 3000 /* msec */ #define MXT_FW_CHG_TIMEOUT 300 /* msec */ +#define MXT_POWERON_DELAY 150 /* msec */ /* Command to unlock bootloader */ #define MXT_UNLOCK_CMD_MSB 0xaa @@ -3068,6 +3069,16 @@ static int mxt_regulator_enable(struct mxt_data *data) msleep(MXT_REGULATOR_DELAY); gpiod_set_value(data->reset_gpio, 1); msleep(MXT_RESET_INVALID_CHG); + +retry_wait: + reinit_completion(&data->bl_completion); + data->in_bootloader = true; + error = mxt_wait_for_completion(data, &data->bl_completion, + MXT_POWERON_DELAY); + if (error == -EINTR) + goto retry_wait; + + data->in_bootloader = false; } return 0; From patchwork Fri Dec 7 14:28:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pawe=C5=82_Chmiel?= X-Patchwork-Id: 10718307 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 E0B071731 for ; Fri, 7 Dec 2018 14:29:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D01522E28C for ; Fri, 7 Dec 2018 14:29:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C42172E303; Fri, 7 Dec 2018 14:29:23 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 723532E28C for ; Fri, 7 Dec 2018 14:29:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726010AbeLGO3J (ORCPT ); Fri, 7 Dec 2018 09:29:09 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:35187 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726328AbeLGO3J (ORCPT ); Fri, 7 Dec 2018 09:29:09 -0500 Received: by mail-lf1-f65.google.com with SMTP id e26so3179514lfc.2; Fri, 07 Dec 2018 06:29:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XFPTtMJpSFiF4PFAqSj6g1FCx0iqQrUaJq/0mQ1Us/I=; b=rnRExS/ioqXRd7pl9X9/WxnSDOkSz5BlvCsll1C0iOnrGjkL+YxDK5AG/ixFIJwLnj uBHkR/0kUmi2Vs3Gm3RSwug2RKF3WqLC0Z7P+4IJk4FsG4C+wD+M22uk3m9+G6fBWPjN y0v/Pmc+6RX9W7VLoifWD1QgiUtol9TfYdYDwd2d8gfrGngaWdq+6KEzhDbvEKCrkJZs jsOty8TBA9RGkBI0wEGUMB/zie8GdzJQWbpWSUP3UWXtVA2IEO0CrfGjKrmYxQokmk1E 6xsSukU69ObfUN02s9DCMgGqfi9FKRY7YtAp8JUvw9TWjb+aNzazjNFGGQOIwlWxG7MV IoWA== 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=XFPTtMJpSFiF4PFAqSj6g1FCx0iqQrUaJq/0mQ1Us/I=; b=ZBVWzrYjTChOHoTevvXlXJ5uOTwRNdJhPWkNPUJEU4I62zD2g1aj5X4/+zWY6VuKqW ArZx41BnzvVcA/IEs4qlPx4BAVo2hwe5BwLWrXVQqgd+Q/X1+8TqYyZN7LrR2Owo9IUJ 3qhOXP1ZCazYLEF3qsmGJe0rkB1Ifrx9JH4zJDi5AVw7b51aibWKDeeAJcf2PYNWeYf2 iWm2LJpizYQrTEMlyfTH9sLL4evIKuyWxBl4tr4J4tP9GDJhggTzQJx6Mhn+v5RtpX2f oUs2CTHBqQ7rrMJOwgjqU/+QGhqA5VQd1gwJHs2H/osJhpGLBv4/X33ZK1XXBnS6mHAl hYeQ== X-Gm-Message-State: AA+aEWb9YGW6zA7Av6OJPxtHBjEkmuWuad2EPZdzjO4xmkzNOc29jydg QFTkvDPfH4fsrN9Au7fbc+qFhxq268Y= X-Google-Smtp-Source: AFSGD/UJGLWQZxgX4zc/qOv5w0brAukTjLL/vMZ7TccXHJhOgYWzodEmqX/Piod2kwFhkAi+/CaztQ== X-Received: by 2002:a19:1d0d:: with SMTP id d13mr1430771lfd.74.1544192945963; Fri, 07 Dec 2018 06:29:05 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id v64sm630504lfa.48.2018.12.07.06.29.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 06:29:05 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: nick@shmanahar.org Cc: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Pawe=C5=82_Chmiel?= Subject: [PATCH v4 3/3] Input: atmel_mxt_ts: Document optional voltage regulators Date: Fri, 7 Dec 2018 15:28:57 +0100 Message-Id: <20181207142857.15818-4-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207142857.15818-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207142857.15818-1-pawel.mikolaj.chmiel@gmail.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 Document new optional voltage regulators, which can be used to power down/up touchscreen. Signed-off-by: Paweł Chmiel Reviewed-by: Rob Herring --- Changes from v1: - Added reviewed-by --- .../devicetree/bindings/input/atmel,maxtouch.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt index c88919480d37..17930ecadad3 100644 --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt @@ -31,6 +31,12 @@ Optional properties for main touchpad device: - reset-gpios: GPIO specifier for the touchscreen's reset pin (active low) +- avdd-supply: Analog power supply. It powers up the analog channel block + of the controller to detect the touches. + +- vdd-supply: Digital power supply. It powers up the digital block + of the controller to enable i2c communication. + Example: touch@4b { @@ -38,4 +44,6 @@ Example: reg = <0x4b>; interrupt-parent = <&gpio>; interrupts = ; + avdd-supply = <&atsp_reg>; + vdd-supply = <&tsp_reg>; };