From patchwork Fri Dec 7 10:58:04 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: 10717951 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 7ACA9109C for ; Fri, 7 Dec 2018 10:59:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 690132E04A for ; Fri, 7 Dec 2018 10:59:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D4E22E078; Fri, 7 Dec 2018 10:59:09 +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 6CB8F2E04A for ; Fri, 7 Dec 2018 10:59:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726074AbeLGK6Y (ORCPT ); Fri, 7 Dec 2018 05:58:24 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:34624 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725992AbeLGK6Y (ORCPT ); Fri, 7 Dec 2018 05:58:24 -0500 Received: by mail-lj1-f194.google.com with SMTP id u6-v6so3188651ljd.1; Fri, 07 Dec 2018 02:58:21 -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=GUoyo020/7BIZvMbKzva5ANhccuHEj+8T05zfMoqMeE=; b=Ek9cZ/swgV831GL11fcs5pRo/VUbRKraW3SAj7n0I9R/Qf5ACzaOJ9wdEjwEVIwoId F2PxZ3nTDQ0K/KpdfIrFONItdhBcTawSXIAE1WFdynOQEKTCgqn+kZVtmn3ZhfXLlDlO Q29JPh4gWQFJ45vJ005dvU0219MnXqr32HXGEgOOC2ZaYppMLlmAMkHG+n3gFqlUwpN+ fcYA9vLjr7DKR6OqnHS0OduROdDTmENVFQWAjZVXova1GUCS//Cx+oC1yxibI5xG1tR5 zEEnqQ/ZKm85LHgTFOTuD8yDIKJ+QpuXY9hFbIP+bMKQFm/SCF9JbzSWO0kKGJfhUHKs evhA== 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=GUoyo020/7BIZvMbKzva5ANhccuHEj+8T05zfMoqMeE=; b=Hooxo20vIsccYQCjFU0vLwmMHYf5Zz+CyqcKws5GlcJgOlS+VC5B6OpFdlBfTIPUmx RRwPklEti1OCMiW/s8b9RyePFrJSgadMEOmuONaNNvNlleChme7HPvyU7JraTmqTYI1g J32MZd9azT/wdr86lfQWc9G5S+X2uTKnDdSU/jLsG0EYTj8/elicZiuj62/8cbFD9aSu Q7ml+hFjcvs+CFNvxYyjmWtnk+ltZfrF6e5i2y+wKxsueJofwDzE0wf6J1SMybnNe/qT AEAKpd2WMxFGWuPBWRyRcMXzsWww8tZWF4QP08/aayvrr6CHoGX1/ZD5Lm7CrNUOkdJG s4EA== X-Gm-Message-State: AA+aEWaQnH42ycBmBJFmmQdiNhB98AmdCedBBEw66FFKkq2LtV1lMkxh mHfjt25DL6JFex3c6BmeL7U= X-Google-Smtp-Source: AFSGD/WuDaS2RUpquw9zhrr9UMzZKG1qtsmQktRetVcim3wBmLobXOZKtSzcGIvHozsBfRzcHwkecQ== X-Received: by 2002:a2e:80d3:: with SMTP id r19-v6mr1048293ljg.151.1544180301013; Fri, 07 Dec 2018 02:58:21 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id a20-v6sm523362ljf.28.2018.12.07.02.58.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 02:58:20 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, pawel.mikolaj.chmiel@gmail.com, xc-racer2@live.ca, simon@lineageos.org Subject: [PATCH 1/8] Input: tm2-touchkey: Add support for midas touchkey Date: Fri, 7 Dec 2018 11:58:04 +0100 Message-Id: <20181207105811.1831-2-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207105811.1831-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207105811.1831-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 From: Simon Shields The touchkey on midas boards is almost identical. The only real difference is that it uses the same register for both keycode and base. Signed-off-by: Simon Shields Signed-off-by: Paweł Chmiel --- drivers/input/keyboard/tm2-touchkey.c | 48 ++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 9 deletions(-) diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c index abc266e40e17..37a5ced24009 100644 --- a/drivers/input/keyboard/tm2-touchkey.c +++ b/drivers/input/keyboard/tm2-touchkey.c @@ -22,12 +22,13 @@ #include #include #include +#include #include #include -#define TM2_TOUCHKEY_DEV_NAME "tm2-touchkey" -#define TM2_TOUCHKEY_KEYCODE_REG 0x03 -#define TM2_TOUCHKEY_BASE_REG 0x00 +#define TM2_TOUCHKEY_DEV_NAME "tm2-touchkey" +#define MIDAS_TOUCHKEY_DEV_NAME "midas-touchkey" + #define TM2_TOUCHKEY_CMD_LED_ON 0x10 #define TM2_TOUCHKEY_CMD_LED_OFF 0x20 #define TM2_TOUCHKEY_BIT_PRESS_EV BIT(3) @@ -40,12 +41,31 @@ enum { TM2_TOUCHKEY_KEY_BACK, }; +struct touchkey_variant { + const char *name; + u8 keycode_reg; + u8 base_reg; +}; + struct tm2_touchkey_data { struct i2c_client *client; struct input_dev *input_dev; struct led_classdev led_dev; struct regulator *vdd; struct regulator_bulk_data regulators[2]; + struct touchkey_variant *variant; +}; + +static struct touchkey_variant tm2_touchkey_variant = { + .name = "tm2-touchkey", + .keycode_reg = 0x03, + .base_reg = 0x00, +}; + +static struct touchkey_variant midas_touchkey_variant = { + .name = "midas-touchkey", + .keycode_reg = 0x00, + .base_reg = 0x00, }; static void tm2_touchkey_led_brightness_set(struct led_classdev *led_dev, @@ -66,7 +86,7 @@ static void tm2_touchkey_led_brightness_set(struct led_classdev *led_dev, regulator_set_voltage(touchkey->vdd, volt, volt); i2c_smbus_write_byte_data(touchkey->client, - TM2_TOUCHKEY_BASE_REG, data); + touchkey->variant->base_reg, data); } static int tm2_touchkey_power_enable(struct tm2_touchkey_data *touchkey) @@ -99,7 +119,7 @@ static irqreturn_t tm2_touchkey_irq_handler(int irq, void *devid) int key; data = i2c_smbus_read_byte_data(touchkey->client, - TM2_TOUCHKEY_KEYCODE_REG); + touchkey->variant->keycode_reg); if (data < 0) { dev_err(&touchkey->client->dev, "failed to read i2c data: %d\n", data); @@ -153,6 +173,9 @@ static int tm2_touchkey_probe(struct i2c_client *client, touchkey->client = client; i2c_set_clientdata(client, touchkey); + touchkey->variant = (struct touchkey_variant *) + of_device_get_match_data(&client->dev); + touchkey->regulators[0].supply = "vcc"; touchkey->regulators[1].supply = "vdd"; error = devm_regulator_bulk_get(&client->dev, @@ -187,7 +210,7 @@ static int tm2_touchkey_probe(struct i2c_client *client, return -ENOMEM; } - touchkey->input_dev->name = TM2_TOUCHKEY_DEV_NAME; + touchkey->input_dev->name = touchkey->variant->name; touchkey->input_dev->id.bustype = BUS_I2C; input_set_capability(touchkey->input_dev, EV_KEY, KEY_PHONE); @@ -203,7 +226,7 @@ static int tm2_touchkey_probe(struct i2c_client *client, error = devm_request_threaded_irq(&client->dev, client->irq, NULL, tm2_touchkey_irq_handler, IRQF_ONESHOT, - TM2_TOUCHKEY_DEV_NAME, touchkey); + touchkey->variant->name, touchkey); if (error) { dev_err(&client->dev, "failed to request threaded irq: %d\n", error); @@ -211,7 +234,7 @@ static int tm2_touchkey_probe(struct i2c_client *client, } /* led device */ - touchkey->led_dev.name = TM2_TOUCHKEY_DEV_NAME; + touchkey->led_dev.name = touchkey->variant->name; touchkey->led_dev.brightness = LED_FULL; touchkey->led_dev.max_brightness = LED_ON; touchkey->led_dev.brightness_set = tm2_touchkey_led_brightness_set; @@ -257,12 +280,19 @@ static SIMPLE_DEV_PM_OPS(tm2_touchkey_pm_ops, static const struct i2c_device_id tm2_touchkey_id_table[] = { { TM2_TOUCHKEY_DEV_NAME, 0 }, + { MIDAS_TOUCHKEY_DEV_NAME, 0 }, { }, }; MODULE_DEVICE_TABLE(i2c, tm2_touchkey_id_table); static const struct of_device_id tm2_touchkey_of_match[] = { - { .compatible = "cypress,tm2-touchkey", }, + { + .compatible = "cypress,tm2-touchkey", + .data = &tm2_touchkey_variant, + }, { + .compatible = "cypress,midas-touchkey", + .data = &midas_touchkey_variant, + }, { }, }; MODULE_DEVICE_TABLE(of, tm2_touchkey_of_match); From patchwork Fri Dec 7 10:58:05 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: 10717953 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 6C70318A7 for ; Fri, 7 Dec 2018 10:59:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C1172DA24 for ; Fri, 7 Dec 2018 10:59:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50A2D2E05B; Fri, 7 Dec 2018 10:59:14 +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 E8B942DA24 for ; Fri, 7 Dec 2018 10:59:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725999AbeLGK7H (ORCPT ); Fri, 7 Dec 2018 05:59:07 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:38285 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725997AbeLGK6Y (ORCPT ); Fri, 7 Dec 2018 05:58:24 -0500 Received: by mail-lj1-f193.google.com with SMTP id c19-v6so3180838lja.5; Fri, 07 Dec 2018 02:58:23 -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=5fLoiTVe1PGD4LFoFRq2Qv/NjAagyuB4tnQwb7zM8mU=; b=jz2VwsMBWb5hlNiLzcPHyV0V3ZkNOQfTivPsceawtsb77KnNBPmTdgK9ypS+JwZCs8 pC5Enzfcg5bCmBWn9SmZ0JttUtLO5f64B4Hbge1jGrKZJUVePZUWVDJQhTbZoT6T6bhy twxhf2xfZvDsykOeaP0MQybTwgaCj51syHibQ8ngcK85s5YRJKS3mPS9ciLhUoPS8UQU aI3Y6g+ZrEB7d/qkJ2bn0j2kpdr2SIGgwAmjIEjz/h0FS3sRpLy7vfytBS6re9KY3h1z gSMwNY3w85ZLNYnKWYhe8IrxopWGkt569JvTh/MPxAAD5EKjmD9Ll9GjZw2J+aLn0ESm kCIQ== 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=5fLoiTVe1PGD4LFoFRq2Qv/NjAagyuB4tnQwb7zM8mU=; b=MeRBqVskgLULx3thZ9cRKRMCAQi5OHmp54UFnfl6kxEDUiae9dv5WEHcfiOMu2lGpI k2dvBimj+Oc/2VDmWjqMBSS3FhtpP6mn8ypP/umrREXKXwW4YfHEfK7wfuk0EveiJg5T RJQ4ZIfKpaRJ5T3QedfZsoH70Fp54oPNfc0L8DGby4JYmKueJnie/vDpTINvw5EX7V/C gwQNfl7aWryio6kBuQaFa/ioPhi0loPhXNeUzFW6WMQFY37Hk/BsEUtrWqgdmEQatMYZ rPY06Q6E2F1FP/ZjGCgEMPTiNdoj+WuSrk0wnQg7OcdYKviTlvffxYvpl8rHnUwXk78X 3++g== X-Gm-Message-State: AA+aEWaXEWtHrju8Q1xyoOwW22ddQE/FBBGc4l0hQUGk3Rlkdhs9JFaf 20yg7CBIs0If6srDuCT/f4s= X-Google-Smtp-Source: AFSGD/Wp3twNS6KmHvKQqanoVkO+Bpca1OYp/kk4YFerTEt8UoDLUwDydymm1lkloM1/tEKjA8nXQw== X-Received: by 2002:a2e:b04f:: with SMTP id d15-v6mr1163887ljl.3.1544180302504; Fri, 07 Dec 2018 02:58:22 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id a20-v6sm523362ljf.28.2018.12.07.02.58.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 02:58:21 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, pawel.mikolaj.chmiel@gmail.com, xc-racer2@live.ca, simon@lineageos.org Subject: [PATCH 2/8] Input: dt-bindings: tm2-touchkey: Add support for midas touchkey Date: Fri, 7 Dec 2018 11:58:05 +0100 Message-Id: <20181207105811.1831-3-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207105811.1831-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207105811.1831-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 From: Simon Shields Document compatible for midas touchkey. Signed-off-by: Simon Shields Signed-off-by: Paweł Chmiel Reviewed-by: Rob Herring --- .../devicetree/bindings/input/cypress,tm2-touchkey.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt b/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt index 0c252d9306da..dfb3b9f0ee40 100644 --- a/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt +++ b/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt @@ -1,7 +1,9 @@ Samsung tm2-touchkey Required properties: -- compatible: must be "cypress,tm2-touchkey" +- compatible: + * "cypress,tm2-touchkey" - for the touchkey found on the tm2 board + * "cypress,midas-touchkey" - for the touchkey found on midas boards - reg: I2C address of the chip. - interrupts: interrupt to which the chip is connected (see interrupt binding[0]). From patchwork Fri Dec 7 10:58:06 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: 10717939 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 836DD13BF for ; Fri, 7 Dec 2018 10:58:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7119E2DCE6 for ; Fri, 7 Dec 2018 10:58:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 650122E06A; Fri, 7 Dec 2018 10:58:30 +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 5793E2DCE6 for ; Fri, 7 Dec 2018 10:58:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726094AbeLGK61 (ORCPT ); Fri, 7 Dec 2018 05:58:27 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:39313 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726080AbeLGK61 (ORCPT ); Fri, 7 Dec 2018 05:58:27 -0500 Received: by mail-lj1-f196.google.com with SMTP id t9-v6so3173516ljh.6; Fri, 07 Dec 2018 02:58:24 -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=YslIsTGo9qgmfVXiD3oj00yw3ONTqt+QCNQIbkFOgCc=; b=jqoHnrlFDLed7nsJxaEpkoMtsWhS6Co2usNe6DIeZpXBhQcX1DJCl8nw6c4QKbzzZr XMGyS/0W4hjeIaZSF7FNBeEi6TL0N+Pex1nD/MsATJVZJCzb3hZBP1WxPaPB42QGBlsr yx2kdJWqR/ylz85Oh/eOO0ctcR6cAulf4OYnK0huwEU3QC5CptuF0s3Np8KOYJEOa9mb K2VtPgs5udNzWGWVqYENMFYOV+r1nFVeDdLC8Jr9iA7gUpW32oIbKU4UYC/didIO4tL/ jCG2znXIX+6YoowL6UzkK35tnrYOqUv8iJa3JySl9o6+i0jL2Y3Sco5WJ13mFIkqBZ1A Px2Q== 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=YslIsTGo9qgmfVXiD3oj00yw3ONTqt+QCNQIbkFOgCc=; b=VYmtRIqYsTFP92AJ7vcynXDhWRr/Qwa1YQJ9ISrOfI0WLLh1EMNj8puE1gtu9XX5Yp Q8idA2RYCqXsVJChPqDxIm0Cwld/TGbP/fwZNLJwjllduh9jkvq6mM0+OwBb/kGzzaQk uC9vWpCvUZD1NqacKl1VNbVdNiz8RFj6rElnnVlQUfLhNKmvUvOx4HNA/Q7GnqSPnp7/ 6w64K6RqSraM+1Puf5143bxgKYSoYe7Yw/9cQRE2q8V4BAw8DYUFWSYm9nF1PDB2DVVU wvz2Bn7t6FKQnqdAU6aTh9leqx+4VMD7KWUG6YGtDH7mAmgJCFieinz0mJdgEo0GoqiI SVxw== X-Gm-Message-State: AA+aEWZl8shTNcWoxNYXmGRXoloXG1UplK5sazZXDkx4v/PUnvGND85/ mLeOflkOkuMcIDc3O75Cys8= X-Google-Smtp-Source: AFSGD/Xd0iShYWKJy1TA0nieMvwq5hktlGEVmhdjwT74S5Xd8xzMgeFh25r6SX8yU5GBpFEKOD68zA== X-Received: by 2002:a2e:9655:: with SMTP id z21-v6mr1171955ljh.136.1544180303904; Fri, 07 Dec 2018 02:58:23 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id a20-v6sm523362ljf.28.2018.12.07.02.58.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 02:58:23 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, pawel.mikolaj.chmiel@gmail.com, xc-racer2@live.ca, simon@lineageos.org Subject: [PATCH 3/8] Input: tm2-touchkey: Use predefined device name Date: Fri, 7 Dec 2018 11:58:06 +0100 Message-Id: <20181207105811.1831-4-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207105811.1831-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207105811.1831-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 From: Jonathan Bakker Purely a cosmetic fix, using the names defined earlier Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel --- drivers/input/keyboard/tm2-touchkey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c index 37a5ced24009..cc713b901bf2 100644 --- a/drivers/input/keyboard/tm2-touchkey.c +++ b/drivers/input/keyboard/tm2-touchkey.c @@ -57,13 +57,13 @@ struct tm2_touchkey_data { }; static struct touchkey_variant tm2_touchkey_variant = { - .name = "tm2-touchkey", + .name = TM2_TOUCHKEY_DEV_NAME, .keycode_reg = 0x03, .base_reg = 0x00, }; static struct touchkey_variant midas_touchkey_variant = { - .name = "midas-touchkey", + .name = MIDAS_TOUCHKEY_DEV_NAME, .keycode_reg = 0x00, .base_reg = 0x00, }; From patchwork Fri Dec 7 10:58:07 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: 10717949 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 817FC109C for ; Fri, 7 Dec 2018 10:59:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E9CE2DA24 for ; Fri, 7 Dec 2018 10:59:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 627DB2DB32; Fri, 7 Dec 2018 10:59:04 +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 0D38C2DA24 for ; Fri, 7 Dec 2018 10:59:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725987AbeLGK66 (ORCPT ); Fri, 7 Dec 2018 05:58:58 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:46227 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbeLGK61 (ORCPT ); Fri, 7 Dec 2018 05:58:27 -0500 Received: by mail-lf1-f68.google.com with SMTP id f23so2662453lfc.13; Fri, 07 Dec 2018 02:58:26 -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=iiNySdvKpdqVZthIZ2SEKv6yRudMOPr8qkp6aqwtEDU=; b=EGUWPiUJ5vLhV2r2QgVzTtRuWhddBEGZ1ZSmdDP0uzHNWgVjqlFVf/1APt50eZDgke peMAo4IbOC8TCdJNypovGB1YJ96ppzqAayQ1G3pj8jtUGr1Wj8jDARxebkKoEZb/UGBv OEXr3fI692ntFkBqLKHvr5yVTbWbPhpDUwzz124esyfzGDPM9u7W+U85CuX7le1XPRN9 rNSOUgOwiryd9HfgyHO/yWulpdh/6JpGZF7H6kyruk1pTiZNLGudriXJaAJDjFwE6X8k f3JOLHqlA5k/U6XWj7KdNHD120YS5xN+hG8sDr/43bSUMbOwdPEWOwviUHfv8l+ZjwHF GvVw== 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=iiNySdvKpdqVZthIZ2SEKv6yRudMOPr8qkp6aqwtEDU=; b=jMe2ZegPAH5PmLE5IhtVcx5zBD7D7Z/p7qwXgaUvRXG9ZFlEk4mvIRe5jY4TXXX0UY MGm17jh54WWWkpiTsQq2jH0dl6bsLxA/pzHcmqeK6ln7lxFeLnK50B8QAjJgUePWCFWm AceJUsItuPOv2PLk4/mQt1ZHFql6t/paOedHGV9o/isu9WyS+UANVA0on/bGNKk2vRWA wMcBjLFjQW+bz62PKd4GlTas5y8sJHp2wSRM0ZqNSN7gxyQNmDGFcA2ItXuU8bZUnWmO TA/3rbP0HHxUU9a1qxpV7C+FKf7vfL+I3RUG4DGGvGzbnEBI8HYe/9Pj0+ppW8ha/4ne cIjg== X-Gm-Message-State: AA+aEWY9BcvW9fweIkBdsSpFHB0X+80SGfDPTm2XMDkq5KXov1Ze0Qw2 umWi6FXkGFFLpUrgkmODulc= X-Google-Smtp-Source: AFSGD/V0KyDsG5eDwdXFS8YyypebvaADggIfJiZTg0aj3TTrIgq51PDJ7vOjHqGkVByN4ac7ocemLA== X-Received: by 2002:a19:a86:: with SMTP id 128mr955668lfk.139.1544180305167; Fri, 07 Dec 2018 02:58:25 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id a20-v6sm523362ljf.28.2018.12.07.02.58.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 02:58:24 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, pawel.mikolaj.chmiel@gmail.com, xc-racer2@live.ca, simon@lineageos.org Subject: [PATCH 4/8] Input: tm2-touchkey: Correct initial brightness Date: Fri, 7 Dec 2018 11:58:07 +0100 Message-Id: <20181207105811.1831-5-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207105811.1831-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207105811.1831-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 From: Jonathan Bakker Tm2-touchkey don't have brightness levels, but only on/off states, so replace LED_FULL with LED_ON. Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel --- drivers/input/keyboard/tm2-touchkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c index cc713b901bf2..a73894b8dede 100644 --- a/drivers/input/keyboard/tm2-touchkey.c +++ b/drivers/input/keyboard/tm2-touchkey.c @@ -235,7 +235,7 @@ static int tm2_touchkey_probe(struct i2c_client *client, /* led device */ touchkey->led_dev.name = touchkey->variant->name; - touchkey->led_dev.brightness = LED_FULL; + touchkey->led_dev.brightness = LED_ON; touchkey->led_dev.max_brightness = LED_ON; touchkey->led_dev.brightness_set = tm2_touchkey_led_brightness_set; From patchwork Fri Dec 7 10:58:08 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: 10717947 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 58D7213BF for ; Fri, 7 Dec 2018 10:58:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44A122DA24 for ; Fri, 7 Dec 2018 10:58:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3553D2DB32; Fri, 7 Dec 2018 10:58:55 +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 B57402DA24 for ; Fri, 7 Dec 2018 10:58:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726080AbeLGK6a (ORCPT ); Fri, 7 Dec 2018 05:58:30 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:32845 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725992AbeLGK6a (ORCPT ); Fri, 7 Dec 2018 05:58:30 -0500 Received: by mail-lj1-f195.google.com with SMTP id v1-v6so3215272ljd.0; Fri, 07 Dec 2018 02:58:27 -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=knG6SyfDCGJn7gk77p8M/RfgY6AhBS/jOJor+ETKwuw=; b=uis4/8d3PSYf/KxJPBFPuq9zQk3n9I1r43bfgu34jnZp3cClc8v7T0hFu/ZmO74kCG +z2odhEXVfiUA//0yijq0pqdjlX82wEGazAVERPdykzpT6cjeo2C3ZAu5e1TgC8w90K/ yl+1zI7nmr04kclTC1N4IHQLhTnucirn6ogWZgWYaH9zfoCom0vFodXEGrSP4mSt/e/8 wN56qiGqB/Q0k8eTsbZMM5gGl6qYbQoxg9g2YPs2c9ZEwrVP7k6xEldGNrKnc+O3+vOZ tF7bgt4vm4XOC9zWhkZqXtuSAeTekWtYSp9D10x6Az0eDFe9dpmWN/2OMGbKnFp6UPIw Xbhg== 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=knG6SyfDCGJn7gk77p8M/RfgY6AhBS/jOJor+ETKwuw=; b=JD3uRaMdnuk84MaRZ0R85kJ9lwXPieCmDdiZsBwmA4zI2UdRdQMQQIEqoGHQbJx90j uK5SBJAxJGpaaWWBHNOiiEwpixQQiyNwiXhSOjMrL0u0x/IxunhGPFGPTuDJNviLzTa7 BPfP1s1WqBpsePLLhnyw1H0Wc4vfjTYVoqEnZJ3n85XAt5x0kbo5JVgskeeQcMPmCyWk XNwwKGHA7EpK7b3Ycs00+mZX2Gtc9hQK0F5pecd9KQDq/idFyQUp/ADexl8tAUjnxNyC fBNO0bCqpkYUzKhv33JbF21JBqfsOl/KUyqgsTZOngnQl1PTvv8j+QhDidjEknZc5OLb N2/g== X-Gm-Message-State: AA+aEWZ1Lb3e/aiXiL0zZCUqVXm8HnBsKqh5vPT2h/x/+oEtf32TNWNU NtZTqjckPb6I+aA/S1cXOFk= X-Google-Smtp-Source: AFSGD/Wk8R/X1JZz5dmYqkGgc5MPuZ4AupG3QqXjIRee+wlCAt+xQqCeYlFddi77aNdVpzyIvwRuYg== X-Received: by 2002:a2e:9356:: with SMTP id m22-v6mr1048761ljh.135.1544180306549; Fri, 07 Dec 2018 02:58:26 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id a20-v6sm523362ljf.28.2018.12.07.02.58.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 02:58:25 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, pawel.mikolaj.chmiel@gmail.com, xc-racer2@live.ca, simon@lineageos.org Subject: [PATCH 5/8] Input: tm2-touchkey: Allow specifying custom keycodes Date: Fri, 7 Dec 2018 11:58:08 +0100 Message-Id: <20181207105811.1831-6-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207105811.1831-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207105811.1831-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 From: Jonathan Bakker Not all devices use the same keycodes in the same order Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel --- drivers/input/keyboard/tm2-touchkey.c | 49 +++++++++++++++------------ 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c index a73894b8dede..ebc275ab8ad1 100644 --- a/drivers/input/keyboard/tm2-touchkey.c +++ b/drivers/input/keyboard/tm2-touchkey.c @@ -36,11 +36,6 @@ #define TM2_TOUCHKEY_LED_VOLTAGE_MIN 2500000 #define TM2_TOUCHKEY_LED_VOLTAGE_MAX 3300000 -enum { - TM2_TOUCHKEY_KEY_MENU = 0x1, - TM2_TOUCHKEY_KEY_BACK, -}; - struct touchkey_variant { const char *name; u8 keycode_reg; @@ -54,6 +49,8 @@ struct tm2_touchkey_data { struct regulator *vdd; struct regulator_bulk_data regulators[2]; struct touchkey_variant *variant; + u8 keycodes[4]; + int num_keycodes; }; static struct touchkey_variant tm2_touchkey_variant = { @@ -116,7 +113,8 @@ static irqreturn_t tm2_touchkey_irq_handler(int irq, void *devid) { struct tm2_touchkey_data *touchkey = devid; int data; - int key; + int index; + int i; data = i2c_smbus_read_byte_data(touchkey->client, touchkey->variant->keycode_reg); @@ -126,26 +124,20 @@ static irqreturn_t tm2_touchkey_irq_handler(int irq, void *devid) goto out; } - switch (data & TM2_TOUCHKEY_BIT_KEYCODE) { - case TM2_TOUCHKEY_KEY_MENU: - key = KEY_PHONE; - break; - - case TM2_TOUCHKEY_KEY_BACK: - key = KEY_BACK; - break; - - default: + index = (data & TM2_TOUCHKEY_BIT_KEYCODE) - 1; + if (index < 0 || index >= touchkey->num_keycodes) { dev_warn(&touchkey->client->dev, - "unhandled keycode, data %#02x\n", data); + "invalid keycode index %d\n", index); goto out; } if (data & TM2_TOUCHKEY_BIT_PRESS_EV) { - input_report_key(touchkey->input_dev, KEY_PHONE, 0); - input_report_key(touchkey->input_dev, KEY_BACK, 0); + for (i = 0; i < touchkey->num_keycodes; i++) + input_report_key(touchkey->input_dev, + touchkey->keycodes[i], 0); } else { - input_report_key(touchkey->input_dev, key, 1); + input_report_key(touchkey->input_dev, + touchkey->keycodes[index], 1); } input_sync(touchkey->input_dev); @@ -157,8 +149,10 @@ static irqreturn_t tm2_touchkey_irq_handler(int irq, void *devid) static int tm2_touchkey_probe(struct i2c_client *client, const struct i2c_device_id *id) { + struct device_node *np = client->dev.of_node; struct tm2_touchkey_data *touchkey; int error; + int i; if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA)) { @@ -189,6 +183,16 @@ static int tm2_touchkey_probe(struct i2c_client *client, /* Save VDD for easy access */ touchkey->vdd = touchkey->regulators[1].consumer; + touchkey->num_keycodes = of_property_read_variable_u8_array(np, + "keycodes", touchkey->keycodes, 0, + ARRAY_SIZE(touchkey->keycodes)); + if (touchkey->num_keycodes <= 0) { + /* default keycodes */ + touchkey->keycodes[0] = KEY_PHONE; + touchkey->keycodes[1] = KEY_BACK; + touchkey->num_keycodes = 2; + } + error = tm2_touchkey_power_enable(touchkey); if (error) { dev_err(&client->dev, "failed to power up device: %d\n", error); @@ -213,8 +217,9 @@ static int tm2_touchkey_probe(struct i2c_client *client, touchkey->input_dev->name = touchkey->variant->name; touchkey->input_dev->id.bustype = BUS_I2C; - input_set_capability(touchkey->input_dev, EV_KEY, KEY_PHONE); - input_set_capability(touchkey->input_dev, EV_KEY, KEY_BACK); + for (i = 0; i < touchkey->num_keycodes; i++) + input_set_capability(touchkey->input_dev, EV_KEY, + touchkey->keycodes[i]); error = input_register_device(touchkey->input_dev); if (error) { From patchwork Fri Dec 7 10:58:09 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: 10717941 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 08BEB13BF for ; Fri, 7 Dec 2018 10:58:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB5BE2E06A for ; Fri, 7 Dec 2018 10:58:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF2272E05B; Fri, 7 Dec 2018 10:58:32 +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 8CFF72E05B for ; Fri, 7 Dec 2018 10:58:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726120AbeLGK6b (ORCPT ); Fri, 7 Dec 2018 05:58:31 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:39161 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726100AbeLGK6a (ORCPT ); Fri, 7 Dec 2018 05:58:30 -0500 Received: by mail-lf1-f66.google.com with SMTP id n18so2703234lfh.6; Fri, 07 Dec 2018 02:58:28 -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=hU25609CTMwaZL7M276wpeBmUwTI5685ZpsMHwHFloA=; b=ERfc6a36IX4ymThyajYuTYb4IV4AKP8KDgn+DMNKhc91iBDztnwLGKiXpd3oITtezP CH5Nk+U92gsdRjmthkAvwCtg3T7kiynGW8pdrqrQyfNsFON+adr55J87JNl8etKGt1Vp QQ4ObIX1MbtekNlaRZsD5lctaaj9Vx6kVvjZ5vJTg2/T7U3qRvYNhS8ktCN8D2W0FWKy 03O2wlyWhfIDf4JcNnQH6WKMvkwUIT5b8HraK49VCho1nlOX9qydGaySeTb7+HwLKHD2 L2M8OM7qtSMll+EUMciFAN0+SsnBuaIzd+dSZf2l+eVfomNOOK/6XcryRumnhdA9bFrU AN8A== 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=hU25609CTMwaZL7M276wpeBmUwTI5685ZpsMHwHFloA=; b=klTkexfs6T5vayOOx11pFYMb6Jz2BYynFYeatYUN0MISfzlvAxHhD49+IV2uYe/Ore D+4AEtRMKVoNoZW3IKQNHfKX6D/01JAROW6uHN0mM+/wEfg4dXa4q5a9khFSnUpCCih7 Iv+wLFl0fRvYVk+Tx4FupWtMCU+2jiV/7eF2Xf6v9cr4d8HN2xDJFnpv2rJAumCLmqgH YKfAVoU+6DKkOsmZA/vSxxYfmWNpZvZcTrikTrOrvEiAxDYDFSYxIM7jdl9acj7TtChG jl3BsiOfZWV5B9yHMGo4xrBIyeopFeGjE0i6Op/57Bp8hfeXPdhrlMxLrSDweYlFeV9d /4nw== X-Gm-Message-State: AA+aEWbSdRvObAfQ/CO1cV2rLE3OPVDKmNgGVmDIZxHOLi78LGWq5x9f mwSKDlIvQdeQfxeOqNg3HKQ= X-Google-Smtp-Source: AFSGD/W80DoRSLcZ4id9JccYo5RbZOQgrClq+v+O8EbzS1VIL/NAbYAq5NKSIOJ4VmOrM4wr8Ib59A== X-Received: by 2002:ac2:4116:: with SMTP id b22mr1080137lfi.19.1544180308024; Fri, 07 Dec 2018 02:58:28 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id a20-v6sm523362ljf.28.2018.12.07.02.58.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 02:58:27 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, pawel.mikolaj.chmiel@gmail.com, xc-racer2@live.ca, simon@lineageos.org Subject: [PATCH 6/8] Input: dt-bindings: tm2-touchkey: Document new keycodes property Date: Fri, 7 Dec 2018 11:58:09 +0100 Message-Id: <20181207105811.1831-7-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207105811.1831-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207105811.1831-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 From: Jonathan Bakker Document new optional property for setting custom keycodes. Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel --- .../devicetree/bindings/input/cypress,tm2-touchkey.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt b/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt index dfb3b9f0ee40..3b54d997b8de 100644 --- a/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt +++ b/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt @@ -10,6 +10,9 @@ Required properties: - vcc-supply : internal regulator output. 1.8V - vdd-supply : power supply for IC 3.3V +Optional properties: +- keycodes: array of keycodes (max 4), default KEY_PHONE and KEY_BACK + [0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt Example: @@ -23,5 +26,6 @@ Example: interrupts = <2 IRQ_TYPE_EDGE_FALLING>; vcc-supply=<&ldo32_reg>; vdd-supply=<&ldo33_reg>; + keycodes = /bits/ 8 ; }; }; From patchwork Fri Dec 7 10:58:10 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: 10717943 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 71BC7109C for ; Fri, 7 Dec 2018 10:58:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 607352E05B for ; Fri, 7 Dec 2018 10:58:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 547DF2E078; Fri, 7 Dec 2018 10:58:35 +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 CEDAF2E05B for ; Fri, 7 Dec 2018 10:58:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726137AbeLGK6d (ORCPT ); Fri, 7 Dec 2018 05:58:33 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:42072 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726124AbeLGK6d (ORCPT ); Fri, 7 Dec 2018 05:58:33 -0500 Received: by mail-lj1-f195.google.com with SMTP id l15-v6so3155846lja.9; Fri, 07 Dec 2018 02:58:30 -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=6tMGx8zhco17hmo8awxHrpDIsJFqu4IFXryZSTaXOr8=; b=NSi5teGKjXgiNTQxbOGvbOMqSUhf2oEOFDwuQElHjKx850YBGeHLvX5nDRA3VFsq0z MSlx946Jex0LBpJahQzHbdkG7BAwTuq+UsZq1torjreTjZo7e/B8NZxLxgUcZdvYUYtS chraWA6JAHo5F96+ylMGTQdgP/MJjMQs2QgG3I3dEsnQ7WopT5ZcZn0oxM3ULxV2+to/ /TTBz8gLg6xHvw+tnxA5+0vXKoAunTTBQEwpTtyVbo6tRhM4zvQ7MRR7BYHfKGdo2Orp Brm7ENfs68GnI6Bb7x8V5AZ9KqnUPdMmibCfdG2gXAhh9GirAc9qHAXHaFjaxOwgOel+ QakQ== 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=6tMGx8zhco17hmo8awxHrpDIsJFqu4IFXryZSTaXOr8=; b=ukI3BRF5cFzn5ucg+CWizIWD8xqADyPAMScjXEgP5dhU85vlqskY/QdVz9M1GMFRIP ykq6f3WtW5YTRLUU3FUxY8Hp5KJc4FCPldMF1fzAf5J38E9C2RMbOKAKVvitXcF4ZFkA +3bCerZG1B7Ca9IDChn7z6UTu/muV+8lLUOSLg7mWoLOxh5eWds4dFerNLYHuaIANuVl IocMAPCor0uxx8kD8ICq7vx3SxDjbaMZhq128EU85wbyH2Y90TRWOHe+7GC+0vZcld85 ODCOqe0ikGFrhvHVgOSWcRzQnF+HZrlJB03nufaQFn8XmO1u/tHhcSM0QVr2TEDs4Bfz +RwQ== X-Gm-Message-State: AA+aEWZ2MOl0zL+bIMuLJlZ+yIYgiC1/9hjNQgZgB4uLPKk0Yuuu9d8c xR1p62jaTMaYib70esHXEqA= X-Google-Smtp-Source: AFSGD/WXh4+2rS9TVJQ1dicR0XkRrL74WyHW/BOwYvYo7xK+3Gv3p77xMt4Q2dfaEd2yruAzNvz9BA== X-Received: by 2002:a2e:449c:: with SMTP id b28-v6mr1032863ljf.47.1544180309456; Fri, 07 Dec 2018 02:58:29 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id a20-v6sm523362ljf.28.2018.12.07.02.58.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 02:58:28 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, pawel.mikolaj.chmiel@gmail.com, xc-racer2@live.ca, simon@lineageos.org Subject: [PATCH 7/8] Input: tm2-touchkey: Add support for aries touchkey variant Date: Fri, 7 Dec 2018 11:58:10 +0100 Message-Id: <20181207105811.1831-8-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207105811.1831-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207105811.1831-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 From: Jonathan Bakker The touchkey variant found on aries board is slighty different, it uses a fixed regulator and writes/read to the same place Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel --- drivers/input/keyboard/tm2-touchkey.c | 56 +++++++++++++++++++++++---- 1 file changed, 49 insertions(+), 7 deletions(-) diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c index ebc275ab8ad1..6f1235183c21 100644 --- a/drivers/input/keyboard/tm2-touchkey.c +++ b/drivers/input/keyboard/tm2-touchkey.c @@ -28,7 +28,10 @@ #define TM2_TOUCHKEY_DEV_NAME "tm2-touchkey" #define MIDAS_TOUCHKEY_DEV_NAME "midas-touchkey" +#define ARIES_TOUCHKEY_DEV_NAME "aries-touchkey" +#define ARIES_TOUCHKEY_CMD_LED_ON 0x1 +#define ARIES_TOUCHKEY_CMD_LED_OFF 0x2 #define TM2_TOUCHKEY_CMD_LED_ON 0x10 #define TM2_TOUCHKEY_CMD_LED_OFF 0x20 #define TM2_TOUCHKEY_BIT_PRESS_EV BIT(3) @@ -40,6 +43,10 @@ struct touchkey_variant { const char *name; u8 keycode_reg; u8 base_reg; + u8 cmd_led_on; + u8 cmd_led_off; + bool no_reg; + bool fixed_regulator; }; struct tm2_touchkey_data { @@ -57,12 +64,24 @@ static struct touchkey_variant tm2_touchkey_variant = { .name = TM2_TOUCHKEY_DEV_NAME, .keycode_reg = 0x03, .base_reg = 0x00, + .cmd_led_on = TM2_TOUCHKEY_CMD_LED_ON, + .cmd_led_off = TM2_TOUCHKEY_CMD_LED_OFF, }; static struct touchkey_variant midas_touchkey_variant = { .name = MIDAS_TOUCHKEY_DEV_NAME, .keycode_reg = 0x00, .base_reg = 0x00, + .cmd_led_on = TM2_TOUCHKEY_CMD_LED_ON, + .cmd_led_off = TM2_TOUCHKEY_CMD_LED_OFF, +}; + +static struct touchkey_variant aries_touchkey_variant = { + .name = ARIES_TOUCHKEY_DEV_NAME, + .no_reg = true, + .fixed_regulator = true, + .cmd_led_on = ARIES_TOUCHKEY_CMD_LED_ON, + .cmd_led_off = ARIES_TOUCHKEY_CMD_LED_OFF, }; static void tm2_touchkey_led_brightness_set(struct led_classdev *led_dev, @@ -75,15 +94,20 @@ static void tm2_touchkey_led_brightness_set(struct led_classdev *led_dev, if (brightness == LED_OFF) { volt = TM2_TOUCHKEY_LED_VOLTAGE_MIN; - data = TM2_TOUCHKEY_CMD_LED_OFF; + data = touchkey->variant->cmd_led_off; } else { volt = TM2_TOUCHKEY_LED_VOLTAGE_MAX; - data = TM2_TOUCHKEY_CMD_LED_ON; + data = touchkey->variant->cmd_led_on; } - regulator_set_voltage(touchkey->vdd, volt, volt); - i2c_smbus_write_byte_data(touchkey->client, - touchkey->variant->base_reg, data); + if (!touchkey->variant->fixed_regulator) + regulator_set_voltage(touchkey->vdd, volt, volt); + + if (touchkey->variant->no_reg) + i2c_smbus_write_byte(touchkey->client, data); + else + i2c_smbus_write_byte_data(touchkey->client, + touchkey->variant->base_reg, data); } static int tm2_touchkey_power_enable(struct tm2_touchkey_data *touchkey) @@ -116,8 +140,11 @@ static irqreturn_t tm2_touchkey_irq_handler(int irq, void *devid) int index; int i; - data = i2c_smbus_read_byte_data(touchkey->client, - touchkey->variant->keycode_reg); + if (touchkey->variant->no_reg) + data = i2c_smbus_read_byte(touchkey->client); + else + data = i2c_smbus_read_byte_data(touchkey->client, + touchkey->variant->keycode_reg); if (data < 0) { dev_err(&touchkey->client->dev, "failed to read i2c data: %d\n", data); @@ -143,6 +170,14 @@ static irqreturn_t tm2_touchkey_irq_handler(int irq, void *devid) input_sync(touchkey->input_dev); out: + if (touchkey->variant->fixed_regulator && + data & TM2_TOUCHKEY_BIT_PRESS_EV) { + /* touch turns backlight on, so make sure we're in sync */ + if (touchkey->led_dev.brightness == LED_OFF) + tm2_touchkey_led_brightness_set(&touchkey->led_dev, + LED_OFF); + } + return IRQ_HANDLED; } @@ -251,6 +286,9 @@ static int tm2_touchkey_probe(struct i2c_client *client, return error; } + if (touchkey->variant->fixed_regulator) + tm2_touchkey_led_brightness_set(&touchkey->led_dev, LED_ON); + return 0; } @@ -286,6 +324,7 @@ static SIMPLE_DEV_PM_OPS(tm2_touchkey_pm_ops, static const struct i2c_device_id tm2_touchkey_id_table[] = { { TM2_TOUCHKEY_DEV_NAME, 0 }, { MIDAS_TOUCHKEY_DEV_NAME, 0 }, + { ARIES_TOUCHKEY_DEV_NAME, 0 }, { }, }; MODULE_DEVICE_TABLE(i2c, tm2_touchkey_id_table); @@ -297,6 +336,9 @@ static const struct of_device_id tm2_touchkey_of_match[] = { }, { .compatible = "cypress,midas-touchkey", .data = &midas_touchkey_variant, + }, { + .compatible = "cypress,aries-touchkey", + .data = &aries_touchkey_variant, }, { }, }; From patchwork Fri Dec 7 10:58:11 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: 10717945 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 872C213BF for ; Fri, 7 Dec 2018 10:58:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74B522DB11 for ; Fri, 7 Dec 2018 10:58:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 669852DB4A; Fri, 7 Dec 2018 10:58:50 +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 14EAE2DB11 for ; Fri, 7 Dec 2018 10:58:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726140AbeLGK6e (ORCPT ); Fri, 7 Dec 2018 05:58:34 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:40413 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726126AbeLGK6d (ORCPT ); Fri, 7 Dec 2018 05:58:33 -0500 Received: by mail-lj1-f193.google.com with SMTP id n18-v6so3170581lji.7; Fri, 07 Dec 2018 02:58:31 -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=YPVI7ddGXHL/sI3LM7P/pieE7PZRuOllK+/qgFw2o3c=; b=edA8xuaBfJ7ZjqT6mf607UJU6PslZiLYY94/NRu4lJykOjbjR0Vjpx8VZmniSLwJFH e3QL6gTdR2n0mWP7fWbCJvrmZynofHOLWogzsUrlD/J+azJ2UDbYSpbI3SeO7fs+WEfJ 1k8n0y/6soev/AFRKMsVghr3gbhW64LND1+xA+wQRQAqn7aH6O8ILtrCtCHqMgE+K5yR yUgnXjrcFyEFQLCA/LUISRkKZvKbGoIj3U0aGNA4JRYXajwCsGzXc9cy0VmxY5wyC3d8 3aEEGv6AdttyMadg7JZCOjhnSEID7r3T9H/0l8GgAJMmqBiR3tYlarhasMEy4eIkb0a0 Q1sw== 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=YPVI7ddGXHL/sI3LM7P/pieE7PZRuOllK+/qgFw2o3c=; b=Y6heh3JhVV1NdDEk7UdUpt+jW4/qNYE1LQMSoinpKqvPAkAkqv6cuadrtlawcld6Ip gLQmasOY26dhJlcd62fLPEQEiniyFE3nkt6WVpYbD/591woIawZNjFmH6llNe9Ceb/n2 9F7vKrMFTkRQ/OMDvUMPKLt804zQLPK0tAjto7xrDmgEtjJptYMMWZl3E0822UeucQqK 4blhmaDLhBJEeD/tGNXrl/lPOdCeaXcate24EmV9iVNejmqcr7eH4KXECOK8SVAQrpse GLBwJSS3KZ0Khp1IJFMnVnC36rsY5mfi0Bd2FOpebUucnxb+69HQILcfaXaMtEEsB4eT LybQ== X-Gm-Message-State: AA+aEWaNHQ2nLX6Y+qTt499g8MlGfrC1bglUy2npr6OgSPSrsQ+qgtCk OUWKzNSUa8qMTjwCfojPmes= X-Google-Smtp-Source: AFSGD/Vqf5bmnnG/s/gAGo+cvOvunecLn0S1Vx0OD2bMUQby6DWb9CWFXzTsdJw93oSdG2oKwIjqQA== X-Received: by 2002:a2e:458b:: with SMTP id s133-v6mr1027901lja.170.1544180310849; Fri, 07 Dec 2018 02:58:30 -0800 (PST) Received: from localhost.localdomain ([2a02:a315:5445:5300:74d5:51ba:2673:f3f4]) by smtp.googlemail.com with ESMTPSA id a20-v6sm523362ljf.28.2018.12.07.02.58.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 02:58:30 -0800 (PST) From: =?utf-8?q?Pawe=C5=82_Chmiel?= To: dmitry.torokhov@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com Cc: devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, pawel.mikolaj.chmiel@gmail.com, xc-racer2@live.ca, simon@lineageos.org Subject: [PATCH 8/8] Input: dt-bindings: tm2-touchkey: Add support for aries touchkey Date: Fri, 7 Dec 2018 11:58:11 +0100 Message-Id: <20181207105811.1831-9-pawel.mikolaj.chmiel@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207105811.1831-1-pawel.mikolaj.chmiel@gmail.com> References: <20181207105811.1831-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 From: Jonathan Bakker Document compatible for aries touchkey. Signed-off-by: Jonathan Bakker Signed-off-by: Paweł Chmiel Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt b/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt index 3b54d997b8de..c518125d16f5 100644 --- a/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt +++ b/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt @@ -4,6 +4,7 @@ Required properties: - compatible: * "cypress,tm2-touchkey" - for the touchkey found on the tm2 board * "cypress,midas-touchkey" - for the touchkey found on midas boards + * "cypress,aries-touchkey" - for the touchkey found on aries boards - reg: I2C address of the chip. - interrupts: interrupt to which the chip is connected (see interrupt binding[0]).