From patchwork Fri Dec 14 15:12:12 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: 10731335 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 80424746 for ; Fri, 14 Dec 2018 15:12:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59DF02D5D8 for ; Fri, 14 Dec 2018 15:12:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CF9D2D5EB; Fri, 14 Dec 2018 15:12:56 +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 C2AE12D5D8 for ; Fri, 14 Dec 2018 15:12:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730423AbeLNPMn (ORCPT ); Fri, 14 Dec 2018 10:12:43 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:38359 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730398AbeLNPMn (ORCPT ); Fri, 14 Dec 2018 10:12:43 -0500 Received: by mail-lf1-f66.google.com with SMTP id p86so4513093lfg.5; Fri, 14 Dec 2018 07:12:41 -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=CDJY0iulsgx7iN3Slcal1yubzfA4l/+2jzl1Lo0q7x8=; b=YnRyMRjyoYUoa1T/lnyviF6hzTQKfzw8lD7MwA/HobzairVIQZIW07DfpDJextINJf hHd3xbR2R5pY95UONlZNkcywcrUyaCJo0YZWl3AASOrF0ZpJfFUK/NvEiGNNCkOdijgV DwfC0Zc7cVpA84uTALkBgi9NpD4dox5Vtc0+G702De9lqh/lxl8bMkfyXjDuQPA+HiNW 1KgRiGC5CxHLEJT8FWPR+iOcoxoZDJX11HZ30AhQyp01NQj5pC1DH45fXsmIZtB2k2ZZ LLbC5VreBU9Q3x6uOwuBcZZIwadoDxU+oYEDUmkkJPxEhZeUcH/s0btKNazqfFxXmlkH cQbA== 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=CDJY0iulsgx7iN3Slcal1yubzfA4l/+2jzl1Lo0q7x8=; b=hubktTY3cpwgTR9zCTnYiMoeljkpWhFI/cMYQ2/6lQOThYZd+cfYPhIJ8IdX8cHHgm 1/tkn8fPyr0g9WIFLwuVzmmo1jF0qLNYQlE+GSDDw7jXrYxuVpoHZnvV2qSoJei3tT2N ifsAXTJRIhpxNqweKFEzk9Vtg0/Y++ImZTadS5lOEhKp/530sLDMI/Dd9O4PTKKFH8bb 7T3ZmuifoxRVtn5kpA2lL/waJPcWu1FOkxlFw/M3i04h5YBsVH71xQvHwhNFK9Yt3hfg U8xCytOKxlrYxCRaCtqjI5tuMxPEIghAGS5kqY7INOZok6M4gkyVtbmgkDqwXcLSI1XT 9kQg== X-Gm-Message-State: AA+aEWanXAOGFkj1YoPSC66hrSPnvafsxtlQLMBTWAhqB0tvY4Sobx0q kfwkPVuDz/cCELzYQKD9394= X-Google-Smtp-Source: AFSGD/VdHqcg0co6kob+PtNe4FXaN8qc1HI3HiQH+J8lppE8KwqwD1UR3Q+Ro19KLWiMhrXHCLUKbg== X-Received: by 2002:a19:c115:: with SMTP id r21mr2047482lff.144.1544800360099; Fri, 14 Dec 2018 07:12:40 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:976:99fb:a7e3:627c]) by smtp.googlemail.com with ESMTPSA id o17sm951975lff.77.2018.12.14.07.12.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 07:12:39 -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 v5 1/3] Input: atmel_mxt_ts: Add support for optional regulators Date: Fri, 14 Dec 2018 16:12:12 +0100 Message-Id: <20181214151214.5391-2-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181214151214.5391-1-pawel.mikolaj.chmiel@gmail.com> References: <20181214151214.5391-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 v4: - Add missing regulator_disable for vdd in case of error, when enabling avdd regulator Changes from v3: - Fix checkpatch issues - Drop sentence punctuation from patch subject 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 | 67 +++++++++++++++++++++--- 1 file changed, 61 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index d3aacd534e9c..55a107fc1b73 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,40 @@ 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) { + regulator_disable(data->vdd_reg); + + 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 +3135,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 +3161,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 +3189,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 14 15:12:13 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: 10731337 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 8690A13AD for ; Fri, 14 Dec 2018 15:13:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61A9F2D5D8 for ; Fri, 14 Dec 2018 15:13:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 558AB2D63F; Fri, 14 Dec 2018 15:13:01 +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 059882D60E for ; Fri, 14 Dec 2018 15:13:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730460AbeLNPMz (ORCPT ); Fri, 14 Dec 2018 10:12:55 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:34606 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730324AbeLNPMn (ORCPT ); Fri, 14 Dec 2018 10:12:43 -0500 Received: by mail-lj1-f193.google.com with SMTP id u6-v6so5219542ljd.1; Fri, 14 Dec 2018 07:12:42 -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=qRMbrgz6GRxf6yeDCa+/ThuxnntpY3MOarYovcWFQ6M=; b=pFo9zzpzSc9AuhqD6m4diBv0MXXAqoaMxuil29dqVQwAj++oSDyUmNFyzDoFMjZ5hQ OBI0rcJKuz+jbyRYj4YhYRWWq55tPxud0M3BDLDM4+VuQ+/iyezGEE7qfjtDkLKjygjr 9wiVJMKnziGIUYhded+0llC7JTSXRc/kC3uLkXgmlOaYDu3EIxAou/NAKhE5NvnGRwN4 PH7UFeLYm8f2I8EmzyxuJiFtvCCDlNU92KxbgMNAa/AOiRV2U7HyKS76CUT/wdiDymzn Es+dIDlXTYtzxrO8y7X5cX/fQhSE2Zt70jBdcvndi7vSVftZc4HJNFWhhR8ONKMXXyhc 9NMA== 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=qRMbrgz6GRxf6yeDCa+/ThuxnntpY3MOarYovcWFQ6M=; b=ZGYEJbhiDmgKbWH9KtiO2m4bzMQSlugt70BWjAAJX1b6OWlteNe1dLV80HBiQKQ5Or PvwFprOmZYju4Ooe6UupUfqQrUe+lG6OvQ77IIwPbAVDsZrbBiv4sQNUBKlV4csmKaI9 0zH23sDTzLjKrhbIauQoA2sL/bbhTXxB5Z4tbzCxOdq0kQmIRGiXvHewlNs+OZP2Y/Yx Zp8oEp7YxTVUxbZXVLfjolxgo0Vh7FdAfY4KV4J6KtbdJSRh6aHcPPyYxX2kK0cfPjzf 76NzpkD74pZ139cCE0G/KtB+5zaLr29T03kj7lfmizW8+gylg6IJYz4/k+u86jEFxsZ3 5iJQ== X-Gm-Message-State: AA+aEWYQLiwuZaR/JNud5zgDYPWloYqx6Ors0An4tk6JepTzEHok7743 iw32hyyUsUv21h1kRk+OWEo= X-Google-Smtp-Source: AFSGD/VOnrKfX1vyv8a22wLq9u3naOibHehdLcak71xwAg9pclRRKGzlRDURaL0/8ScC700m9cy/Uw== X-Received: by 2002:a2e:5054:: with SMTP id v20-v6mr2102682ljd.45.1544800361634; Fri, 14 Dec 2018 07:12:41 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:976:99fb:a7e3:627c]) by smtp.googlemail.com with ESMTPSA id o17sm951975lff.77.2018.12.14.07.12.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 07:12:41 -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 v5 2/3] Input: atmel_mxt_ts: Wait for device be ready for communication Date: Fri, 14 Dec 2018 16:12:13 +0100 Message-Id: <20181214151214.5391-3-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181214151214.5391-1-pawel.mikolaj.chmiel@gmail.com> References: <20181214151214.5391-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 v1: - 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 55a107fc1b73..e8949c6ceafa 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 @@ -3070,6 +3071,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 14 15:12:14 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: 10731333 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 EFABB746 for ; Fri, 14 Dec 2018 15:12:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C93972D5E1 for ; Fri, 14 Dec 2018 15:12:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD0D52D5D8; Fri, 14 Dec 2018 15:12: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=-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 6FDB32D5D8 for ; Fri, 14 Dec 2018 15:12:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730438AbeLNPMq (ORCPT ); Fri, 14 Dec 2018 10:12:46 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:44148 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730425AbeLNPMp (ORCPT ); Fri, 14 Dec 2018 10:12:45 -0500 Received: by mail-lj1-f195.google.com with SMTP id k19-v6so5167567lji.11; Fri, 14 Dec 2018 07:12:43 -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=AA+sTsi+2r9TaO4AjoiPveHi7QEZ6CyRaTCdXyKbmlI4V5cPPLC9vA20OsRILHzxQr CvZg0bUe/UPRkXVS0MVkXtL6IhiWSOfC8Kex/z1PmxDwJchTZm4w+muB6fO9ewNLO+as XyS86vKWHrbwDakwcrtK8Ol3ZbSCqYn251CyJjaeuF1BOY6QpNqzP2ygsQ+7zLkid0gB hVA9d4lK73+xUAZeUDzFPv0m1UGCnRpfA1DEY5OSjFhs7u07FasCp7QwhuOTcZP0JWPj anWcHm7OQpXHjxwVdu7QwF6x2wSJQauFEY6WcE1OE+hJkLwH7cHdgNkSNKlrPcnrQeWo kfiw== 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=qmbJYsMna5X1EKgaelBrC83ES0dQ5aX6A6MB+fBqpFBw6gLFwLyVPK8XvNzABy7GeH Hze6QHdWclL2t7HDUVklqAw4wjpUp5fLXPLdJgiA1wM8pwjlnchfCsjiOFXpvmt79Iqu Rv1Ymq9ldlnPgGeKPPLFvPCIQUfxLmGSKkAvU3MPF1pEnJ+x9sDPHiM3hZgIcrMHFwkc vMEeyfgil67ktZBE64GWvOh/jQYg8C3OMck/x3XsAXsJVPaoST9BCcOpt1K5Nm2OHGg4 +PsVya4rHO32U4xftCgSYj2FMUidQR3UUpYssYryNz7L3zXu2faNOlsj0Z9f32QiylWB 7q9A== X-Gm-Message-State: AA+aEWbz8V3ih/Wb2jt41bmcl+vzLGYYG/lV6Bx5xuso37SOvQBNOcTC 8Tk2VWNkwwoc5+NDTpTFsvZP/Bjs+eI= X-Google-Smtp-Source: AFSGD/UpvwuG6QLqDJlXq4Uy1lBkqEcft6k+rwE4UIl4p+PwyZEFl5PQO5/79a6L9O4ktaEg+Nx93Q== X-Received: by 2002:a2e:87c3:: with SMTP id v3-v6mr2259538ljj.13.1544800363045; Fri, 14 Dec 2018 07:12:43 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:976:99fb:a7e3:627c]) by smtp.googlemail.com with ESMTPSA id o17sm951975lff.77.2018.12.14.07.12.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Dec 2018 07:12:42 -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 v5 3/3] Input: atmel_mxt_ts: Document optional voltage regulators Date: Fri, 14 Dec 2018 16:12:14 +0100 Message-Id: <20181214151214.5391-4-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181214151214.5391-1-pawel.mikolaj.chmiel@gmail.com> References: <20181214151214.5391-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 Reviewed-by: Sebastian Reichel --- 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>; };