From patchwork Sun Feb 17 09:14:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10816909 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 883321399 for ; Sun, 17 Feb 2019 09:15:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77F46287B3 for ; Sun, 17 Feb 2019 09:15:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C81B28A6D; Sun, 17 Feb 2019 09:15: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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 622D1291E9 for ; Sun, 17 Feb 2019 09:15:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726583AbfBQJOw (ORCPT ); Sun, 17 Feb 2019 04:14:52 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:38327 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725769AbfBQJOv (ORCPT ); Sun, 17 Feb 2019 04:14:51 -0500 Received: by mail-pf1-f195.google.com with SMTP id q1so7045587pfi.5 for ; Sun, 17 Feb 2019 01:14:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sRJ5c25qWheOilSsmmqZvMXVbqNH0bBR8OITkpzpTAc=; b=EYAWN59CkpvWDLmEzMxKccC1PtFVeDykVwj+2tT8DUboiQpc7kgqhdcTh/uteNIULn gLKdoC4Xx9G4Zyue9vQsQLKp26uiSvuX+F4LKi3IEZbEkZ+E3qhn9mVd98MvOJc0DrfB 9J6LlJIY0cyDISWOTr2ADY9kfi1J2tVQZm6OM= 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=sRJ5c25qWheOilSsmmqZvMXVbqNH0bBR8OITkpzpTAc=; b=E7bQH4lDSGm915LaoOVUX/qULrYVl/AuhvBZJJFgoxvlOzeu2jZVEylIARygmlg92D t1SCYzBRMM/C+h9RIt6u1DuZNwZaDkmPc9v8nrtlMLAlsKlx9ZTDN5afRpCp5YYw6tNa D1LW+nyaZumudQA1nVpxO/DIvcuBkFGkw+F2S5SPW8YiTM4Vzw44BZf7PEoXjamYQL8r xG3tEMa08zEFXUBmu/lLOn/ZuqXGXwsxQiV0pHaXKtlwETIZbFi+MaxqFgWVadUYRE8A bGqhub+Iq4dy+cbGo/KreS5NaccWK1/2Bv3utx4rnaeBxVs6E8W4G5jAa8qvw2X09VIX B5TQ== X-Gm-Message-State: AHQUAuZSuPZ6bGGe6RwwaTxAP1EeUWtJ3oOm+Nn3ze2DMKEkq5VlXfGO +CWnpDjg7rKNbFDj3fsHaoaEkw== X-Google-Smtp-Source: AHgI3IZQBeiGGFaMLpHeHDrMxTamYUB6ozF96bpS0PWn1MCNLPIziWwk1DynUBUX598J/98IpANTOw== X-Received: by 2002:a62:be0b:: with SMTP id l11mr18846152pff.52.1550394890791; Sun, 17 Feb 2019 01:14:50 -0800 (PST) Received: from localhost.localdomain ([115.97.184.151]) by smtp.gmail.com with ESMTPSA id v15sm5565924pfa.75.2019.02.17.01.14.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Feb 2019 01:14:50 -0800 (PST) From: Jagan Teki To: Dmitry Torokhov , Bastien Nocera , Rob Herring Cc: Henrik Rydberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Mark Rutland , linux-amarula@amarulasolutions.com, Michael Trimarchi , Jagan Teki Subject: [PATCH v5 1/4] dt-bindings: input: touchscreen: goodix: Document regulator properties Date: Sun, 17 Feb 2019 14:44:33 +0530 Message-Id: <20190217091436.3702-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190217091436.3702-1-jagan@amarulasolutions.com> References: <20190217091436.3702-1-jagan@amarulasolutions.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 Goodix CTP controllers support analog, digital and gpio regulator supplies on relevant controller pin configurations. Out of which AVDD28 regulator is mandatory supplied regulator in most of the board designs, so document AVDD28 as required property and rest marked as optional regulators. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring --- .../devicetree/bindings/input/touchscreen/goodix.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt index f7e95c52f3c7..8f6e6eede64d 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt @@ -23,6 +23,13 @@ Optional properties: - touchscreen-inverted-y : Y axis is inverted (boolean) - touchscreen-swapped-x-y : X and Y axis are swapped (boolean) (swapping is done after inverting the axis) + - AVDD28-supply : Analog power supply regulator on AVDD28 pin + +Optional properties: + + - AVDD22-supply : Analog power supply regulator on AVDD22 pin + - DVDD12-supply : Digital power supply regulator on DVDD12 pin + - VDDIO-supply : GPIO power supply regulator on VDDIO pin Example: From patchwork Sun Feb 17 09:14:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10816907 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 8DA63139A for ; Sun, 17 Feb 2019 09:15:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DEFE287B3 for ; Sun, 17 Feb 2019 09:15:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7274529738; Sun, 17 Feb 2019 09:15:17 +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,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 62D8A287B3 for ; Sun, 17 Feb 2019 09:15:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727057AbfBQJPP (ORCPT ); Sun, 17 Feb 2019 04:15:15 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41304 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726921AbfBQJO4 (ORCPT ); Sun, 17 Feb 2019 04:14:56 -0500 Received: by mail-pg1-f193.google.com with SMTP id m1so6957960pgq.8 for ; Sun, 17 Feb 2019 01:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MaBbem7EOSDQZkBwVKyj6IqtqFXAHgbLHZFaAWD/vYo=; b=gozDVM2k3uvO0y910fROCg6L+V9pCNwENWT7ssgaB160Mk8hnaeQMLQkNSat4gr0z7 Flx6C1R1Gdmf1JUBxrFoePo2qIIjrU1XiblFpbwvGygyHf1Qkl02D1ZM2UzkOUY6Xx/C H6eM9Xs/2zCv4XYj9UUSKSOKuoTU2AJNAzdgk= 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=MaBbem7EOSDQZkBwVKyj6IqtqFXAHgbLHZFaAWD/vYo=; b=SJbIMr/+Z5hzoxhdM3qfG3Q82SPzMT+8YzLM73fE2n0YWn/xCrCei20tp2hDP10peB 4nzEt3I8WbTWw69Koezk98N8nQexP+Wgp0cKUQUaiNde44vwLDcBvvP0T1cxam2v6Yhz sntM9bJ6bfuH5XjFl9Z547ndQ1ly9X1j6MFo2UE04gOJmtmQQYdpFrTxq7AvUhpjrALF P4wKfSynnXrWqH2nNp7T+kR5TUEiS5Gzhc5ROYXCK8iqiRykbU5/MAEUU8ujhCZXdDm/ on0XRJ0a48/i0S/Ffdme0o0bom4SBy07eDsAxBgJJbePvsQNS+aBmDT3YULZCoFP5T8o T0Dw== X-Gm-Message-State: AHQUAuYH77ldQXn79K3X9URhHc0Pr9miCBLv79xQhwIqkEKWCeXuXbFN AnjmC0vBmXNt5wsraQU8MxBk4Q== X-Google-Smtp-Source: AHgI3Ib+MJilqFAW+bHbGfaSFOgT7JpxVSPX1Wvu7wQrD3mnJjmWTCyaS87aL1YKirwkNPhc4DXIbg== X-Received: by 2002:a62:f51d:: with SMTP id n29mr11314658pfh.21.1550394894955; Sun, 17 Feb 2019 01:14:54 -0800 (PST) Received: from localhost.localdomain ([115.97.184.151]) by smtp.gmail.com with ESMTPSA id v15sm5565924pfa.75.2019.02.17.01.14.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Feb 2019 01:14:54 -0800 (PST) From: Jagan Teki To: Dmitry Torokhov , Bastien Nocera , Rob Herring Cc: Henrik Rydberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Mark Rutland , linux-amarula@amarulasolutions.com, Michael Trimarchi , Jagan Teki Subject: [PATCH v5 2/4] Input: goodix - Add regulators support Date: Sun, 17 Feb 2019 14:44:34 +0530 Message-Id: <20190217091436.3702-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190217091436.3702-1-jagan@amarulasolutions.com> References: <20190217091436.3702-1-jagan@amarulasolutions.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 Goodix CTP controllers support analog, digital and gpio regulator supplies on relevant controller pin configurations. Support them via regulator bulk calls. Signed-off-by: Jagan Teki --- drivers/input/touchscreen/goodix.c | 58 ++++++++++++++++++++++++++---- 1 file changed, 52 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index f2d9c2c41885..294456a53fe0 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -40,6 +41,15 @@ struct goodix_chip_data { int (*check_config)(struct goodix_ts_data *, const struct firmware *); }; +static const char * const goodix_supply_names[] = { + "AVDD28", + "AVDD22", + "DVDD12", + "VDDIO", +}; + +#define GOODIX_NUM_SUPPLIES ARRAY_SIZE(goodix_supply_names) + struct goodix_ts_data { struct i2c_client *client; struct input_dev *input_dev; @@ -47,6 +57,7 @@ struct goodix_ts_data { struct touchscreen_properties prop; unsigned int max_touch_num; unsigned int int_trigger_type; + struct regulator_bulk_data supplies[GOODIX_NUM_SUPPLIES]; struct gpio_desc *gpiod_int; struct gpio_desc *gpiod_rst; u16 id; @@ -761,11 +772,18 @@ static void goodix_config_cb(const struct firmware *cfg, void *ctx) complete_all(&ts->firmware_loading_complete); } +static void goodix_disable_regulator(void *arg) +{ + struct goodix_ts_data *ts = arg; + + regulator_bulk_disable(GOODIX_NUM_SUPPLIES, ts->supplies); +} + static int goodix_ts_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct goodix_ts_data *ts; - int error; + int error, i; dev_dbg(&client->dev, "I2C Address: 0x%02x\n", client->addr); @@ -786,25 +804,49 @@ static int goodix_ts_probe(struct i2c_client *client, if (error) return error; + for (i = 0; i < GOODIX_NUM_SUPPLIES; i++) + ts->supplies[i].supply = goodix_supply_names[i]; + + error = devm_regulator_bulk_get(&client->dev, GOODIX_NUM_SUPPLIES, + ts->supplies); + if (error) { + dev_err(&client->dev, "Failed to get regulators (ret=%d)\n", + error); + return error; + } + + error = devm_add_action_or_reset(&client->dev, + goodix_disable_regulator, ts); + if (error) + return error; + + /* power the controller */ + error = regulator_bulk_enable(GOODIX_NUM_SUPPLIES, ts->supplies); + if (error) { + dev_err(&client->dev, "Failed to enable regulators (ret=%d)\n", + error); + return error; + } + if (ts->gpiod_int && ts->gpiod_rst) { /* reset the controller */ error = goodix_reset(ts); if (error) { dev_err(&client->dev, "Controller reset failed.\n"); - return error; + goto error; } } error = goodix_i2c_test(client); if (error) { dev_err(&client->dev, "I2C communication failure: %d\n", error); - return error; + goto error; } error = goodix_read_version(ts); if (error) { dev_err(&client->dev, "Read version failed.\n"); - return error; + goto error; } ts->chip = goodix_get_chip_data(ts->id); @@ -823,17 +865,21 @@ static int goodix_ts_probe(struct i2c_client *client, dev_err(&client->dev, "Failed to invoke firmware loader: %d\n", error); - return error; + goto error; } return 0; } else { error = goodix_configure_dev(ts); if (error) - return error; + goto error; } return 0; + +error: + regulator_bulk_disable(GOODIX_NUM_SUPPLIES, ts->supplies); + return error; } static int goodix_ts_remove(struct i2c_client *client) From patchwork Sun Feb 17 09:14:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10816905 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 D4F4A139A for ; Sun, 17 Feb 2019 09:15:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C4867287B3 for ; Sun, 17 Feb 2019 09:15:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B6245291E9; Sun, 17 Feb 2019 09:15:12 +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,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 5E158287B3 for ; Sun, 17 Feb 2019 09:15:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727130AbfBQJO7 (ORCPT ); Sun, 17 Feb 2019 04:14:59 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:34131 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727114AbfBQJO7 (ORCPT ); Sun, 17 Feb 2019 04:14:59 -0500 Received: by mail-pg1-f194.google.com with SMTP id i130so6983992pgd.1 for ; Sun, 17 Feb 2019 01:14:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=okBCXL5ZObi1PQJODlH9Ry376R4p7BpEcaEwmiQ3GnM=; b=d5EQxlhq1n3AbV5nwFJNW1ItP7iVR/cZqsiNEo80YqXTTeed9blO+zHlLYD0RIz2RB SbpIQlLIDISRDzKMyCed1uv8MCV2uK3++YdqWXJxTkNfG2VS8YCCT18yGiemn0glqedi 0A7ye5K1a7JWwDG/GXQ7HfNksA8rwezGB3SnA= 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=okBCXL5ZObi1PQJODlH9Ry376R4p7BpEcaEwmiQ3GnM=; b=dIJyWXIDpMYP1sp4aR/Dz4x2pR2J6tCYLiROGwUYP3kw1cwgP7elJ8S8zhNoYgzwKe 1LtLezFZjMjuypK8LCX6jQJHBQWb3UOvZlAzOFFR5cQyyR3JRTl9DuKrxy9AnhDdpCVq c5I8TyArTY/vT2kicOqBKQruU7J36UxwuFXX6GaTQtn+Zxh/zNL4V2nAxPyhVYtF086i d/kd8i/ZAGkVepVkOq+4Y6DqcEqegg7XIABZGzz/qS5wsSFeBZioyG6q0ry6RzMbBD/w xq6nJpViGFIJbztrVp4lTXLF2zImX6cvp7uf+aDyT1zkeRPW2uPGFJB4BNHsR4j9+mnH Ixcg== X-Gm-Message-State: AHQUAubLKXE/KT7YePyULEdmGDl2FpJXjnAqVYsUFy5O8esKY8Nu92kC FQGZ4NL3TCQFdZlXp8+Tbb0S0A== X-Google-Smtp-Source: AHgI3Ia0DIu9n2dwODlYftgmBt6QfrrKaui0ah3kZHxG0NZzgLFdMTPAS0c4gY/rsnCF82KG9aefog== X-Received: by 2002:a62:59d0:: with SMTP id k77mr18387851pfj.211.1550394898665; Sun, 17 Feb 2019 01:14:58 -0800 (PST) Received: from localhost.localdomain ([115.97.184.151]) by smtp.gmail.com with ESMTPSA id v15sm5565924pfa.75.2019.02.17.01.14.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Feb 2019 01:14:57 -0800 (PST) From: Jagan Teki To: Dmitry Torokhov , Bastien Nocera , Rob Herring Cc: Henrik Rydberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Mark Rutland , linux-amarula@amarulasolutions.com, Michael Trimarchi , Jagan Teki Subject: [PATCH v5 3/4] dt-bindings: input: touchscreen: goodix: Add GT5663 compatible Date: Sun, 17 Feb 2019 14:44:35 +0530 Message-Id: <20190217091436.3702-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190217091436.3702-1-jagan@amarulasolutions.com> References: <20190217091436.3702-1-jagan@amarulasolutions.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 GT5663 is capacitive touch controller with customized smart wakeup gestures, it support chipdata which is similar to existing GT1151 and require AVDD28 supply for some boards. Document the compatible for the same. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt index 8f6e6eede64d..29c149d91a05 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt @@ -3,6 +3,7 @@ Device tree bindings for Goodix GT9xx series touchscreen controller Required properties: - compatible : Should be "goodix,gt1151" + or "goodix,gt5663" or "goodix,gt911" or "goodix,gt9110" or "goodix,gt912" From patchwork Sun Feb 17 09:14:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 10816903 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 45E171399 for ; Sun, 17 Feb 2019 09:15:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3023B287B3 for ; Sun, 17 Feb 2019 09:15:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F9F8291E9; Sun, 17 Feb 2019 09:15:12 +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,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 C1046287B3 for ; Sun, 17 Feb 2019 09:15:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727286AbfBQJPE (ORCPT ); Sun, 17 Feb 2019 04:15:04 -0500 Received: from mail-pg1-f194.google.com ([209.85.215.194]:39065 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727276AbfBQJPD (ORCPT ); Sun, 17 Feb 2019 04:15:03 -0500 Received: by mail-pg1-f194.google.com with SMTP id r11so6961863pgp.6 for ; Sun, 17 Feb 2019 01:15:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U3aS7aZspUVXaJLVPXE9mGfHChnxYiwxohb9NgNnEus=; b=a6na9x5Eae2qvd8qxgS0CyWjZSh+CjeLFzUqYm0WK6WiXehrDVPI1IregatkYGdmfl uvgZWD0tBsMxkIfoY5TFTvUm9IRJmcjXVaD7XTJ2H+ZYbtJUiaJFXbYb/uElsBXSLUVR 48fO6PghodQOi0FrA+OUuCUx9Tl96kBzSbGcw= 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=U3aS7aZspUVXaJLVPXE9mGfHChnxYiwxohb9NgNnEus=; b=TpprTFD8/5937Y0lKRvC/jESqxIiHRUoD4tJuv00WnisrZfjf2hnYj8D40evvjatov rRqZ0Zu9SKxYP09C5gQQM0/35wGWD+isWuPTyLQnSEGVrCpBtKHuncQRPcw8hNN+3knA 6h8cuD4NMFHerGgveHbzAR3GI/czhox6yr24t02kT4iI0LkAYJhruuczI032Mx78/Y97 XX0xNmeLlz8+CCSAF9WJLi/sO+ZG7sLocCrtNICnCnuEaN2FElaKrB5KCdkFbUxqxzX1 0M2QnIga/w40Ygz/pdTl02VtdTV8BXmOTl53OE6D1UivYZIqpOnP6nnqnfNyEzOi5dlL 9HGw== X-Gm-Message-State: AHQUAuZaKmhDpx6cP3VOKiX8JFl6u1XUE2SFEwKAZ9aiSV8/ReBVSjwg QvpcnglFBswb1kWKfXJTXCa96Q== X-Google-Smtp-Source: AHgI3IbqdKjGGkOemK316sGeG0SCm1rNMVUr212TOQpRk1zCKWZzZApJT0UihVTHeXZYJ10bpJ7llQ== X-Received: by 2002:a63:df50:: with SMTP id h16mr13718193pgj.421.1550394902364; Sun, 17 Feb 2019 01:15:02 -0800 (PST) Received: from localhost.localdomain ([115.97.184.151]) by smtp.gmail.com with ESMTPSA id v15sm5565924pfa.75.2019.02.17.01.14.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Feb 2019 01:15:01 -0800 (PST) From: Jagan Teki To: Dmitry Torokhov , Bastien Nocera , Rob Herring Cc: Henrik Rydberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Mark Rutland , linux-amarula@amarulasolutions.com, Michael Trimarchi , Jagan Teki Subject: [PATCH v5 4/4] Input: goodix - Add GT5663 CTP support Date: Sun, 17 Feb 2019 14:44:36 +0530 Message-Id: <20190217091436.3702-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.18.0.321.gffc6fa0e3 In-Reply-To: <20190217091436.3702-1-jagan@amarulasolutions.com> References: <20190217091436.3702-1-jagan@amarulasolutions.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 GT5663 is capacitive touch controller with customized smart wakeup gestures. Add support for it by adding compatible and supported chip data. The chip data on GT5663 is similar to GT1151, like - config data register has 0x8050 address - config data register max len is 240 - config data checksum has 16-bit Signed-off-by: Jagan Teki --- drivers/input/touchscreen/goodix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index 294456a53fe0..80f8b920ef5e 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -227,6 +227,7 @@ static const struct goodix_chip_data *goodix_get_chip_data(u16 id) { switch (id) { case 1151: + case 5663: return >1x_chip_data; case 911: @@ -988,6 +989,7 @@ MODULE_DEVICE_TABLE(acpi, goodix_acpi_match); #ifdef CONFIG_OF static const struct of_device_id goodix_of_match[] = { { .compatible = "goodix,gt1151" }, + { .compatible = "goodix,gt5663" }, { .compatible = "goodix,gt911" }, { .compatible = "goodix,gt9110" }, { .compatible = "goodix,gt912" },