From nobody Sat Sep 21 20:05:50 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 216C4C433EF for ; Wed, 20 Jul 2022 14:48:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236525AbiGTOss (ORCPT ); Wed, 20 Jul 2022 10:48:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235146AbiGTOsm (ORCPT ); Wed, 20 Jul 2022 10:48:42 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3533E528AA for ; Wed, 20 Jul 2022 07:48:41 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id u5so3417709wrm.4 for ; Wed, 20 Jul 2022 07:48:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:date:subject:mime-version:content-transfer-encoding:message-id :references:in-reply-to:to:cc; bh=bLWM+s+iR5LdVaHPuafu7iCm3mwz2NHAzkIzkY8xmTY=; b=3o97zfA5+8dQXwtwy7pQ9pIIsD5FJ3qzv88L5rTytIICFhHWbxdWnJ9vUD26bICVLZ b4WQu8J+7rgfsC3O53slfyN9BObsbC0xNBezoPWL6JvxhPsCac/td0xgxZAAV2A6TtyA 4fLEJ1TIJRgwWxfwo+JPQdzaQiqGUbTZbTFh57fmlNNc7wH3Am48OgcX1yT5GO2Ph5ep jLuFQRALqw50jBJQb7SNOjZbTZkmbsZP7i7I2SZ8jlE20tl3ya59X7uUoVYLB/OxgXWY YVKnie59wwIK2I5VIWeQ+ESe12NplRAeK0z7sxIO0TGu4ZME7CKjxHvvEgNtfeuQeO2c 1JMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version :content-transfer-encoding:message-id:references:in-reply-to:to:cc; bh=bLWM+s+iR5LdVaHPuafu7iCm3mwz2NHAzkIzkY8xmTY=; b=tqq1/h8NYRZKCwRWbWeMpLx7B24LRv/iVulEI997cVe/2SjqoYQFnbBCl0b61hkedp 20LNZop3iBN1KroRcIeNeqP8BSEaQ9n/bVlJaUftbG5X1KyyPyCIRtkflic2LBIxuoWj RFTAlE442YhebiaXZ64/EFxyUACw08AY9ENl8BDTn6P93RBoP3SIisaz8ZjKvp1OXlOV 5phd0ldiZkoz2zLMcqZBw5mS4+aHh/+iMZHHm1zeUyf0afNDpt5Wo3/ktYIlBqEieDxZ Tul5LHzs2qomuW9jABovRKn3/AJYLcMC5gjPuGMtM7iMbKmatZOCUfvp+oAS8p970+Y5 aiCg== X-Gm-Message-State: AJIora8Ie+gRqzBfW0phdgmK87kX7er67l1G39mJCZg4x6qS3kI81ve2 ZFPC4OuAxBp0KxNY8q7kr5msOy+7bKa8Fg== X-Google-Smtp-Source: AGRyM1uqyELZOTi1y1+BWMg0rNkGod1uVK9t35VqzqBXcj/DigJ522rSj8SmtDKiiJo4GtoMoIymsA== X-Received: by 2002:a5d:6110:0:b0:21e:4fe4:f7ba with SMTP id v16-20020a5d6110000000b0021e4fe4f7bamr727919wrt.69.1658328519755; Wed, 20 Jul 2022 07:48:39 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb19:85e6:1900:c639:22f8:bed9:44dd]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm3321121wmq.7.2022.07.20.07.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 07:48:39 -0700 (PDT) From: Mattijs Korpershoek Date: Wed, 20 Jul 2022 16:48:37 +0200 Subject: [PATCH v1 1/6] MAINTAINERS: input: add mattijs for mt6779-keypad MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220720-mt8183-keypad-v1-1-ef9fc29dbff4@baylibre.com> References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Mattijs Korpershoek , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0-dev-54fef Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As stated in [1]: Fengping has no longer interest and time to maintain this driver so he agreed to transfer maintainership over to me. Add a dedicated maintainer entry as well for the driver to make sure that I can help with patch reviews. [1] https://lore.kernel.org/r/20220421140255.2781505-1-mkorpershoek@baylibr= e.com Signed-off-by: Mattijs Korpershoek diff --git a/MAINTAINERS b/MAINTAINERS index 264e7a72afd6..f7a0bae74dc8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12771,6 +12771,12 @@ S: Supported F: Documentation/devicetree/bindings/media/mediatek-jpeg-*.yaml F: drivers/media/platform/mediatek/jpeg/ =20 +MEDIATEK KEYPAD DRIVER +M: Mattijs Korpershoek +S: Supported +F: Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml +F: drivers/input/keyboard/mt6779-keypad.c + MEDIATEK MDP DRIVER M: Minghsiu Tsai M: Houlong Wei --=20 b4 0.10.0-dev-54fef From nobody Sat Sep 21 20:05:50 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CAB5BCCA483 for ; Wed, 20 Jul 2022 14:48:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238183AbiGTOsx (ORCPT ); Wed, 20 Jul 2022 10:48:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235930AbiGTOsq (ORCPT ); Wed, 20 Jul 2022 10:48:46 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 209B951A2E for ; Wed, 20 Jul 2022 07:48:42 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id u5so3417758wrm.4 for ; Wed, 20 Jul 2022 07:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:date:subject:mime-version:content-transfer-encoding:message-id :references:in-reply-to:to:cc; bh=CQqnkWpbbaS2vb+KWbLHEgGJa35COvg0f6M4mKs8LZA=; b=gM4/9BiXFiOOF1pc8rgeisC4TUSBONj/s9Sy2t01T6VAZqA0lBUcN3sRDHFYbZtOI6 fPmNsPEJ99S3Xd0i+4MxIwLP5upJaJfO9xo8gZuMcpnlDLuIz1SraiwzqYZDA8OcCPB0 7ZrIqTKhUJwbVIgRP+eHTW+mKi90Rke39pJ+cvi96yAS1ymoDAexRKFyNVLl2qSyWXpg hXdJtfEzbiPVk3uYcg+8IGhNTtPgNFv6wotdrb/3sYMTJ3tjSrWC5Ej/UN0o16ah9Pto M0IDd6ZuZmpMsLe/MKChPecYegGtL3KV4ugh9UxiL0g3mH1AJ1Gv17vZzYAkKPQ5+obJ tNig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version :content-transfer-encoding:message-id:references:in-reply-to:to:cc; bh=CQqnkWpbbaS2vb+KWbLHEgGJa35COvg0f6M4mKs8LZA=; b=DhbrhUgzxPXzc+VqMwDZ3kuXBJMmBtfSsj2GoSIOoBVhE2fk/TQLPwmXsx3S9z/e8F 5PPBBuGUxHKR27n7u+lN1ZdKEqdfZGSpUeGL440mlB7JOdpBY0pWsgCTepMvptayF75c O4e/pEbfqzqFYbxt+jGLb+chi8R5A2xCEODKebNITdoEoGZgUjEDLr51KAX9swcJLNzd IFN1Zfu6IS84PaPR0hMycYbztMXCrmY9Mj5zBSBoGrZU3uV6nDKlFBNa2otVBG/Zkr3Z wOkmmWCCOH7TtWG6GWYf8C7Qcw4WCRuTD3hSiHMdk/15bUedn1O/Y8zDMsooCwQmybJa oLDQ== X-Gm-Message-State: AJIora9umhAvw1z8K2J3ASw6DgyoTJLTgTTG75kaWrWINewZ90XA3o9v pL0WuM6+pLoCwiHuVBfae57X29D5GYSh+g== X-Google-Smtp-Source: AGRyM1vSS3WWayKFuKSqLFjnoDRL0BND5b5er92x5l1u2SV4uA4ZpHgfX/joTCI73kGMN0viOyARJQ== X-Received: by 2002:adf:e911:0:b0:21e:3a7b:495c with SMTP id f17-20020adfe911000000b0021e3a7b495cmr6677995wrm.388.1658328520469; Wed, 20 Jul 2022 07:48:40 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb19:85e6:1900:c639:22f8:bed9:44dd]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm3321121wmq.7.2022.07.20.07.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 07:48:40 -0700 (PDT) From: Mattijs Korpershoek Date: Wed, 20 Jul 2022 16:48:38 +0200 Subject: [PATCH v1 2/6] dt-bindings: mediatek,mt6779-keypad: use unevaluatedProperties MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220720-mt8183-keypad-v1-2-ef9fc29dbff4@baylibre.com> References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Mattijs Korpershoek , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0-dev-54fef Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org writing-bindings.rst states: > - If schema includes other schema (e.g. /schemas/i2c/i2c-controller.yaml)= use > "unevaluatedProperties:false". In other cases, usually use > "additionalProperties:false". mt6779-keypad includes matrix-keymap.yaml so replace additionalProperties:f= alse by unevaluatedProperties:false. Signed-off-by: Mattijs Korpershoek diff --git a/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad= .yaml b/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml index 03ebd2665d07..ca8ae40a73f7 100644 --- a/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml +++ b/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml @@ -56,7 +56,7 @@ required: - clocks - clock-names =20 -additionalProperties: false +unevaluatedProperties: false =20 examples: - | --=20 b4 0.10.0-dev-54fef From nobody Sat Sep 21 20:05:50 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1057BCCA487 for ; Wed, 20 Jul 2022 14:48:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237023AbiGTOs5 (ORCPT ); Wed, 20 Jul 2022 10:48:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235887AbiGTOst (ORCPT ); Wed, 20 Jul 2022 10:48:49 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 086D15247E for ; Wed, 20 Jul 2022 07:48:42 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id h9so1389772wrm.0 for ; Wed, 20 Jul 2022 07:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:date:subject:mime-version:content-transfer-encoding:message-id :references:in-reply-to:to:cc; bh=EOTw2SZsHwugM+Ez0nEALoToqSbMZWPKVYP438H1mxU=; b=oMm7LoJwBASOpcAnoe5ZW0VcoBtpNp4qdQXkxDMqfsYACtq2XOkYP+zDZPKLL4wMBw YgIqj4c9bDXecsVxFerVyCof9sXAssTSpDgeyJzMUqvcp5rJryAbqDSHlATe3jt96iHG WDtXCJY7Y6NcZXZsGo3/Pww8583CYWbnViwflztE1ocPMbOBgWan5EX/aj1cCeoZuy9i 9faahOs5YUZNPf85kg/MwQEMmex/wyjlyUCRmxo4MPNf1qV7Ep+U/pgIAQiOYRiTGjQC ZBxpaNtME1cHVV7UMwlhbx1u60srMx9Fp1zRqRjrcLpKx1kk1sNzoYkkn7iaHCbpVNRl 3ihA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version :content-transfer-encoding:message-id:references:in-reply-to:to:cc; bh=EOTw2SZsHwugM+Ez0nEALoToqSbMZWPKVYP438H1mxU=; b=eIhd6Mo0nAFRVfG9BslfShY0T9+3detYZh4Br2iaqX+R6yVnn7mUmCvjarhpIjxCuU aqZwsgvo5FibNymjqCvwct6j6lQOrKHuEcecSPibw/3EqNXKV8RvzJJflN8gVg4RkTrS Scss842a9E19n195S9bSxHJkBXBc47+8wuh1kU8MeNE51CC5CIkoqGadvsrYATDK/YU5 eghDQV0SnEMn2p1mLj/tyeFVpL+0607lpmer13oPl0XGErgmIfo/n0wkJ93TGrKHhTrB d0FC+iSeRPbc6cZXlJTriZj4rNxwsOdR5HkSTpUsA5i8Cl8KmQmVCUWh2QW+w0VWIxH3 yWJg== X-Gm-Message-State: AJIora8xqZyUOiqTTwEF1BmieQV4MVmRbX8CXWH1qqXQXBSZx3w9YU6N Y6XRCa792LRJlDSRP2+lV/oN317Vum/CCQ== X-Google-Smtp-Source: AGRyM1vk48vhBISpLi0CcOr9kKDWKs0EqlrNQDdVJdrT6hsTP+HmSTbFh6RCGQZsl1ZBg+vkqVqr/A== X-Received: by 2002:a05:6000:1789:b0:21d:7279:f455 with SMTP id e9-20020a056000178900b0021d7279f455mr30432550wrg.542.1658328521299; Wed, 20 Jul 2022 07:48:41 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb19:85e6:1900:c639:22f8:bed9:44dd]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm3321121wmq.7.2022.07.20.07.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 07:48:41 -0700 (PDT) From: Mattijs Korpershoek Date: Wed, 20 Jul 2022 16:48:39 +0200 Subject: [PATCH v1 3/6] dt-bindings: mediatek,mt6779-keypad: add mediatek,double-keys MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220720-mt8183-keypad-v1-3-ef9fc29dbff4@baylibre.com> References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Mattijs Korpershoek , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0-dev-54fef Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MediaTek keypad has 2 modes of detecting key events: - single key: each (row, column) can detect one key - double key: each (row, column) is a group of 2 keys Currently, only single key detection is supported (by default) Add an optional property, mediatek,double-keys to support double key detection. Double key support exists to minimize cost, since it reduces the number of pins required for physical keys. Signed-off-by: Mattijs Korpershoek diff --git a/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad= .yaml b/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml index ca8ae40a73f7..03c9555849e5 100644 --- a/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml +++ b/Documentation/devicetree/bindings/input/mediatek,mt6779-keypad.yaml @@ -49,6 +49,12 @@ properties: maximum: 256 default: 16 =20 + mediatek,double-keys: + description: | + use double key matrix instead of single key + when set, each (row,column) is a group that can detect 2 keys + type: boolean + required: - compatible - reg --=20 b4 0.10.0-dev-54fef From nobody Sat Sep 21 20:05:50 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F14D2C43334 for ; Wed, 20 Jul 2022 14:49:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240667AbiGTOtI (ORCPT ); Wed, 20 Jul 2022 10:49:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237447AbiGTOsv (ORCPT ); Wed, 20 Jul 2022 10:48:51 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FB3E52894 for ; Wed, 20 Jul 2022 07:48:44 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id e15so21219415wro.5 for ; Wed, 20 Jul 2022 07:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:date:subject:mime-version:content-transfer-encoding:message-id :references:in-reply-to:to:cc; bh=gQDJGZNgsqUtHpgMiFLZZA7/paFhPF+yVUYXcvVHSs4=; b=jWvb+ECCiickXJZCiLpfv+eAtXoL6RKmAzIinxV0NAV2ZFpFUzjSQMTGWH/ioJk54c WM+yJ0qYotLbZ7Ab3S4p4q5VPrOKdDw0IPyh6RKGkePFugxfcSfoLCKKVrhhZdLIbHYA YuKYzPBjY3Mo/28Q0U8+5FNBFkMy9YFyHVaDl+wjUAR267zKJlGW7I0dpgzcvYvvaQz6 hKNBJz+CjbSJIp08nXtstVcxHE9BbQoA0WHlxZ9RWMEnCJlNY1tEMvAlfQIIJs31Khos witQDQ4775d0nxnh1BEviyI9PFhUz0t+fYPBaaO8a3avTfMXnpfMB0fvNGG5w2/id6yg JkMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version :content-transfer-encoding:message-id:references:in-reply-to:to:cc; bh=gQDJGZNgsqUtHpgMiFLZZA7/paFhPF+yVUYXcvVHSs4=; b=tO7mpvnHggEshM17QqfmsqzHSo937hTjyvBP/EF0C4Fyt1LMZzs8tPbq5x5+D7R2Wy upazmQhWm8EVEabrZHPiykkHuCmBO8L2cYFZrK3Sptz5xvteo/PVnvnO9ecOubJjx4wb EDmmeVCG9dfXVWx/20sgAgyrL8cP5HKjpo4VzvyEsFGeBaQDwrSTVe2j32/ejG7L82Yv QxepP6pgI6zbH/JvIdae7rv3KbTL29Q2LOew6zbd5B40Nx2g+wrwajHtcAt1Pj9lhhRV Ti6p6gpVgfyyyMfSmFOnQ9uF4p/uMPB06WbfEWdsLfGfskib+h+inp8kKXEv/JEYz1Ub aZxg== X-Gm-Message-State: AJIora98OoEHy8nc8KR4x2u17KhGD3HWgASJnEaRqwIMlsNPOT5/nqtM 6ldZvVx0YODtp4z9tz+aSPuEph1NqLQVcg== X-Google-Smtp-Source: AGRyM1vhz6wly+GUBEO58Zqu+ASDQ0cB1MEncpppa77b4G7K6pbiuEC/CLbU03zVZ2Y8w2dFJns6HA== X-Received: by 2002:a5d:64e2:0:b0:21d:38e8:2497 with SMTP id g2-20020a5d64e2000000b0021d38e82497mr29420012wri.142.1658328522069; Wed, 20 Jul 2022 07:48:42 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb19:85e6:1900:c639:22f8:bed9:44dd]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm3321121wmq.7.2022.07.20.07.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 07:48:41 -0700 (PDT) From: Mattijs Korpershoek Date: Wed, 20 Jul 2022 16:48:40 +0200 Subject: [PATCH v1 4/6] Input: mt6779-keypad - support double keys matrix MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220720-mt8183-keypad-v1-4-ef9fc29dbff4@baylibre.com> References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Mattijs Korpershoek , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0-dev-54fef Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MediaTek keypad has 2 modes of detecting key events: - single key: each (row, column) can detect one key - double key: each (row, column) is a group of 2 keys Double key support exists to minimize cost, since it reduces the number of pins required for physical keys. Double key is configured by setting BIT(0) of the KP_SEL register. Enable double key matrix support based on the mediatek,double-keys device tree property. Signed-off-by: Mattijs Korpershoek diff --git a/drivers/input/keyboard/mt6779-keypad.c b/drivers/input/keyboar= d/mt6779-keypad.c index bf447bf598fb..9a5dbd415dac 100644 Reviewed-by: Matthias Brugger --- a/drivers/input/keyboard/mt6779-keypad.c +++ b/drivers/input/keyboard/mt6779-keypad.c @@ -18,6 +18,7 @@ #define MTK_KPD_DEBOUNCE_MASK GENMASK(13, 0) #define MTK_KPD_DEBOUNCE_MAX_MS 256 #define MTK_KPD_SEL 0x0020 +#define MTK_KPD_SEL_DOUBLE_KP_MODE BIT(0) #define MTK_KPD_SEL_COL GENMASK(15, 10) #define MTK_KPD_SEL_ROW GENMASK(9, 4) #define MTK_KPD_SEL_COLMASK(c) GENMASK((c) + 9, 10) @@ -31,6 +32,7 @@ struct mt6779_keypad { struct clk *clk; u32 n_rows; u32 n_cols; + bool double_keys; DECLARE_BITMAP(keymap_state, MTK_KPD_NUM_BITS); }; =20 @@ -67,8 +69,13 @@ static irqreturn_t mt6779_keypad_irq_handler(int irq, vo= id *dev_id) continue; =20 key =3D bit_nr / 32 * 16 + bit_nr % 32; - row =3D key / 9; - col =3D key % 9; + if (keypad->double_keys) { + row =3D key / 13; + col =3D (key % 13) / 2; + } else { + row =3D key / 9; + col =3D key % 9; + } =20 scancode =3D MATRIX_SCAN_CODE(row, col, row_shift); /* 1: not pressed, 0: pressed */ @@ -150,6 +157,8 @@ static int mt6779_keypad_pdrv_probe(struct platform_dev= ice *pdev) =20 wakeup =3D device_property_read_bool(&pdev->dev, "wakeup-source"); =20 + keypad->double_keys =3D device_property_read_bool(&pdev->dev, "mediatek,d= ouble-keys"); + dev_dbg(&pdev->dev, "n_row=3D%d n_col=3D%d debounce=3D%d\n", keypad->n_rows, keypad->n_cols, debounce); =20 @@ -166,6 +175,10 @@ static int mt6779_keypad_pdrv_probe(struct platform_de= vice *pdev) regmap_write(keypad->regmap, MTK_KPD_DEBOUNCE, (debounce * (1 << 5)) & MTK_KPD_DEBOUNCE_MASK); =20 + if (keypad->double_keys) + regmap_update_bits(keypad->regmap, MTK_KPD_SEL, + MTK_KPD_SEL_DOUBLE_KP_MODE, MTK_KPD_SEL_DOUBLE_KP_MODE); + regmap_update_bits(keypad->regmap, MTK_KPD_SEL, MTK_KPD_SEL_ROW, MTK_KPD_SEL_ROWMASK(keypad->n_rows)); regmap_update_bits(keypad->regmap, MTK_KPD_SEL, MTK_KPD_SEL_COL, --=20 b4 0.10.0-dev-54fef From nobody Sat Sep 21 20:05:50 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C25C4C433EF for ; Wed, 20 Jul 2022 14:49:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236763AbiGTOtC (ORCPT ); Wed, 20 Jul 2022 10:49:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236814AbiGTOst (ORCPT ); Wed, 20 Jul 2022 10:48:49 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6624C528B6 for ; Wed, 20 Jul 2022 07:48:44 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id d8so6506212wrp.6 for ; Wed, 20 Jul 2022 07:48:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:date:subject:mime-version:content-transfer-encoding:message-id :references:in-reply-to:to:cc; bh=VGUb9DmOvoGv8nh5rqV1xHbR9kL6IKYbqd/qwv1q+CA=; b=jRL5JcT9oKaeo7HwZrYobK/YmXLf7T2OTvQbB+5Tt4Ej73xiicgN2WuAV9zlw2rEKj gBD1wR+vAFAyQ36BarOC42aGFh0Z+CUVKmoz8jocS+Sr1oFSoZdpIpLnfx+p6ZO2A1ou AAcutHoNxH3HiLedSavddURbO+/DeoJdbuK1UKbsYvq/AEfupOK/Luj7ZiWHbwkOSZy2 aHRgAVTfYYziWX4EbaYfxDteMDi0fDZibAkzqfnGLqb6TtdUDY9XJZimypikQHHkA/RS HwXgTHe4cGSkZD6UzZkh/rw9pNfYj2qyAa5Grv7CnZLvskr1FGDTqRsjvNQ4XaQ9hQ0Y SVRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version :content-transfer-encoding:message-id:references:in-reply-to:to:cc; bh=VGUb9DmOvoGv8nh5rqV1xHbR9kL6IKYbqd/qwv1q+CA=; b=KQyoWvn1mLoLx08In326Bw5KeLU2CTu8/0FbKtdh8UmmF8q92MfwxJvwVpChfylvIF RO0/VoTChkpsuLYdej2Ltjtx2aAu8akfjuTmECFDhNXA7WzPPOmsiDdwnS1b/W81Nkkz S8Nb0MB184fqGnU6vlMlpXaRFkP/AtrK/Rs1EIv9kSwSLgYx8IywarKuOkY/tpYpRaOE zFXDLIxWNQYV9wbdeDP/CX7gWPqAfKfoGnvPFUQ2LwHSAfU/vkSCKs8FfAFgpTYxNDJq TMHV3OWdfrKno3DPXkalhIGro84ia034g9r4jxCpd0DCpV6y1k+4K6iv57XcRgUYS5+k KeLw== X-Gm-Message-State: AJIora81pbmgr+nRFOmjBoPuZMfOg4JfN0C3axI7wlP3Vc1yaZ6KvMXm pFRDfPXON3VS2YrCEp1iBI0KznqkMjTqgA== X-Google-Smtp-Source: AGRyM1vTy640y2iV3Q5noFGBYMKVc349uYWye3eyUbUhWj27qZA/i9aPmd4vKm57vaVf4wNmnxmupw== X-Received: by 2002:a5d:648a:0:b0:21d:b684:9c76 with SMTP id o10-20020a5d648a000000b0021db6849c76mr30956265wri.463.1658328522794; Wed, 20 Jul 2022 07:48:42 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb19:85e6:1900:c639:22f8:bed9:44dd]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm3321121wmq.7.2022.07.20.07.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 07:48:42 -0700 (PDT) From: Mattijs Korpershoek Date: Wed, 20 Jul 2022 16:48:41 +0200 Subject: [PATCH v1 5/6] arm64: dts: mediatek: mt8183: add keyboard node MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220720-mt8183-keypad-v1-5-ef9fc29dbff4@baylibre.com> References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Mattijs Korpershoek , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0-dev-54fef Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fabien Parent MT8183 has an on-SoC keyboard controller commonly used for volume up/down buttons. List it in the SoC dts so that boards can enable/use it. Signed-off-by: Fabien Parent Signed-off-by: Mattijs Korpershoek diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts= /mediatek/mt8183.dtsi index 9d32871973a2..9d8fdebaabe3 100644 Reviewed-by: AngeloGioacchino Del Regno --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -943,6 +943,15 @@ pwrap: pwrap@1000d000 { clock-names =3D "spi", "wrap"; }; =20 + keyboard: keyboard@10010000 { + compatible =3D "mediatek,mt6779-keypad"; + reg =3D <0 0x10010000 0 0x1000>; + interrupts =3D ; + clocks =3D <&clk26m>; + clock-names =3D "kpd"; + status =3D "disabled"; + }; + scp: scp@10500000 { compatible =3D "mediatek,mt8183-scp"; reg =3D <0 0x10500000 0 0x80000>, --=20 b4 0.10.0-dev-54fef From nobody Sat Sep 21 20:05:50 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DB07CCA480 for ; Wed, 20 Jul 2022 14:49:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239151AbiGTOtR (ORCPT ); Wed, 20 Jul 2022 10:49:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235930AbiGTOsx (ORCPT ); Wed, 20 Jul 2022 10:48:53 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3425752DD7 for ; Wed, 20 Jul 2022 07:48:45 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id a18-20020a05600c349200b003a30de68697so2545180wmq.0 for ; Wed, 20 Jul 2022 07:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:date:subject:mime-version:content-transfer-encoding:message-id :references:in-reply-to:to:cc; bh=o7NWJMKmrg5UzWFssb9UC6+9fr3X64sVc8zqbdDmg/4=; b=35Q7aaLTpf6XHFiAk3xPyLuE7i3lVuBjTEOr4YEtua/WiSxQNGV5E7wgmPYZvrXdMz cb8+kgykVVSkEBD2kqKYw3w87eRLhTkDH4ekVHbv6Ct3OZOx8qIPGI9GE+lXGbLcXKa5 677DZ1rDcZ1/vIdTs1a+kY5+jO4kbzxHXkF7rp3f8V3OVj2+AbMMjUcF0WPkDlQaJkN+ lGn1dr92MXwPIn5iTDypPp9qq3tn8ZCYf9mlO7foOBdNrj85JwjhbuitB1nUgnvX8WM/ txABYDNzMJXhCuTSuSUzbZHYOmgX7XUJbgn9PnY/mM1+iErCmsEpGi3f36wb/3TcvYFL 4QiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:date:subject:mime-version :content-transfer-encoding:message-id:references:in-reply-to:to:cc; bh=o7NWJMKmrg5UzWFssb9UC6+9fr3X64sVc8zqbdDmg/4=; b=73PGN1XJONOmtnYdbwMA0dppgtNfbmaqbjwkyLLAzynhJHdZoyoCrtiaHSp91xUcAM X73SQmpmMM21m6bOV9c+NyL7KKs3862qKpxpJIBMzSfeAR0qwZZD3yq6Sm7nh/aWmVJD PZyCrli9OKm+cVutODATz+l31WeoJ8W1ynzSwe1EfUQoJb+5APNzdwqOfvPVhKgImATf 8gIKUk1dyTX+R150MrmeANUGhubCG+rd9ZEufwSkQeOO3PwdjiK0DH/a20QMTbFbcTKJ XNr1++7cg8ihYKQCUJxRNOhLxaFmH4ya8uLWo3axQJJrLF4aUvbTotcjwdtfyG4qRWv3 ReEQ== X-Gm-Message-State: AJIora9yfEPve6XvvoOtV+e4HuU9ub/M3+1N5uf0GQ2HQv220R0M858j W5CjdME+aeiUEcyvHuzQvu6LjgU35CTDMQ== X-Google-Smtp-Source: AGRyM1ucwB2vU/aGRAvjhlYFu9788qVNYbD0PNW11PcdfR+3DHacpm9xpneOLojFxCjqxsBH2JlD1w== X-Received: by 2002:a05:600c:cd:b0:3a3:f40:8776 with SMTP id u13-20020a05600c00cd00b003a30f408776mr4254459wmm.9.1658328523535; Wed, 20 Jul 2022 07:48:43 -0700 (PDT) Received: from [127.0.1.1] ([2a01:cb19:85e6:1900:c639:22f8:bed9:44dd]) by smtp.gmail.com with ESMTPSA id f8-20020a05600c4e8800b003a31673515bsm3321121wmq.7.2022.07.20.07.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 07:48:43 -0700 (PDT) From: Mattijs Korpershoek Date: Wed, 20 Jul 2022 16:48:42 +0200 Subject: [PATCH v1 6/6] arm64: dts: mediatek: mt8183-pumpkin: add keypad support MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220720-mt8183-keypad-v1-6-ef9fc29dbff4@baylibre.com> References: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com> To: Rob Herring , Krzysztof Kozlowski , Mattijs Korpershoek , Dmitry Torokhov , Matthias Brugger Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent , devicetree@vger.kernel.org, linux-mediatek@lists.infradead.org, Fabien Parent , linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.10.0-dev-54fef Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Fabien Parent Add device-tree bindings for the keypad driver on the MT8183 Pumpkin board. The MT8183 Pumpkin board has 2 buttons connected using: KPROW0, KPROW1 and KPCOL0. Signed-off-by: Fabien Parent Signed-off-by: Mattijs Korpershoek diff --git a/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts b/arch/arm64/b= oot/dts/mediatek/mt8183-pumpkin.dts index 530e0c9ce0c9..add697c94b05 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts +++ b/arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts @@ -7,6 +7,7 @@ /dts-v1/; =20 #include +#include #include "mt8183.dtsi" #include "mt6358.dtsi" =20 @@ -122,6 +123,18 @@ &i2c6 { clock-frequency =3D <100000>; }; =20 +&keyboard { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&keyboard_pins>; + status =3D "okay"; + linux,keymap =3D ; + keypad,num-rows =3D <2>; + keypad,num-columns =3D <1>; + debounce-delay-ms =3D <32>; + mediatek,double-keys; +}; + &mmc0 { status =3D "okay"; pinctrl-names =3D "default", "state_uhs"; @@ -226,6 +239,14 @@ pins_cmd_dat { }; }; =20 + keyboard_pins: keyboard { + pins_keyboard { + pinmux =3D , + , + ; + }; + }; + mmc0_pins_default: mmc0-pins-default { pins_cmd_dat { pinmux =3D , --=20 b4 0.10.0-dev-54fef