From patchwork Tue Mar 2 10:21:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 392340 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E466C28E8A for ; Tue, 2 Mar 2021 20:09:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5AC8B64F32 for ; Tue, 2 Mar 2021 20:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241833AbhCBUCX (ORCPT ); Tue, 2 Mar 2021 15:02:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379997AbhCBKYn (ORCPT ); Tue, 2 Mar 2021 05:24:43 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D4EFC061794; Tue, 2 Mar 2021 02:22:06 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id v9so12656327lfa.1; Tue, 02 Mar 2021 02:22: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=+oFeJHdMdN6sWTiVX2kJ/nUWLcOSOyUM6St3ihjMXLg=; b=b1Eq1J1rv0nxVvSv5zcaUWwSxqxDq5cl0p4txcM2vCqcxIdeOJYK8uyUhO7898GDPC hUyiBBb2FeHlNfnnsqRlW/T7aV/6GP58AycVBMr1yxWcx/KB09lLjFtaO8D5B7lTnK+r FHoMhPCqGaGtv9kHZ7y8V1iPLwpS6nUVZ5fH1Qm7wPgzNjL6E809PLg9xXxqAURP+Vpn T8AYovdAQchAUsi2rEexVCNqWWZ+3hm9YrOQA9r3vOjFhlSuvHcFFjdj7z6KMF8ChMq7 SEyhMx3y07S8w3lfYgmfRq/tlSJvy30JA9o+8bZg2dkKbGldeNblbGa65QJfD1syEHti Yq4w== 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=+oFeJHdMdN6sWTiVX2kJ/nUWLcOSOyUM6St3ihjMXLg=; b=Pk92hYg2RAokFxoN9Qk3yx97cKWdEqXXALNbmdWWilFPiCs0Gdr3y1AzXzm0YWfLAM rgCQTxBhqCdZRz6e8Bz5rhrUFEkgHLI9QX6adGsXYxYqXHOHlmOXTqW4yMGIEKSVXp4v ok91D0teAlr1Y8pftOxEhwZdj6abLkPA05ujDZP8yz0e89GHFKcxaVn9MvZLcok1cesz uk0vV6nsk6Pyta5z7oT20RUD6f0shJAOreTiAZKXD43M1KQoIZa6ClqGWYiUUBgmBqm4 PxQuqJONUuoSMU991Ecw8736geWjISV1VPSsZ3rPn47qMRm2kkqhkjPIMXxwc1Q9QkKd 3T7A== X-Gm-Message-State: AOAM532poNxfRHtL2reWUWwuoXya5Kq7ejOgfi1TM4JQe6DIIk3yjEOd 0WXQurZY6rHQX72ev7gFXpbAbbIzoxY= X-Google-Smtp-Source: ABdhPJyLlYt0PdmlcnXPCh5Wjs47IDsKN9AZDUhoZpqzBO7ENx6+25ICT1Y4jyQqelpw9yaWYP+TFg== X-Received: by 2002:a19:c74d:: with SMTP id x74mr11218630lff.223.1614680524833; Tue, 02 Mar 2021 02:22:04 -0800 (PST) Received: from localhost.localdomain (109-252-193-52.dynamic.spd-mgts.ru. [109.252.193.52]) by smtp.gmail.com with ESMTPSA id n2sm2586369lfu.274.2021.03.02.02.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 02:22:04 -0800 (PST) From: Dmitry Osipenko To: Nick Dyer , Dmitry Torokhov , Rob Herring , Thierry Reding , Jonathan Hunter , Linus Walleij , Jiada Wang Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 1/3] dt-bindings: input: atmel_mxt_ts: Document atmel, wakeup-method and WAKE line GPIO Date: Tue, 2 Mar 2021 13:21:56 +0300 Message-Id: <20210302102158.10533-2-digetx@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210302102158.10533-1-digetx@gmail.com> References: <20210302102158.10533-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Some Atmel touchscreen controllers have a WAKE line that needs to be asserted low in order to wake up controller from a deep sleep. Document the wakeup methods and the new GPIO properties. Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Dmitry Osipenko --- .../bindings/input/atmel,maxtouch.yaml | 29 +++++++++++++++++++ include/dt-bindings/input/atmel-maxtouch.h | 10 +++++++ 2 files changed, 39 insertions(+) create mode 100644 include/dt-bindings/input/atmel-maxtouch.h diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml index 8c6418f76e94..e6b03a1e7c30 100644 --- a/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml +++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.yaml @@ -39,6 +39,13 @@ properties: (active low). The line must be flagged with GPIO_ACTIVE_LOW. + wake-gpios: + maxItems: 1 + description: + Optional GPIO specifier for the touchscreen's wake pin + (active low). The line must be flagged with + GPIO_ACTIVE_LOW. + linux,gpio-keymap: $ref: /schemas/types.yaml#/definitions/uint32-array description: | @@ -53,6 +60,26 @@ properties: or experiment to determine which bit corresponds to which input. Use KEY_RESERVED for unused padding values. + atmel,wakeup-method: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + The WAKE line is an active-low input that is used to wake up the touch + controller from deep-sleep mode before communication with the controller + could be started. This optional feature used to minimize current + consumption when the controller is in deep sleep mode. This feature is + relevant only to some controller families, like mXT1386 controller for + example. + + The WAKE pin can be connected in one of the following ways: + 1) left permanently low + 2) connected to the I2C-compatible SCL pin + 3) connected to a GPIO pin on the host + enum: + - 0 # ATMEL_MXT_WAKEUP_NONE + - 1 # ATMEL_MXT_WAKEUP_I2C_SCL + - 2 # ATMEL_MXT_WAKEUP_GPIO + default: 0 + required: - compatible - reg @@ -63,6 +90,7 @@ additionalProperties: false examples: - | #include + #include #include i2c { #address-cells = <1>; @@ -75,6 +103,7 @@ examples: reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; vdda-supply = <&ab8500_ldo_aux2_reg>; vdd-supply = <&ab8500_ldo_aux5_reg>; + atmel,wakeup-method = ; }; }; diff --git a/include/dt-bindings/input/atmel-maxtouch.h b/include/dt-bindings/input/atmel-maxtouch.h new file mode 100644 index 000000000000..7345ab32224d --- /dev/null +++ b/include/dt-bindings/input/atmel-maxtouch.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ + +#ifndef _DT_BINDINGS_ATMEL_MAXTOUCH_H +#define _DT_BINDINGS_ATMEL_MAXTOUCH_H + +#define ATMEL_MXT_WAKEUP_NONE 0 +#define ATMEL_MXT_WAKEUP_I2C_SCL 1 +#define ATMEL_MXT_WAKEUP_GPIO 2 + +#endif /* _DT_BINDINGS_ATMEL_MAXTOUCH_H */ From patchwork Tue Mar 2 10:21:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 392338 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CAFDC41519 for ; Tue, 2 Mar 2021 20:09:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 433D064F2C for ; Tue, 2 Mar 2021 20:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238915AbhCBUCB (ORCPT ); Tue, 2 Mar 2021 15:02:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379998AbhCBKYn (ORCPT ); Tue, 2 Mar 2021 05:24:43 -0500 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E01DC061797; Tue, 2 Mar 2021 02:22:08 -0800 (PST) Received: by mail-lj1-x230.google.com with SMTP id e2so16059180ljo.7; Tue, 02 Mar 2021 02:22:08 -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=4J6EjSuefLNlwS0ypISOC/mzldjx8zJnTcq60uLqUsg=; b=JVVsQOC48Ok2XChynYCkw4o8UfJ/XjGVY5YTYaANQSHra+TjLkNlliPyRdKNXGaDpd mSIin2dTNXgnuTXLiwcWa9D/cqqx0lkLlD5ZgFDpMvObLb9UJuSKRQMWHXOehpQ9zZPX zeBSlfjAG5iSgyCy5Eet5wOC4MN60Rb12k3yoojwUFsk4ZHltulw3TEnnL2Lw44qZxa+ x3v4sZjwkSLQe1E4Yy3ra54naaqCSJbMEFtMdrH36n/nvozGIshq2I1DoehVCG/1G67o MbHItHE5RVb04SszjwHykCXU/hoGYqWzoVgvecFp20fBGij4AoIIv9JgT3Hbbmafu2l9 DlYQ== 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=4J6EjSuefLNlwS0ypISOC/mzldjx8zJnTcq60uLqUsg=; b=LNN5Vo8PGKlKgAWF4ntMzJ174YnJUpS1sv8YweQqiL57FtwRgyrP9Swn95QLLRC5mv 7vonZQf9eA2Bp0Va1TnE7iajD6AnLvt6GMqhP/fA4bW2ia5N+fnfGY8+z6D61ugDxsvt +mZVGFrxXiQZJisXFhS7Ub/PlmHhdMsh1YEWNLZOQsCR1PglTUr5SkkHSBaQXsrPCT4j JyUruQvQgiujq/+KUjKrCW1ZbUI2p7lxUKcNKYJ3Xc+r0ZVJdyYAYFlVM6FolN8eDEIZ Lnml/o8YC3oJaP8ENrj3EXwsowkXtN8nrvwDxEgse95tnTZHqTxDdWD5xwG9YRnpPXYM nulg== X-Gm-Message-State: AOAM533/M6BJgaVPSUm22agcQbGOXXFX0cXVTPNaiK9rYby3Fa37+g3V aXMM8tkH6SYMlXGN7pXsqxU= X-Google-Smtp-Source: ABdhPJyXDRoT64bllqqEE0boG4Uwo1agjyjf0DFOPpzGZSqAodcuWIdgJsZtYKsYOksCqlnc/Z6zvw== X-Received: by 2002:a2e:910d:: with SMTP id m13mr11690755ljg.189.1614680525507; Tue, 02 Mar 2021 02:22:05 -0800 (PST) Received: from localhost.localdomain (109-252-193-52.dynamic.spd-mgts.ru. [109.252.193.52]) by smtp.gmail.com with ESMTPSA id n2sm2586369lfu.274.2021.03.02.02.22.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 02:22:05 -0800 (PST) From: Dmitry Osipenko To: Nick Dyer , Dmitry Torokhov , Rob Herring , Thierry Reding , Jonathan Hunter , Linus Walleij , Jiada Wang Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 2/3] Input: atmel_mxt_ts - support wakeup methods Date: Tue, 2 Mar 2021 13:21:57 +0300 Message-Id: <20210302102158.10533-3-digetx@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210302102158.10533-1-digetx@gmail.com> References: <20210302102158.10533-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org According to datasheets, chips like mXT1386 have a WAKE line, it is used to wake the chip up from deep sleep mode before communicating with it via the I2C-compatible interface. If the WAKE line is connected to a GPIO line, the line must be asserted 25 ms before the host attempts to communicate with the controller. If the WAKE line is connected to the SCL pin, the controller will send a NACK on the first attempt to address it, the host must then retry 25 ms later. Implement the wake-up methods in the driver. Touchscreen now works properly on devices like Acer A500 tablet, fixing problems like this: atmel_mxt_ts 0-004c: __mxt_read_reg: i2c transfer failed (-121) atmel_mxt_ts 0-004c: mxt_bootloader_read: i2c recv failed (-121) atmel_mxt_ts 0-004c: Trying alternate bootloader address atmel_mxt_ts 0-004c: mxt_bootloader_read: i2c recv failed (-121) atmel_mxt_ts: probe of 0-004c failed with error -121 Reviewed-by: Linus Walleij Signed-off-by: Jiada Wang Signed-off-by: Dmitry Osipenko --- drivers/input/touchscreen/atmel_mxt_ts.c | 78 ++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 383a848eb601..5ed23689047b 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -31,6 +31,7 @@ #include #include #include +#include /* Firmware files */ #define MXT_FW_NAME "maxtouch.fw" @@ -199,6 +200,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_WAKEUP_TIME 25 /* msec */ /* Command to unlock bootloader */ #define MXT_UNLOCK_CMD_MSB 0xaa @@ -312,6 +314,7 @@ struct mxt_data { struct mxt_dbg dbg; struct regulator_bulk_data regulators[2]; struct gpio_desc *reset_gpio; + struct gpio_desc *wake_gpio; bool use_retrigen_workaround; /* Cached parameters from object table */ @@ -342,6 +345,8 @@ struct mxt_data { unsigned int t19_num_keys; enum mxt_suspend_mode suspend_mode; + + u32 wakeup_method; }; struct mxt_vb2_buffer { @@ -621,10 +626,42 @@ static int mxt_send_bootloader_cmd(struct mxt_data *data, bool unlock) return mxt_bootloader_write(data, buf, sizeof(buf)); } +static bool mxt_wakeup_toggle(struct i2c_client *client, + bool wake_up, bool in_i2c) +{ + struct mxt_data *data = i2c_get_clientdata(client); + + switch (data->wakeup_method) { + case ATMEL_MXT_WAKEUP_I2C_SCL: + if (!in_i2c) + return false; + break; + + case ATMEL_MXT_WAKEUP_GPIO: + if (in_i2c) + return false; + + gpiod_set_value(data->wake_gpio, wake_up); + break; + + default: + return false; + } + + if (wake_up) { + dev_dbg(&client->dev, "waking up controller\n"); + + msleep(MXT_WAKEUP_TIME); + } + + return true; +} + static int __mxt_read_reg(struct i2c_client *client, u16 reg, u16 len, void *val) { struct i2c_msg xfer[2]; + bool retried = false; u8 buf[2]; int ret; @@ -643,9 +680,13 @@ static int __mxt_read_reg(struct i2c_client *client, xfer[1].len = len; xfer[1].buf = val; +retry: ret = i2c_transfer(client->adapter, xfer, 2); if (ret == 2) { ret = 0; + } else if (!retried && mxt_wakeup_toggle(client, true, true)) { + retried = true; + goto retry; } else { if (ret >= 0) ret = -EIO; @@ -659,6 +700,7 @@ static int __mxt_read_reg(struct i2c_client *client, static int __mxt_write_reg(struct i2c_client *client, u16 reg, u16 len, const void *val) { + bool retried = false; u8 *buf; size_t count; int ret; @@ -672,9 +714,13 @@ static int __mxt_write_reg(struct i2c_client *client, u16 reg, u16 len, buf[1] = (reg >> 8) & 0xff; memcpy(&buf[2], val, len); +retry: ret = i2c_master_send(client, buf, count); if (ret == count) { ret = 0; + } else if (!retried && mxt_wakeup_toggle(client, true, true)) { + retried = true; + goto retry; } else { if (ret >= 0) ret = -EIO; @@ -2975,6 +3021,8 @@ static const struct attribute_group mxt_attr_group = { static void mxt_start(struct mxt_data *data) { + mxt_wakeup_toggle(data->client, true, false); + switch (data->suspend_mode) { case MXT_SUSPEND_T9_CTRL: mxt_soft_reset(data); @@ -3009,6 +3057,8 @@ static void mxt_stop(struct mxt_data *data) mxt_set_t7_power_cfg(data, MXT_POWER_CFG_DEEPSLEEP); break; } + + mxt_wakeup_toggle(data->client, false, false); } static int mxt_input_open(struct input_dev *dev) @@ -3155,6 +3205,15 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id) return error; } + /* Request the WAKE line as asserted so we go out of sleep */ + data->wake_gpio = devm_gpiod_get_optional(&client->dev, + "wake", GPIOD_OUT_HIGH); + if (IS_ERR(data->wake_gpio)) { + error = PTR_ERR(data->wake_gpio); + dev_err(&client->dev, "Failed to get wake gpio: %d\n", error); + return error; + } + error = devm_request_threaded_irq(&client->dev, client->irq, NULL, mxt_interrupt, IRQF_ONESHOT, client->name, data); @@ -3185,6 +3244,25 @@ static int mxt_probe(struct i2c_client *client, const struct i2c_device_id *id) msleep(MXT_RESET_INVALID_CHG); } + /* + * Controllers like mXT1386 have a dedicated WAKE line that could be + * connected to a GPIO or to I2C SCL pin, or permanently asserted low. + * + * This WAKE line is used for waking controller from a deep-sleep and + * it needs to be asserted low for 25 milliseconds before I2C transfers + * could be accepted by controller if it was in a deep-sleep mode. + * Controller will go into sleep automatically after 2 seconds of + * inactivity if WAKE line is deasserted and deep sleep is activated. + * + * If WAKE line is connected to I2C SCL pin, then the first I2C transfer + * will get an instant NAK and transfer needs to be retried after 25ms. + * + * If WAKE line is connected to a GPIO line, the line must be asserted + * 25ms before the host attempts to communicate with the controller. + */ + device_property_read_u32(&client->dev, "atmel,wakeup-method", + &data->wakeup_method); + error = mxt_initialize(data); if (error) goto err_disable_regulators; From patchwork Tue Mar 2 10:21:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 392339 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4719EC4332B for ; Tue, 2 Mar 2021 20:09:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2187A60201 for ; Tue, 2 Mar 2021 20:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1582020AbhCBUB5 (ORCPT ); Tue, 2 Mar 2021 15:01:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379999AbhCBKYn (ORCPT ); Tue, 2 Mar 2021 05:24:43 -0500 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10C3DC0617A7; Tue, 2 Mar 2021 02:22:09 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id h4so23053942ljl.0; Tue, 02 Mar 2021 02:22:08 -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=ez28sRNxxnA+mFrwwNyOygQjyXiZVskV4841e9M5tTE=; b=Qne4+z/IjF+WaFiDJb7UeJbCSjyzc0cZiYik1OfF0ZBeomFum8Oy+OPGD/u+vc4Z5a F61VhUwcMlrAgb14aJ/rCBxQrfuw1bG3bnd1pxZyIcw1Xr9n5uzPcrhxncDYI9nFmT9X a1wkf1jjFTemTpn85Jcas/KT6LN9kRD7j1IM+cb+lQtobBkEy+bMs5tFoLHu5P7cDlnS 56p1VFdhGs+JORQGGl423NIE6djgC/pIplzWsHx0+W/tMdaZrFk9nCc6F0kg7e7Lpq1P b124giCYd641SEGPn1HTCl1LH11rMl5w4VpYBBaSC0kXgt7/OVdktFfDPFKIhZff1VpJ KSJQ== 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=ez28sRNxxnA+mFrwwNyOygQjyXiZVskV4841e9M5tTE=; b=Q4u2XDtU4MVWpboEq5V7CGneTEw4hOxzYrGRfWXxJ/fpWGa0dhIrDJovgazPNkXxrK xj2eQHZ2y2pkfolL++coDPoLp/grzokqC5qeMFTEvby0wgyKwIbOjlx4ZVFnEMKAbRET tZ9QMqwAKSEC3K0Y5/QOBpwmAPb9flb5ujAcYKTmoF6HWIOBJnD+z0KjBB0yX56c0Zt9 xFgpp/CoAZzLEmhgTOopeKb5pGqjR8kuelzNsE6lUQoshMiP5xtrrxZi+xc10nZ6+6pb JaTdZcefhBobjSME/WyMlPK1eyxs5qOpWJdgZ3u/ensJO4TMwQcNbZI4wF4Qdlu4+18f dw7g== X-Gm-Message-State: AOAM532rSYREopCI7KTOTjvSuxkomKEtCeRWzLPCoOtzFPnXyuOSYIAM yTLGAws8OFjIgktW0LDqsfM= X-Google-Smtp-Source: ABdhPJwacKskz1iscj45Emaav16iDjjJ3zCeIbF8xVQ4y/Zd4xC03VGoBI7nRTwwfmkU1qhhnTWQfA== X-Received: by 2002:a2e:b01a:: with SMTP id y26mr11496407ljk.442.1614680526143; Tue, 02 Mar 2021 02:22:06 -0800 (PST) Received: from localhost.localdomain (109-252-193-52.dynamic.spd-mgts.ru. [109.252.193.52]) by smtp.gmail.com with ESMTPSA id n2sm2586369lfu.274.2021.03.02.02.22.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 02:22:05 -0800 (PST) From: Dmitry Osipenko To: Nick Dyer , Dmitry Torokhov , Rob Herring , Thierry Reding , Jonathan Hunter , Linus Walleij , Jiada Wang Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 3/3] ARM: tegra: acer-a500: Add atmel, wakeup-method property Date: Tue, 2 Mar 2021 13:21:58 +0300 Message-Id: <20210302102158.10533-4-digetx@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210302102158.10533-1-digetx@gmail.com> References: <20210302102158.10533-1-digetx@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Acer A500 uses Atmel Maxtouch 1386 touchscreen controller. This controller has WAKE line which could be connected to I2C clock lane, dedicated GPIO or fixed to HIGH level. Controller wakes up from a deep sleep when WAKE line is asserted low. Acer A500 has WAKE line connected to I2C clock and Linux device driver doesn't work property without knowing what wakeup method is used by h/w. Add atmel,wakeup-method property to the touchscreen node. Signed-off-by: Dmitry Osipenko --- arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts b/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts index d3b99535d755..40c1bab22155 100644 --- a/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts +++ b/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 /dts-v1/; +#include #include #include #include @@ -450,6 +451,8 @@ touchscreen@4c { avdd-supply = <&vdd_3v3_sys>; vdd-supply = <&vdd_3v3_sys>; + + atmel,wakeup-method = ; }; gyroscope@68 {