From nobody Sat Sep 21 19:36:17 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 8000BCCA491 for ; Tue, 26 Jul 2022 12:56:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238753AbiGZM4h (ORCPT ); Tue, 26 Jul 2022 08:56:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238166AbiGZM4c (ORCPT ); Tue, 26 Jul 2022 08:56:32 -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 C7247252BB for ; Tue, 26 Jul 2022 05:56:30 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id v17so1088288wrr.10 for ; Tue, 26 Jul 2022 05:56:30 -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:cc; bh=70sJgJ6M2wTNfwQJ3+bkMBP++3esJkgb8mg1Y3AHAIo=; b=uCZGOkTjzgvg0EGIHfkTrXgEILq36uTtM8gTe/90Li/u6m4RWaLWhuE1JMgp4sVdhr nBXnHLsXXOSeWLOXJ0FHTchVsF9rcMEgC/i0gCjYVVr94LcSaaLfvzCO7IgEm6rgyvzr cHcVisccg3W7PRg2j5JgRfCXS0pURtzJ3xznFjVv9JkQuDji612ViwKLyhfEqURzfe6A vtDiOLM5MrqxfyIKhvHxStZnugMbFV0bqOcHCehraaKtBEtpq4G9hPuuQhui/zF0etoQ gEZ16hmESIpCnRqhX4ISn5i9n4a/lIjwdW1DzbNJfd5JHGDAKrckY0f1xaUZ5BpCCvIo wvbQ== 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:cc; bh=70sJgJ6M2wTNfwQJ3+bkMBP++3esJkgb8mg1Y3AHAIo=; b=PqGzppSqtiUPSym5inXi7/Sp0tsoJJ3Yu5b010raagsCL+bEQNGDNGD0mfkNIoFTtF zX2YMCYk6S67B5w77G2NaSEbIRh3XMcsMrRwX48om1Hr3GnHAKV4d0HPpUSYxgpwgny/ B3msvl5cy7AqdJom9j822KbgTW7Q2eDHEvtp1dS9YqIvzwlMeLLQxLjGLZUSHPf0GQV4 DG7wKg4Y5bazgBVRJEr9fWGjuZtbvkT/8FnJRe3YNLJpqbVO5quJhdf6HSwHlz5ckAK9 GYEkDSXQl4V8iqTBt+f06TdrZMtlqgWbfX/R+wGmuM/MWkRGBw/PHrfFLDF7VUSRsIeN BIVQ== X-Gm-Message-State: AJIora94vt2sNgG/CR8q8fmm9SdBb0shW266YIYMixSfueJKFbiVFP+d O0ehjbfA9Lcv1JeitrLCpa90DQ== X-Google-Smtp-Source: AGRyM1vh+7xD0uRlVRAT6+8Kk92s+Z9rVWNc12KDQ9vbMZkTR+6hQDfwJmTnKb4erZvbSYKsoe4YNA== X-Received: by 2002:adf:e192:0:b0:21d:62ee:ef10 with SMTP id az18-20020adfe192000000b0021d62eeef10mr11127350wrb.693.1658840189248; Tue, 26 Jul 2022 05:56:29 -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.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 05:56:28 -0700 (PDT) From: Mattijs Korpershoek Date: Tue, 26 Jul 2022 14:56:06 +0200 Subject: [PATCH v2 1/7] 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-v2-1-6d42c357cb76@baylibre.com> References: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> 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 To: unlisted-recipients:; (no To-header on input) 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 1de6a8fbf0a8..f2f0696caf6a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12805,6 +12805,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-78725 From nobody Sat Sep 21 19:36:17 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 A14E8C43334 for ; Tue, 26 Jul 2022 12:56:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238949AbiGZM4k (ORCPT ); Tue, 26 Jul 2022 08:56:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238900AbiGZM4d (ORCPT ); Tue, 26 Jul 2022 08:56:33 -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 35CEF255B1 for ; Tue, 26 Jul 2022 05:56:32 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id g2so11971467wru.3 for ; Tue, 26 Jul 2022 05:56:32 -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:cc; bh=CDEPpnFfFeQNRb6h6qaD2GBuBJjRD788qOFTnSwzmr8=; b=FlHwpR/BGdgeA1Qo4EPCLGZN9pJSYx3Shj8vGvPfjgcvjNQGVL50PDnnpy/7cfmHHC W/dUzWuhGJmzIjpmlXsRbdpsBFivMx4GbzsXMA3Dlo22lTILBBElionRNVHKILNRfgQ1 0PoOv+/1cKxGPYQe1NG9r4B0V/F+1NOUsGej+RnyQ4JzvvWCZJE1isN/yWhM3paK/yF6 9Dml/P6kNoPbaTA69UFHrKxZlQqihJelbV1q2/l5KKv6fsI+sLdtmcXZ+F82bF0/drpN 7tfND2OUcC0bTi5J6lW5oMGiEdlVignPik5jBiFK9wMpEUCy5q69zBavlMiDANCUBGk4 JRjQ== 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:cc; bh=CDEPpnFfFeQNRb6h6qaD2GBuBJjRD788qOFTnSwzmr8=; b=Yl5jz2fhEHQ38Pdp4wmX5gs2u4oG4MdfzcvFlwwetHnzz4yUpjFQ2I4G/UGSj5bmqh MbT0D9YzH5dBgDYrLKlYX/ufVZAniRbfd6hckDeYSl9pxBuN3Xt0NEBP9ydYGlWsIi9k tLh+J0EtXk7NRtWIhNk0Fnru95+MtdLFkrJ6znQrbJyn54zGMVazahAH8FlEH/412Fo1 GKKaXRXn5bJyCcr/8cAteQwI8Uxv/uuJjIBVSG0KCE0SBp/Ls7s+duEOc1kRQazeExV+ V/bqwS/lCkHjkquWTDIQfUM4Cy7yLBjKUoRVT60qMAxGpOmHr+EIbwQu5gJVcam/bMKz PKFQ== X-Gm-Message-State: AJIora+kVuiunIBtKPfXae25671nLeAwcUEjDDYudMhTY18xI0rxOMSf H27U8bGflulro4uhk4dOYWkuSOd/NPTczA== X-Google-Smtp-Source: AGRyM1sLSFIrbCMWof8a52ULbmaqJoWBEBO19cwgtC1nBgI86bN7MgA7Xp4VETkGqmgn11gRmyyQaA== X-Received: by 2002:adf:fd8f:0:b0:21e:bcb4:f731 with SMTP id d15-20020adffd8f000000b0021ebcb4f731mr199816wrr.537.1658840190488; Tue, 26 Jul 2022 05:56:30 -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.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 05:56:30 -0700 (PDT) From: Mattijs Korpershoek Date: Tue, 26 Jul 2022 14:56:07 +0200 Subject: [PATCH v2 2/7] 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-v2-2-6d42c357cb76@baylibre.com> References: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> 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 To: unlisted-recipients:; (no To-header on input) 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". All 3 properties from matrix-keymap.yaml are valid for the MediaTek keypad: * keypad,num-rows and keypad,num-cols configure the KP_SEL register * linux,keymap represents the (at most) 8x8 hardware matrix 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 Reviewed-by: Krzysztof Kozlowski --- 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-78725 From nobody Sat Sep 21 19:36:17 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 04A56C43334 for ; Tue, 26 Jul 2022 12:56:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238954AbiGZM4q (ORCPT ); Tue, 26 Jul 2022 08:56:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238744AbiGZM4e (ORCPT ); Tue, 26 Jul 2022 08:56:34 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0113525C78 for ; Tue, 26 Jul 2022 05:56:32 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id g2so11971502wru.3 for ; Tue, 26 Jul 2022 05:56:32 -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:cc; bh=x4rd2qMk0FSrQt9Tp0ZdFh0cgNgJW8TRDOygBl1e4h8=; b=jBV9Ngo00RRoTUt2Xj5EYf/dE7L2U6bM74cr7SdwSryF4TUdRF1/eYGJr24ZvLjOlb QUskTKO7LRHcn+sdJZ3dlJOAPsmTAXCxNky0QjNdgrMFQVB8KsdPEn7STZTnADd3SMVe IrLjc8eCQ+ATkshZj9pm9LJ6QNSyxhQE0ilkKiYgTZIb7HXL77wkLY6VsxGiwzI84BRj UlTUnPpGrnYPhK00P1ysdWbDxJSvNJ9hjxZI8R3s4fiA17U7Hyy40oNHdeULJbX7f5XQ k99JyD9NV+/jcOZO4DrWF4XY0lLGnWCNXIXNdgwq4W6To6zT/djTDwRuLP4BRTJWPsu5 ai1A== 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:cc; bh=x4rd2qMk0FSrQt9Tp0ZdFh0cgNgJW8TRDOygBl1e4h8=; b=bdKJ9vPCQcDKjD32rTkWDZF+mwRvXk86DmXfAS7WmJdQrziVzTFIXl6pLW6YvrMs3r nXcTPrE5dIrJPP/1T4aqBy+dNCs0tt2SMRiU0WuPGYHiSsm0SPfdDxDzM6Nv+uY8dG1/ vJkNF9nFdgOyzXOnn5xqM7KUCF8IyBd61aiJ1C6htjnwHlSnsAOmcDesTeWTD1tHDxmW uKwevB3u6PdoV9jIqO2AMz4dvExSeKTrFJ3S69QgT90tw/TUwoWdQeVC/ilFoMg4f8gW 7ejtNmX8eruNBomm12wjR7UKABoZtUiiTbPs59Izrc6sM8X1y3IGVJDUI8n7s3bGVvlG G02g== X-Gm-Message-State: AJIora/JbUZxBKmGU8XKiMV3hY8+PCTazeCLJ/n/WyjtNEDgnmdUWmQ+ zXN1PTmY9lYmEzUvNdKKVKxRlQ== X-Google-Smtp-Source: AGRyM1uKvnBcknnv711COXWaOOlOVb5UPvyj/NuyjcwMG8AesFqGx+UzkQqX5RP1klFJxFLrocFwFA== X-Received: by 2002:adf:ef8d:0:b0:21e:a5e3:35af with SMTP id d13-20020adfef8d000000b0021ea5e335afmr2009077wro.671.1658840191473; Tue, 26 Jul 2022 05:56:31 -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.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 05:56:31 -0700 (PDT) From: Mattijs Korpershoek Date: Tue, 26 Jul 2022 14:56:08 +0200 Subject: [PATCH v2 3/7] dt-bindings: mediatek,mt6779-keypad: add mediatek,keys-per-group MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220720-mt8183-keypad-v2-3-6d42c357cb76@baylibre.com> References: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> 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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 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 With double key, two keys are physically wired to one (row, column) pin. These keys are in the same "group". Multiple keys in the same group reduces the number of pins which minimizes cost. Add a keys-per-group property to describe this. 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..387d0448ff77 100644 Reviewed-by: Krzysztof Kozlowski --- 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,keys-per-group: + description: each (row, column) group has multiple keys + $ref: /schemas/types.yaml#/definitions/uint32 + default: 1 + maximum: 2 + required: - compatible - reg --=20 b4 0.10.0-dev-78725 From nobody Sat Sep 21 19:36:17 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 AF95FC43334 for ; Tue, 26 Jul 2022 12:56:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238958AbiGZM4u (ORCPT ); Tue, 26 Jul 2022 08:56:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238934AbiGZM4f (ORCPT ); Tue, 26 Jul 2022 08:56:35 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 183F82611B for ; Tue, 26 Jul 2022 05:56:34 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id b6so8680839wmq.5 for ; Tue, 26 Jul 2022 05:56:33 -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:cc; bh=l4jlp8HIWV0/SRrpgeD2QZ+LASZjXbcoqy54oDuJlGI=; b=NADnXKatNswe0C+IvCk4tc03ZUzTZpk3sn84+xoWFiXrPT7GWye0NSZqFr6/NdWSMl 9/wwttzMyxUIRsDBbIdZOICfo12+KUVdTwlxduE0LVIfJEwHRpjrP+BQvWIwD92wltrf Z4JeojrM6kR0yRjW8ttUZB/sxfUIk7INP2z2HcsbEotWV+FhQuM+6LyvEhnxFGpljCbR NhKwNEpYDi2Cb9wOTklQu+nhfHDsfKGzzZ5mOy6hKjHIiiqKP/4uRpuHa1sfZUTiMfgs dhjvKJ2JvtAya2HRtktEp9b/RfFy9SPjNLaezvbyVO7g3ruZvijW7iUTKtjNG/cwLDXJ f67g== 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:cc; bh=l4jlp8HIWV0/SRrpgeD2QZ+LASZjXbcoqy54oDuJlGI=; b=S8kRzdV0oVs2KiN9YY7u2ksPPYxOCven0cVu10sFosf00jxGWugyoCpNC6IsZaJl0f M8ZiI42eIHLd9XRGdHJBdHdxeYpvEj/h/jA0JGVI0aQyIoM6YRKpiQp64nRQCxwADv5l TE/nCKwk4rghMNN2yR5yobVg5Sk/Tji/AI7OXcfVORmRS9CcxqQORgjDGH16niM1P0sT 0PJ8MedtONhuKOlHvWJGWYWSmrejwouG6ItdnyIS1eA20KMMi2gI+7WY8TudW7qei42l d0ioEewv8jPuxOoEbzqMD3mQ/AhsxDXfifk+KHNt+EgV8kdY+JAHcPyhBM6noylgSFxc WQvA== X-Gm-Message-State: AJIora/KbtCHgJ3RUa6SWvQRuSWCPxVQlFbpnPSRi3UfAISU0VOC4sY2 UArBxzm4EIQZJG4RCaY/Y32e8A== X-Google-Smtp-Source: AGRyM1tJyMC7Q+SkCcyxEXUMIyPM4vmZWiT2BfgqRy3V7c+2kZ2ogfDtq4Kq/q1vb7+t2z0rbSWCXQ== X-Received: by 2002:a05:600c:1e27:b0:3a3:26dd:5757 with SMTP id ay39-20020a05600c1e2700b003a326dd5757mr3180782wmb.45.1658840192552; Tue, 26 Jul 2022 05:56:32 -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.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 05:56:32 -0700 (PDT) From: Mattijs Korpershoek Date: Tue, 26 Jul 2022 14:56:09 +0200 Subject: [PATCH v2 4/7] Input: mt6779-keypad - prepare double keys support with calc_row_col MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20220720-mt8183-keypad-v2-4-6d42c357cb76@baylibre.com> References: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> 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 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The MediaTek keypad can operate in two modes: single key or double key. The driver only supports single key mode. In double key mode, the row/column calculation based on the key is different. Add a calc_row_col function pointer which will be different based on single/double key mode. No functional change. Suggested-by: AngeloGioacchino Del Regno Signed-off-by: Mattijs Korpershoek diff --git a/drivers/input/keyboard/mt6779-keypad.c b/drivers/input/keyboar= d/mt6779-keypad.c index bf447bf598fb..39c931974bde 100644 Reviewed-by: AngeloGioacchino Del Regno --- a/drivers/input/keyboard/mt6779-keypad.c +++ b/drivers/input/keyboard/mt6779-keypad.c @@ -31,6 +31,7 @@ struct mt6779_keypad { struct clk *clk; u32 n_rows; u32 n_cols; + void (*calc_row_col)(unsigned int key, unsigned int *row, unsigned int *c= ol); DECLARE_BITMAP(keymap_state, MTK_KPD_NUM_BITS); }; =20 @@ -67,8 +68,7 @@ static irqreturn_t mt6779_keypad_irq_handler(int irq, voi= d *dev_id) continue; =20 key =3D bit_nr / 32 * 16 + bit_nr % 32; - row =3D key / 9; - col =3D key % 9; + keypad->calc_row_col(key, &row, &col); =20 scancode =3D MATRIX_SCAN_CODE(row, col, row_shift); /* 1: not pressed, 0: pressed */ @@ -94,6 +94,14 @@ static void mt6779_keypad_clk_disable(void *data) clk_disable_unprepare(data); } =20 +static void mt6779_keypad_calc_row_col_single(unsigned int key, + unsigned int *row, + unsigned int *col) +{ + *row =3D key / 9; + *col =3D key % 9; +} + static int mt6779_keypad_pdrv_probe(struct platform_device *pdev) { struct mt6779_keypad *keypad; @@ -148,6 +156,8 @@ static int mt6779_keypad_pdrv_probe(struct platform_dev= ice *pdev) return -EINVAL; } =20 + keypad->calc_row_col =3D mt6779_keypad_calc_row_col_single; + wakeup =3D device_property_read_bool(&pdev->dev, "wakeup-source"); =20 dev_dbg(&pdev->dev, "n_row=3D%d n_col=3D%d debounce=3D%d\n", --=20 b4 0.10.0-dev-78725 From nobody Sat Sep 21 19:36:17 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 9F9D6C43334 for ; Tue, 26 Jul 2022 12:56:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238985AbiGZM44 (ORCPT ); Tue, 26 Jul 2022 08:56:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51960 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233594AbiGZM4g (ORCPT ); Tue, 26 Jul 2022 08:56:36 -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 6E6012715F for ; Tue, 26 Jul 2022 05:56:35 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id u5so20031808wrm.4 for ; Tue, 26 Jul 2022 05:56:35 -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:cc; bh=tD4ST1GLkFfCdHd4u8ts0UQsGiLNPqXx0HKCsoNVuT4=; b=W3PAGeT94Vn3xX26lGfe1+Mze8r0I2iBziCUdIepLwzWyJcCogiZ1vOTm0eHPt5klL rk+K65pbpke7ZjTLRiJSZFeTSCqP1pXtcRFVHOUCGaXTCF6U1V5r1rrLbk11gAw3M42b lRdieESewrHcHaGkUS4QBvUd0j6rWb9aR6oIG0q4HH5r3RDCL0fpZS4eMnR+GO5pskrZ ldCnwO1Oi+XTVgQhz32OdRTwJORQJNeyil4llKTmwhrRBT9Aoo6nC+n6uKwDFiBDmn5d rtFhkaCCD7enY/2GIdh8vExjEntnpuY7TS2k/hqRFQoZGJvv3h2Anv9EGjjkydWvZY4J H31A== 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:cc; bh=tD4ST1GLkFfCdHd4u8ts0UQsGiLNPqXx0HKCsoNVuT4=; b=5KTRXoSKFwmZWHPdBLgkVf6P8r2+XrbnyxU0KiPyVfDgS/f/vB/F3x9SqL2QPTWNsF nlU7hA1mrFGFs6+ZtQXCzyUJroSywCU0lPznxdf/uPNFrY6GIB7aywaFxu5J+aCM8qAG NEdsHmuudxIgi1IjrKBXc3vz3E/nvL7AIqx8oPd/qL9F6ttyb+NXAm+KY2USDzZs4ha3 EuWq8vQM1TE5VhaBaekXSyOX9s1an4RFXv+QsB/SxGMJhjrcccrYzHV5JVXpNfJzXmIO FhyUugeW5u1Q49TuU7vFtYrxw2bPdwEqkrDMKsLqZSa83/xbdOuBsFTDcS0sf6ps+ov0 jqcQ== X-Gm-Message-State: AJIora8v+Nz3mW+JH8nZZgZwyHrA44viP4zp3GRn7vUpetfuRw2THVWp vfDyk6GUQWpDTO/8o7ZMdozUTw== X-Google-Smtp-Source: AGRyM1vGYy9Kw+JfFrw9aIUXm7WvvvklWWEd28eEP4n/Z10dPqxoPZS1XDoRwK4BuI36L3XZc42XtQ== X-Received: by 2002:a05:6000:1d89:b0:21d:5655:eb72 with SMTP id bk9-20020a0560001d8900b0021d5655eb72mr10702395wrb.110.1658840193779; Tue, 26 Jul 2022 05:56:33 -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.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 05:56:33 -0700 (PDT) From: Mattijs Korpershoek Date: Tue, 26 Jul 2022 14:56:10 +0200 Subject: [PATCH v2 5/7] 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-v2-5-6d42c357cb76@baylibre.com> References: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> 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 To: unlisted-recipients:; (no To-header on input) 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,keys-per-group 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 39c931974bde..f70b02396de4 100644 Reviewed-by: AngeloGioacchino Del Regno --- 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) @@ -102,12 +103,21 @@ static void mt6779_keypad_calc_row_col_single(unsigne= d int key, *col =3D key % 9; } =20 +static void mt6779_keypad_calc_row_col_double(unsigned int key, + unsigned int *row, + unsigned int *col) +{ + *row =3D key / 13; + *col =3D (key % 13) / 2; +} + static int mt6779_keypad_pdrv_probe(struct platform_device *pdev) { struct mt6779_keypad *keypad; void __iomem *base; int irq; u32 debounce; + u32 keys_per_group; bool wakeup; int error; =20 @@ -156,7 +166,20 @@ static int mt6779_keypad_pdrv_probe(struct platform_de= vice *pdev) return -EINVAL; } =20 - keypad->calc_row_col =3D mt6779_keypad_calc_row_col_single; + if (device_property_read_u32(&pdev->dev, "mediatek,keys-per-group", &keys= _per_group)) + keys_per_group =3D 1; + + switch (keys_per_group) { + case 1: + keypad->calc_row_col =3D mt6779_keypad_calc_row_col_single; + break; + case 2: + keypad->calc_row_col =3D mt6779_keypad_calc_row_col_double; + break; + default: + dev_err(&pdev->dev, "Invalid keys-per-group: %d\n", keys_per_group); + return -EINVAL; + } =20 wakeup =3D device_property_read_bool(&pdev->dev, "wakeup-source"); =20 @@ -176,6 +199,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 (keys_per_group =3D=3D 2) + 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-78725 From nobody Sat Sep 21 19:36:17 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 0B814C433EF for ; Tue, 26 Jul 2022 12:57:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239027AbiGZM47 (ORCPT ); Tue, 26 Jul 2022 08:56:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238896AbiGZM4i (ORCPT ); Tue, 26 Jul 2022 08:56:38 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC86A275DB for ; Tue, 26 Jul 2022 05:56:36 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id r1-20020a05600c35c100b003a326685e7cso792377wmq.1 for ; Tue, 26 Jul 2022 05:56:36 -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:cc; bh=Z13ENY+8S7e7mR5lKKViQxv3bJ9pD8bL59xMmRnI17k=; b=fTXqLeB+Ueyf/kQFYoQqCwqr9S5mAFaty7VxI+pA8+ddia5BvIAtZxhIdfLDcKEiD8 uIQA6CQyneloEz3lUFwqsGWcHgZm98oX7fb+edSZ2K0EV1g3Qwz03Hj8HUI8/5nxt5uE isp1TfsivHl7QpCKGOWd4rQqmODsyyS4FpX78pdlcdg0iE+zZ9KmLHU72eY2xX+VdRUf zhsoSvqPy2NA41DMwk+j/nn6ukIwgmxr9YZf1KJWJRstRBKmeZArTQSB+yEIy30LGoni 0cZuBdp4Cp2SYX1zl+NyNpzOwdOFMlwPRlZRjwBlWnYGXeKeu5oSxJJUt5JmJ+4Kbmfu HHKw== 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:cc; bh=Z13ENY+8S7e7mR5lKKViQxv3bJ9pD8bL59xMmRnI17k=; b=PzAWSm62/b0hZ0++zw6R+c8aqedORDi6aoldKL6uaXyZ0kKcWfbXQxrUonwwFqHfyU 36kTce7OtHKkoA669y8A071MurweTDi9MnRC8z4bA2NT9NtFfqtBaJ9j/IpUyu84Xq5W 83LMyyBjWK3xHPE6XlcayQ2VCwphWk+eWHC6gI+KcU7M8OJd4Bi1OxRG/bf18Xyncaev 2VMTKPEiPrHgIzRunygSWt9FgkVXxbmS9uI8om64yV6jiiGtEwggpfqEits8GF6sup93 uGsQu7XMGEgGSIEGuqiwsEp2bn1VQ3RbFrh1JmEGgI4IuoTkq1rSkV59HmOkduyT89dW Kjtw== X-Gm-Message-State: AJIora+pGAShSAg6F1Z+OrLpqXSdXrtGi3Gd+VUrTObjy64o15s8vcQ/ Zq5CiwWieccfPVM/LCoDmEbz2A== X-Google-Smtp-Source: AGRyM1vl+YcUxJuwnM9p6qUahJHbYsyHSqdIeYD+E93+OvEhN+WoRh0CsBISgrEp4sQye2RUf1gZNw== X-Received: by 2002:a05:600c:1f08:b0:3a3:1b00:c201 with SMTP id bd8-20020a05600c1f0800b003a31b00c201mr12396445wmb.171.1658840195057; Tue, 26 Jul 2022 05:56:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 05:56:34 -0700 (PDT) From: Mattijs Korpershoek Date: Tue, 26 Jul 2022 14:56:11 +0200 Subject: [PATCH v2 6/7] 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-v2-6-6d42c357cb76@baylibre.com> References: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> 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 To: unlisted-recipients:; (no To-header on input) 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 Reviewed-by: AngeloGioacchino Del Regno diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts= /mediatek/mt8183.dtsi index 9d32871973a2..9d8fdebaabe3 100644 --- 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-78725 From nobody Sat Sep 21 19:36:17 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 778A1C43334 for ; Tue, 26 Jul 2022 12:57:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238901AbiGZM5E (ORCPT ); Tue, 26 Jul 2022 08:57:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238767AbiGZM4i (ORCPT ); Tue, 26 Jul 2022 08:56:38 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0BC225C78 for ; Tue, 26 Jul 2022 05:56:37 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id w8-20020a05600c014800b003a32e89bc4eso8099042wmm.5 for ; Tue, 26 Jul 2022 05:56:37 -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:cc; bh=Pv8Wb/XUfgDvlUBb7xZCItYlnc14Qbd8klbk0fBR/cI=; b=JQC0LDeiyCTONLO9wJzCR3DZayr2OeSY97UtihVtK2Bg//mORTzwXNPQ+3bZvguNmQ G8HgNDfEkkPic2mCzlej2yTg5sJBWpWQOKJW4hmFNVLOtUNlTHZLmvnLaYTGO57swON9 JnMb07hRleek6DOVe9ppMcxjCwr4KlqQ5aYSfJsjWJ43VFGGsOTp1NkHXUuBaFtIwwkt /bgJS8DYAK1Zn8Fw53JRW+sZoWXXjJs3uWAfYWySQg+Yc5Wpnwa6Ee7Xuue3cpQ89FD+ e5reycwqnH7QxWvpijS7glQJuXIBJEVn4DgeAUml+0SWnmHj/ADspwBVxwBwtXp/TTOc 0OTQ== 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:cc; bh=Pv8Wb/XUfgDvlUBb7xZCItYlnc14Qbd8klbk0fBR/cI=; b=JLYOgepiMOlsi7SPw7i+4HP5a8kjSvHZjIWUhGEZUAHfdlNkdNBk0tG/Jrr6mSRF57 9y8JieWLbH2aG6toxB/Ne+vwnulGWc6FOt8j7q7B87eq9hV6FstAg4MmQk+qyB48AuDa ZTmPxt/rqIiCrU9DlVSPY13tBBVFppZ2TQ+Ur0oBwkJftxejK2vxArgIybOzS5vQMyGP iL3axUmB/N+PwBHlVH9dlj3YJ7AQk+75rIDRkGX8I93qzQFSED5HhIvFg1l2IUn8t+6d /fWUkZgF47NICsikn/Ibt9PeKGbpRVWKT9SYZVVFBv4U7vxE9BExcduyeVHmT101T70J 0Shw== X-Gm-Message-State: AJIora8pPWRrwaXKDp+Br9HSDM05Jx5C8WnHDYySQ3yun+hm+g0whuos s/8cID6ow8bKEiVmXi2Xxh6yvg== X-Google-Smtp-Source: AGRyM1vvvRdQPmoQCB+VQgE8Mf8j6lPcMzabj6A5fEyQBKVFOEwxFB9YOwKu5xXK1jyzEiBm23752g== X-Received: by 2002:a05:600c:19cc:b0:3a3:3cfe:d548 with SMTP id u12-20020a05600c19cc00b003a33cfed548mr12225185wmq.6.1658840196274; Tue, 26 Jul 2022 05:56:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 05:56:35 -0700 (PDT) From: Mattijs Korpershoek Date: Tue, 26 Jul 2022 14:56:12 +0200 Subject: [PATCH v2 7/7] 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-v2-7-6d42c357cb76@baylibre.com> References: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> In-Reply-To: <20220720-mt8183-keypad-v2-0-6d42c357cb76@baylibre.com> 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 To: unlisted-recipients:; (no To-header on input) 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..a1d01639df30 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,keys-per-group =3D <2>; +}; + &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-78725