From patchwork Tue Jul 26 12:56:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12929250 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3BDB3C433EF for ; Tue, 26 Jul 2022 12:57:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id:Date:From:MIME-Version :Subject:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XlBor+4u+TIcI0L+By7b/UzYCZFUgFiqv/k1m/0K7Zw=; b=Cw45eccEaMusIS wHMBIIdq7wBDQYp4AQqwkv1/a5Tx4Ivoc2WItRfj6DhYUkh2BGnY+X7w7a79W8J5bbIpaa+imVDYX vyDg8/UXBcZJb/oa5f1yn5MzE6JDNe9olFLMGCMclt+lC4I8GDiDfVNg/i4QjGaie1PCaupdJSnG2 8WvFm1qeQkl1zE8mDRGwQHrkAkttEoqliNFo4/3472xAK5LhegWbwAO28cP8ceN4Yb7yQ79OvJTT8 LGEGHCzX++kIZMq5RueZtfTSXmMEQixzbtEIT3yzS8O9OtvFqTZn46N7MlKX+jc7Ne/XCmSbAZu8R BtI43mtRGrfA7XvZT0hg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGK6z-00H8cj-QM; Tue, 26 Jul 2022 12:56:34 +0000 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGK6v-00H8ZG-MH for linux-arm-kernel@lists.infradead.org; Tue, 26 Jul 2022 12:56:31 +0000 Received: by mail-wr1-x431.google.com with SMTP id l15so15974860wro.11 for ; Tue, 26 Jul 2022 05:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=subject:mime-version:content-transfer-encoding:from:date:message-id :to:cc; bh=TYVpWfq2HZQFkJkUsjuT3+OH2/CsoiFy0t7aK/wwYcc=; b=UBvhtWzt3DHFwXizB1isgLkwtszKbw3B3ACzitCBV4Mf3bOz9w4Mt0Q7ryBZw930k7 HHbsoUy2FTe728lwS+DodOf/jURVyUEfsjoYImKgMRaFfW0Xe4mFQrHPVfdcagC5+ISO J1IPoXQyrKOUcOX4FVyhwQE4EA72Q/+Zk7VshT0V5dSb8J+GlXNqzKQHPD6pj5RKOWp7 91TJBpugRtB7SMYBWxueFAATYOhTOW0wriCzrdwfAgDGONGLvNuVe4pbCzOcODfNnKUu Oq38NnfDl+ilReWZ/qRCN7evoGRsRjnyMxJOH/nqP8WMsnT1d7a032FklXTlOXzi++hF 4yrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:mime-version:content-transfer-encoding :from:date:message-id:to:cc; bh=TYVpWfq2HZQFkJkUsjuT3+OH2/CsoiFy0t7aK/wwYcc=; b=mSlRjC6oNzllpgRJ5mUxuiXlI3CdmHv8jrYPh6B3VOCzHZdo+/nrXEkVzy2teY2Con DTL4ZzyvclQ/dkcQgsnT7yYhiCH+mDWiwmC05HlznBOMrKuJcALQSPQNMIj2DHhEYbAr 3S1zEx4CEoukDSj0f8zC3EGztOeUVIDUrKT8Fg/IY3fnabnI9cm1KgCIIncdo1R5NJk8 6VLzIj1uHOX1P2yJ3DV/Rza32ah9VMKLl7Qd4BaIpgJapH5NyHYX41o16Hkm90eRak9f kb+6/w8hVS7ho0t7t4ZrgfxhBj3X/Ps9/KPVYP2xTPfOV/igpWe+x5noqL+eh8zWza5V RERA== X-Gm-Message-State: AJIora/8qDqe+FQcQck0/cq42mkgT4xqh+TvH7x3AwjJbdL1tY8yprgp HSSJqioSjzXmFjTXY95Ia6BZOItH6UsoJQ== X-Google-Smtp-Source: AGRyM1uXUsdiGuXurwvyCalFFjQJEVSbWfw/z+1nQSYHOyzlEzhlO2ccY6Uo0YOkNIQxIIIVj+N90w== X-Received: by 2002:a05:6000:1f9a:b0:21e:8de2:727a with SMTP id bw26-20020a0560001f9a00b0021e8de2727amr5437446wrb.576.1658840188043; Tue, 26 Jul 2022 05:56:28 -0700 (PDT) Received: from [192.168.2.253] ([82.66.159.240]) by smtp.gmail.com with ESMTPSA id k1-20020adff5c1000000b0020fff0ea0a3sm14171549wrp.116.2022.07.26.05.56.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 05:56:27 -0700 (PDT) Subject: [PATCH v2 0/7] Input: mt6779-keypad - double keys support MIME-Version: 1.0 From: Mattijs Korpershoek Date: Tue, 26 Jul 2022 14:56:05 +0200 Message-Id: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> X-b4-tracking: H4sIAHvk32IC/3XOwQ6CMBAE0F8hPVvTLqUUT/6H8bBbttKoYFpCQgj/bvHuaTKHl5lNZE6Rs7hUm0 i8xBynsRQ4VcIPOD5Yxr50AQpAtaDke3ba1fLJ6wd7CQqxbbWyIShRDGFmSQlHPxzKWodBk22Mc3VL xiBQYNv0npAtQaOwp2Drgw4xz1Naf08WXeL2b3TRUkkOXfDQFR7MlXB9RUp89tNb3Pd9/wIohsyH2A AAAA== To: Krzysztof Kozlowski , Matthias Brugger , Mattijs Korpershoek , Dmitry Torokhov , Rob Herring Cc: linux-arm-kernel@lists.infradead.org, AngeloGioacchino Del Regno , Fabien Parent , linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Fabien Parent X-Mailer: b4 0.10.0-dev-78725 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220726_055629_750145_3750A073 X-CRM114-Status: GOOD ( 12.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The MediaTek keypad controller has multiple operating modes: * single key detection (currently implemented) * double key detection With double key detection, each (row,column) is a group that can detect two keys in the key matrix. This minimizes the overall pin counts for cost reduction. However, pressing multiple keys in the same group will not be detected properly. On some boards, like mt8183-pumpkin, double key detection is used. Signed-off-by: Mattijs Korpershoek --- Changes in v2: - bindings: add matrix-keymap justification in commit message (Krzysztof) - bindings: switch from double-keys(boolean) to keys-per-group(uint32) (Krzysztof) - driver: add a function pointer for row/column calculation (Angelo) - Link to v1: https://lore.kernel.org/r/20220720-mt8183-keypad-v1-0-ef9fc29dbff4@baylibre.com --- Fabien Parent (2): arm64: dts: mediatek: mt8183: add keyboard node arm64: dts: mediatek: mt8183-pumpkin: add keypad support Mattijs Korpershoek (5): MAINTAINERS: input: add mattijs for mt6779-keypad dt-bindings: mediatek,mt6779-keypad: use unevaluatedProperties dt-bindings: mediatek,mt6779-keypad: add mediatek,keys-per-group Input: mt6779-keypad - prepare double keys support with calc_row_col Input: mt6779-keypad - support double keys matrix .../bindings/input/mediatek,mt6779-keypad.yaml | 8 ++++- MAINTAINERS | 6 ++++ arch/arm64/boot/dts/mediatek/mt8183-pumpkin.dts | 21 +++++++++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 9 +++++ drivers/input/keyboard/mt6779-keypad.c | 41 ++++++++++++++++++++-- 5 files changed, 82 insertions(+), 3 deletions(-) --- base-commit: 668af1b6548837b44a2bfe65dcbae6b250adbf63 change-id: 20220720-mt8183-keypad-20aa77106ff0 Best regards,