From patchwork Fri Apr 15 15:36:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12815161 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 31FC0C433F5 for ; Fri, 15 Apr 2022 16:08:44 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3+R6y4IIhGGZT7gRcbCOmZUxl4Cjaaaxs23wQA510fQ=; b=O5VS7QCOKIlos2 ttEzGUPiK6NHvHcVSJwDlKhAri4sfvCuz4tJYv2OviCCjC6nazkWJ6H/dqd8PM/fv6tRQsWvsgQci UfDNK0yVipjMw0fz8PZ6V52ZU1A+dowHrWp/4TsY8T7S6evpd4aacWqKrX0HQNKuF6wzh+slmkace 5993KapTygU79wxB+l3U/hP3XWgFQNUcn0teM++qN6/uA/VMJ2Yh6e7fDzJtwkMZoddGE2lVSO9Il aIPxeaEfA8SM/wT8Cj8Rlor8JhBk2D9BzXrk6zzRkVvqxzvfAALDx6ne4qALNpjQoFaNQm+1+WIOc WoRyUfDngW4cCOWDbKdQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfOTj-00AnYf-Nq; Fri, 15 Apr 2022 16:07:25 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfO0I-00AbNU-F4 for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 15:37:01 +0000 Received: by mail-wm1-x32b.google.com with SMTP id u17-20020a05600c211100b0038eaf4cdaaeso7976922wml.1 for ; Fri, 15 Apr 2022 08:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bjsrGI6b0RLOajPWZ9Roh+05A2VIae/Wu/ntaXQOjlw=; b=3wSns6Qsgrs4cf7sI/QmPRIbAuQFGeQOWy+IwaG4p/9G7wFu2NT3G9NIDox8GsYa83 lIW5eRDkq87Z8CCCA5g4ZABFIx+PXqihPJ7jJ7jd9wDZYLFNkMXHH5HGR66XCPF+9dTG yBbvNBiJWOAM9LE0PerlZPkmCWGL5Ca6Ij+gCgK4iPuD2xWi2jTf4VeR6K0hBkuKstUA eKhtkY7CUj6iRNbZBGBOx99przt0jbd2VdOJuWEFD6h94LZnJNuDAkyx1bSVjSteJyCP +bftqFga/mY4fsJ8lJf2VOI9bkrKtnifVoc8pP8x+0fPRnZD60jCuzijfIPp+zGjyYwG GFyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bjsrGI6b0RLOajPWZ9Roh+05A2VIae/Wu/ntaXQOjlw=; b=E0QMVNKoF+xxyO5HYS8kka0IfIY5LLC24IHuy/dGkY2MeGC4GQ2hmQ2q25BBKHXBVA Y6k07QbJaCH7szpMVMee34R/Dj/yTLeWMuo3/4ntFWoTeqToFYRSotIKGQLa/4kK+1TK p6DUjD8AhGaL0egWxt4pZ8X8ZJX1khcVf+LSBBiuNVbjHzB7Tg/AZWb2fMqEd36aHm0A LEiGXJr1AHqDGWxot+KviTws3Pw5JSOdXVDomNogIMIdX9jvpTprOYg/sNhcq5ouiiOp sm1kyqhUI0A5N3jQnbwEosFF7HICz9tCQPhbEdRgeoHvF5l67oIjFHhBfDKy8wjTCROf I4Og== X-Gm-Message-State: AOAM533iIMVcsyoi85GvOgxKIK1rdN/xtfZKtANyaCvTnNrsDcX8dT4C cxaHN695XfZeLoCtYpAxsoqvmQ== X-Google-Smtp-Source: ABdhPJys6pbLabTkeRziK+wc3YsUE7sp3OaYxjUErcU8DVV+dThnk4NTfuDDdx9muo/luGe71Ahcxg== X-Received: by 2002:a7b:c8cd:0:b0:38e:c2c1:5219 with SMTP id f13-20020a7bc8cd000000b0038ec2c15219mr3731923wml.151.1650037017310; Fri, 15 Apr 2022 08:36:57 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id c24-20020a7bc018000000b0038a18068cf5sm8459292wmb.15.2022.04.15.08.36.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 08:36:56 -0700 (PDT) From: Fabien Parent To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Fabien Parent , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/7] dt-bindings: input: mtk-pmic-keys: add MT6359 binding definition Date: Fri, 15 Apr 2022 17:36:23 +0200 Message-Id: <20220415153629.1817202-2-fparent@baylibre.com> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220415153629.1817202-1-fparent@baylibre.com> References: <20220415153629.1817202-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_083658_650590_7E8E6F8A X-CRM114-Status: GOOD ( 10.87 ) 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 Add binding definition for the support of the MT6359 keyboard driver. Signed-off-by: Fabien Parent --- Documentation/devicetree/bindings/input/mtk-pmic-keys.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt index 9d00f2a8e13a..afe9062a4dc7 100644 --- a/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt +++ b/Documentation/devicetree/bindings/input/mtk-pmic-keys.txt @@ -13,6 +13,7 @@ Required properties: - "mediatek,mt6397-keys" - "mediatek,mt6323-keys" - "mediatek,mt6358-keys" + - "mediatek,mt6359-keys" - linux,keycodes: See Documentation/devicetree/bindings/input/input.yaml Optional Properties: From patchwork Fri Apr 15 15:36:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12815163 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 5B96DC433FE for ; Fri, 15 Apr 2022 16:09:56 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ICk8N3xjPCEaIvFhaUiQ/hi+PV7/OJrXoGy/yOZTAA4=; b=RgNC9dqLJenzRF QKZsW0dLj5ivseOGGPPHtVzzOqXDuXEbxCJVJDR0nkBNu5TSeWyMJaGP1FscgGEtDs9FWBrjxY+9H MsN1if9SzquHfEVWcFpmNR+9nZGklPsGyRVd7ahZP6tXK5YY4iI6vSavPjMF9fzUT088CCJfKhVhI 6VEonU3ulh99vdRK4l/dJ/ZLZGHqQDp1WRwa2fB/6j3IyNHj4ZgkEpnFrtj7v5ASuQxxRzWMyDyEe 9rZ628RZoHtcyBevMbnEEIG1TxnAzROkbtkfShJWcmAidwU54ZdTwQ76CmxJMDwPw1EJEsJ63PMAh Qa6q7AqHGdYiR3Gdbwbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfOUz-00Ao4i-13; Fri, 15 Apr 2022 16:08:42 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfO0K-00AbOe-7c for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 15:37:02 +0000 Received: by mail-wr1-x434.google.com with SMTP id i20so11022580wrb.13 for ; Fri, 15 Apr 2022 08:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M8lmuusreyEB7Gud7csUtw7tpltYDp61Pfem/SE6pZk=; b=Td7opDcQaMHI3JFBSWitUPOiGjC1BZcN+VXkNxXfzTacxCPZd+RlBamsom/P6pj6hg EQXrRuHGXiNXFQtSrR3QL1QbiiNbjPTITd8XdGNJyB82Ht5mkqdGh5NTUY6JlXUr5pcI 1GhmEzwbf39+IAX+BfrK0XFv21dUff4s5Uie+EEAFN6tGnT8k7GalPtJr0bbWKkJ/t+I LCf964j2RpBGLIc9wst5Vwsn1c4F+klbJrplVP42wMIlCUMJwMzI+m5JAQXDMcnvfCSy EI6YeGHcj7aHLbpDBaAkPXjZMQojCrSqhAnsraX9fvf0KOLJVNgLWd+mzHnJMKoTfYCv CaNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M8lmuusreyEB7Gud7csUtw7tpltYDp61Pfem/SE6pZk=; b=qP+IyEMn6FdIgTCXBfYvg8ZtPm9GJOXac79fEzrqpbFauLjEFgZNpoMN5Pt+3SMLWE zfPDvIXtwnvIaas0cJqeC4ZpHCcfeCrumSmlNU1a9Ihm7fhFxTUyPV2Y10SB6qcZOkse SnTZyrHbTFTa6TmhbL70xvzK2eHcazeyHs0K7/AFOu6SJaZ9RdoSpva+zd7PmuSqXRLa UaayFF9uCLav94lUTQCq5GG14OixocrzkUcfudvKjJf/khoz8OjXPca4Qq+acRI0Qiwn ilL8AmKQ5cYczrnE5zQiuYSHEEvb0Vt58LzPT7fL2P1w20ZTyVFZYKM2VtBWHcee/p6V Ab4w== X-Gm-Message-State: AOAM531JHPpp4hW/euch6KXifODYBfAOHFsH6AYhIsjWh1S0PwLU3if9 EYnFRK9rdNh/8J0HBcoBtlc3tg== X-Google-Smtp-Source: ABdhPJyicB0kEbhTFgNRydBA+wCxkMiQhnsXg+5hKIJU185vpb3FHT12FRvF9HoZokb6+MthOFW4HA== X-Received: by 2002:adf:d1e3:0:b0:20a:7841:b9b4 with SMTP id g3-20020adfd1e3000000b0020a7841b9b4mr4299001wrd.61.1650037018548; Fri, 15 Apr 2022 08:36:58 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id c24-20020a7bc018000000b0038a18068cf5sm8459292wmb.15.2022.04.15.08.36.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 08:36:58 -0700 (PDT) From: Fabien Parent To: Lee Jones , Matthias Brugger Cc: Fabien Parent , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/7] mfd: add missing defines necessary for mtk-pmic-keys support Date: Fri, 15 Apr 2022 17:36:24 +0200 Message-Id: <20220415153629.1817202-3-fparent@baylibre.com> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220415153629.1817202-1-fparent@baylibre.com> References: <20220415153629.1817202-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_083700_308137_A5A06EC1 X-CRM114-Status: GOOD ( 10.91 ) 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 Add 2 missing MT6359 registers that are needed to implement the keyboard driver. Signed-off-by: Fabien Parent --- include/linux/mfd/mt6359/registers.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/mfd/mt6359/registers.h b/include/linux/mfd/mt6359/registers.h index 2135c9695918..2a4394a27b1c 100644 --- a/include/linux/mfd/mt6359/registers.h +++ b/include/linux/mfd/mt6359/registers.h @@ -8,6 +8,8 @@ /* PMIC Registers */ #define MT6359_SWCID 0xa +#define MT6359_TOPSTATUS 0x2a +#define MT6359_TOP_RST_MISC 0x14c #define MT6359_MISC_TOP_INT_CON0 0x188 #define MT6359_MISC_TOP_INT_STATUS0 0x194 #define MT6359_TOP_INT_STATUS0 0x19e From patchwork Fri Apr 15 15:36:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12815164 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 31521C433EF for ; Fri, 15 Apr 2022 16:10:46 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xgiQXTk/QrqjrqgxpAAYKPS7D+iXrnKZ01PFzFK7gjs=; b=L7fa4RPP5MXXAL 3JXyntAqBjyRyJ8KV9A1w/6Ffg7NVf7YbIw14v9JvUuS2yAGNWkAI+L+X+8pPb2iEAV3dVLLsMLOy gweDC11yNSVT1Cyr7rbYC8pEc9JZq+HfsHctOmJmhMaZsUePAIgn1wFEAMmVRbiAlcERKxZkh0Suc i0tv06DQZ2LLX3qwgWFm5+41/XfuX51SJ2abBPr7tiin+KKewbCvT4h0qhp4J4xiPEPndn9NaC/lQ a61WZwLcp+NJ/8gKzZ+To1wLnY5jgLkcmlxeH/Rx9qBrSD1wf0hUqxoXcuXhd9y4ndtshbRVTMIIC cQdHWCdM8xjR0oMOdw/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfOVn-00AoR7-Ty; Fri, 15 Apr 2022 16:09:32 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfO0M-00AbPo-JG for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 15:37:04 +0000 Received: by mail-wr1-x435.google.com with SMTP id r13so11036142wrr.9 for ; Fri, 15 Apr 2022 08:37:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xf7zHgQF0LLYfyyhuEnZersihES6pOQgkISOqNV5ZRE=; b=xivuA2t3IqjLqIoQ9DSn1tMrItfP5C3kkoXLWvVqH9w2x08/1vOWwiFUeLyckHqQK7 vANKxFbdrzik52hMtA8dmDDfP8zN7cEsf9psBAV4fFw2IJW5Kvi4WRQ2n/bblCJuagqX Fx2zCKxwYqijw8U0R9G7lFq7pqV1zofoFDnhFiXRcsiY7ce9odvnfWaF+Xl/pC+ND3BI 94009nqeRJk3aFoGdIfdNXKhsJVSntrjRHiXylMsry0pwSVWdSSy1imAEcESzwkERfWP /NTB7H2oOoKDjiZnSwpJOA1R4z6V80qfUkxCKmYlepQLh57UdDOVMVKPzzPnAfsys7fJ kb8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xf7zHgQF0LLYfyyhuEnZersihES6pOQgkISOqNV5ZRE=; b=hiOfdr8Q7KFE4oNeGOQBW9kHWcBg+q2KWgkAfXHoT9ZzqjqchmdXpXbjSvh3UefvC0 9eu7y6gc+y4lMAoCLvCNf5xCD+L8xK39i1gyyq3wnR/OkalhLkcXhH8mgjdO+7UkhF5s 36Em/pabOLBICI6z+05iKGFuTX7BT0lJRjrn0RRt28fzfGnFQGlpjeLBmh8WhcGM08ID 5bMVU//1kXnXwR+g644L7qHISI5tRejJXuIYga4a28fvx65MS0ml3Bg6S/vtv85Mdrha hYyxLcgNFftK3xI5ycub4tNk3riifbc+onB1QHcqilC4ZAUHfCAmYkvMClO6UBaDP37D dSVQ== X-Gm-Message-State: AOAM530gKSv7qFC3B0s692pz8fBJi3nLn7bhkTAY7ZgeSwSQCDldiMyV 6BqyZjVcENo5wYqdCqNBibnktQ== X-Google-Smtp-Source: ABdhPJxQk5vHua4beVYxWbc+1z+j8NCqUCbLO9KGJcNxCFujTtigBhehGKkQbFGNgxlKqJVhVZebFA== X-Received: by 2002:a05:6000:1684:b0:209:7fda:e3a with SMTP id y4-20020a056000168400b002097fda0e3amr5705338wrd.709.1650037020002; Fri, 15 Apr 2022 08:37:00 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id c24-20020a7bc018000000b0038a18068cf5sm8459292wmb.15.2022.04.15.08.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 08:36:59 -0700 (PDT) From: Fabien Parent To: Lee Jones , Matthias Brugger Cc: Fabien Parent , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] mfd: mt6397-core: add resources for PMIC keys for MT6359 Date: Fri, 15 Apr 2022 17:36:25 +0200 Message-Id: <20220415153629.1817202-4-fparent@baylibre.com> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220415153629.1817202-1-fparent@baylibre.com> References: <20220415153629.1817202-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_083702_691819_6A4EC670 X-CRM114-Status: GOOD ( 13.24 ) 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 Add the MFD resources in order to be able to probe and use the keyboard driver for the MT6359 PMIC. Signed-off-by: Fabien Parent --- drivers/mfd/mt6397-core.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index bddb40054b9e..1a368ad08f58 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -54,6 +54,13 @@ static const struct resource mt6358_keys_resources[] = { DEFINE_RES_IRQ_NAMED(MT6358_IRQ_HOMEKEY_R, "homekey_r"), }; +static const struct resource mt6359_keys_resources[] = { + DEFINE_RES_IRQ_NAMED(MT6359_IRQ_PWRKEY, "powerkey"), + DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY, "homekey"), + DEFINE_RES_IRQ_NAMED(MT6359_IRQ_PWRKEY_R, "powerkey_r"), + DEFINE_RES_IRQ_NAMED(MT6359_IRQ_HOMEKEY_R, "homekey_r"), +}; + static const struct resource mt6323_keys_resources[] = { DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_PWRKEY, "powerkey"), DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_FCHRKEY, "homekey"), @@ -122,6 +129,12 @@ static const struct mfd_cell mt6359_devs[] = { .of_compatible = "mediatek,mt6358-rtc", }, { .name = "mt6359-sound", }, + { + .name = "mtk-pmic-keys", + .num_resources = ARRAY_SIZE(mt6359_keys_resources), + .resources = mt6359_keys_resources, + .of_compatible = "mediatek,mt6359-keys" + }, }; static const struct mfd_cell mt6397_devs[] = { From patchwork Fri Apr 15 15:36:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12815165 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 827E6C433EF for ; Fri, 15 Apr 2022 16:11:29 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xOEktQzF3qYXeaV9P2TnGy1K8+BviAHSxQD+xSYulLE=; b=GBBGiXZA+V0Wm2 WQmvAjbH3SI26+we2IAY5MRLCy8O3b4keU22eAHaA4qiy3oWuel/ymMReUFlAA4IbrHiz/eFlWJX6 vi+IRP0jOsyT0vCAMMPryRAAJ1uFCPLnwQt/wNVkgP9H4IYEpOv0Z/bkKjLChuTAYR5CJmHqPmAWt 17GklA0Q6V1U5r74MhpWT2mpK3Dn62EFmru5udwO0pmAzJEnRvXT+VVHAGcklNKbIqNA4cR9/6F7t CkU+yZVvtgTw5eUOF84Lv+DUOotfgibigsVJVHtb43TzevuDrMxGQeFLyqRLvoMU0PXHlvWjv++lL 795b3GuBnVkAZSvbbxmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfOWU-00AomA-7s; Fri, 15 Apr 2022 16:10:15 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfO0N-00AbRD-Fu for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 15:37:05 +0000 Received: by mail-wm1-x332.google.com with SMTP id m33-20020a05600c3b2100b0038ec0218103so5223371wms.3 for ; Fri, 15 Apr 2022 08:37:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WDWruGhytuHi8Hvh9Dd5EXmCI8L1q6rKOX9fLidj6Ec=; b=7PMInzua21fpHF4kYL57dFlermowOW/PqKGwQW3jR3av/kD270Yz7hbxnumJtgBQZe qTv0oUPTjvZJ/BIK4h9Rfj2/YizFRGCoEJTPeJV7gLczJ9GUhdouEgHr4dTvJcvc7DWA ie3j/T1pAG0eWAf8WjtV3bekFzyv+C2k78Igwue3O8AULtfm08Hb0K5xw19m0BWHGPUL /0YZN1+SUuUsmv8pGx7v5SS6Mdpln+x0dEEX9NoSK5i5fdB+ZqNwDcGkZuPaB3q9g9HQ am556YuRXY6z19YPvt+WqjCMBWDsjvB5lX8ib7SaCcTkaBKkrVxYzfJdHgMY0U79NvcT veIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WDWruGhytuHi8Hvh9Dd5EXmCI8L1q6rKOX9fLidj6Ec=; b=DBI+03A7rBxFLTJEmsQs5KTfhtlt2ZrgnSYf1kSWAZT0jsOvhSvG7Z9DCO+/WM3y5t Pr0LVg7K2KiY7XMdHDhtPiqGsoqZbvhNzCv+Drq+q/rpOkZoqYyhdE9bw/UuYvVk9RMK XoBFqQBUEPWDwSmMKH4VO/s0RmKHLSBK1qg8e+lNh6GyQgZQDlWA6qOXT+tpEV6gUvDQ QQQ56UpvBzPE/ZKoLZfxrhLlhhvE6geN0V0xRn12W+joDcv+rrnkfEqrLFLDHFOZOPif R/IKgdbdww+smlZWQR5S1iuY3Kqq9GwS7WSug7vvO0qo0ZdkNLMWyYSVRQ+99zf/uSXN t1mQ== X-Gm-Message-State: AOAM533vIGeEPrFPFkg+jMX/LsESgHD2Ny9mokMxfgj7rU9GdGm3cLhv M6+FCKCRuaDXKUBKS0ouHvj59w== X-Google-Smtp-Source: ABdhPJw+A/iRYwe+lAeKns1b6yTF/VsCPkstrY3ipuTjcg6HrcxfTo54JB/+0tA8BqHvGSAeVJOP9Q== X-Received: by 2002:a1c:2b05:0:b0:392:5bfb:a0e2 with SMTP id r5-20020a1c2b05000000b003925bfba0e2mr521128wmr.165.1650037021444; Fri, 15 Apr 2022 08:37:01 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id c24-20020a7bc018000000b0038a18068cf5sm8459292wmb.15.2022.04.15.08.37.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 08:37:01 -0700 (PDT) From: Fabien Parent To: Dmitry Torokhov , Matthias Brugger Cc: Fabien Parent , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] Input: mtk-pmic-keys: rename platform data struct Date: Fri, 15 Apr 2022 17:36:26 +0200 Message-Id: <20220415153629.1817202-5-fparent@baylibre.com> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220415153629.1817202-1-fparent@baylibre.com> References: <20220415153629.1817202-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_083703_557380_A0006219 X-CRM114-Status: GOOD ( 16.20 ) 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 Rename the struct that is given to the .data field of the of_device_id entries to reflect that this structure will not only contain register definitions but also other platform data. Signed-off-by: Fabien Parent Tested-by: Mattijs Korpershoek # on mt8183-pumpkin --- drivers/input/keyboard/mtk-pmic-keys.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index c31ab4368388..a0da644fe93d 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -50,12 +50,12 @@ struct mtk_pmic_keys_regs { .intsel_mask = _intsel_mask, \ } -struct mtk_pmic_regs { +struct mtk_pmic_keys_pdata { const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT]; u32 pmic_rst_reg; }; -static const struct mtk_pmic_regs mt6397_regs = { +static const struct mtk_pmic_keys_pdata mt6397_pdata = { .keys_regs[MTK_PMIC_PWRKEY_INDEX] = MTK_PMIC_KEYS_REGS(MT6397_CHRSTATUS, 0x8, MT6397_INT_RSV, 0x10), @@ -65,7 +65,7 @@ static const struct mtk_pmic_regs mt6397_regs = { .pmic_rst_reg = MT6397_TOP_RST_MISC, }; -static const struct mtk_pmic_regs mt6323_regs = { +static const struct mtk_pmic_keys_pdata mt6323_pdata = { .keys_regs[MTK_PMIC_PWRKEY_INDEX] = MTK_PMIC_KEYS_REGS(MT6323_CHRSTATUS, 0x2, MT6323_INT_MISC_CON, 0x10), @@ -75,7 +75,7 @@ static const struct mtk_pmic_regs mt6323_regs = { .pmic_rst_reg = MT6323_TOP_RST_MISC, }; -static const struct mtk_pmic_regs mt6358_regs = { +static const struct mtk_pmic_keys_pdata mt6358_pdata = { .keys_regs[MTK_PMIC_PWRKEY_INDEX] = MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS, 0x2, MT6358_PSC_TOP_INT_CON0, 0x5), @@ -255,13 +255,13 @@ static SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend, static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = { { .compatible = "mediatek,mt6397-keys", - .data = &mt6397_regs, + .data = &mt6397_pdata, }, { .compatible = "mediatek,mt6323-keys", - .data = &mt6323_regs, + .data = &mt6323_pdata, }, { .compatible = "mediatek,mt6358-keys", - .data = &mt6358_regs, + .data = &mt6358_pdata, }, { /* sentinel */ } @@ -277,7 +277,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev) static const char *const irqnames[] = { "powerkey", "homekey" }; static const char *const irqnames_r[] = { "powerkey_r", "homekey_r" }; struct mtk_pmic_keys *keys; - const struct mtk_pmic_regs *mtk_pmic_regs; + const struct mtk_pmic_keys_pdata *mtk_pmic_keys_pdata; struct input_dev *input_dev; const struct of_device_id *of_id = of_match_device(of_mtk_pmic_keys_match_tbl, &pdev->dev); @@ -288,7 +288,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev) keys->dev = &pdev->dev; keys->regmap = pmic_chip->regmap; - mtk_pmic_regs = of_id->data; + mtk_pmic_keys_pdata = of_id->data; keys->input_dev = input_dev = devm_input_allocate_device(keys->dev); if (!input_dev) { @@ -310,7 +310,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev) } for_each_child_of_node(node, child) { - keys->keys[index].regs = &mtk_pmic_regs->keys_regs[index]; + keys->keys[index].regs = &mtk_pmic_keys_pdata->keys_regs[index]; keys->keys[index].irq = platform_get_irq_byname(pdev, irqnames[index]); @@ -358,7 +358,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev) return error; } - mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_regs->pmic_rst_reg); + mtk_pmic_keys_lp_reset_setup(keys, mtk_pmic_keys_pdata->pmic_rst_reg); platform_set_drvdata(pdev, keys); From patchwork Fri Apr 15 15:36:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12815166 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 24253C433F5 for ; Fri, 15 Apr 2022 16:12:16 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=F/ZihS3sdbOSsbbIBcJJUu+dEBlF9seyMSp9QK83FBA=; b=1Vopi/0za43VcJ hbrglAjTU2FAHvoojplXW+05biZNFzi4xpp8N/nSuGk6HS2TkfMZj2CmU1+klgjgvWTTnX/QR34n4 UYOYRSEwXoEORJtmVz0iDyDYNK2YcGer7UKnVRuUIXJoW0NY29tpWyeL55XRPomYbs5jQAxT3CqOW iuVBCGSOS1JvHc4Yks+5btKSo8E4x7MSpCKbfdsCJOIZb2v/JZljiPefMXB3djSRiwj2ppWKcJrmC e4+04e8c86rj8F6xw71e5cc8mD5/a8SKE3jRues65K+VYHNkV4teRoOxJs2tNqRhK5PXs0ZD10V/X JsdhEnI7sTU4XWivz5Bg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfOXL-00ApAP-EI; Fri, 15 Apr 2022 16:11:07 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfO0O-00AbSC-7C for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 15:37:05 +0000 Received: by mail-wm1-x330.google.com with SMTP id u17-20020a05600c211100b0038eaf4cdaaeso7977069wml.1 for ; Fri, 15 Apr 2022 08:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9jbG8zhZKbTiE7ZNDTYGG07uuZNvNsy0rqtU9fqaUgM=; b=r2+ahgDRgkvtXt6wiCkeTrKl7ytYvippEBpvGHj4DgfAHDnQMrEame754zG4uQVNsE rfI2ZE9y8R67O6QaTY0uE58yVfMG/3dl83oT5Q/98Q42/Seugf2HPqrvSDIeqnJXhRmR JekwubM7J5hX4B2qYKeVeSGEwlzYf58zMQtn9nBEDe1rdXtIQKQiX9qdA3zxGff3a6jg naVi5VnD0LlyhURGOhSfS0fXxKQ1hU5VerYHSSzSWNpDLOXAmt4HR7y2t4FiXZQQUzU+ vNQPi6f4IFu0vX4u290SrXld80lfMhq/aJwIIZoaDIRg7W2gxjzk2zceNBtvKHx42W3M +eTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9jbG8zhZKbTiE7ZNDTYGG07uuZNvNsy0rqtU9fqaUgM=; b=AHFO/eb/27IosxbL8Dz6wYOjr4Xb5e51Rokj4s/LgDqsa/FT4tMNlvB8E61H0q6Bfi 2PSUUQ9dBZ67SgYBQkCjMU/r9Qy649dGrusrA7mVawbKfLPPlefW4H2ngAO7sxW00fJf eztT8hJ+a/EcC7OBeehKQ47b98NPRCcqaOgUdowducNxi8NGQf/b2OrtRz7iC4Q2KeIl tScxNR8XNvuXNeEYB7QpD2Oh+hyv5gNtlaH7a7Ahvl9cUZSL68f08v711/8bulra4kZt DcX/RGzW+7O4ex70DS/W1n3GsoiIHRSNqDf+7nKHryVsoRNkdytTeCWQnL1QAc0ym/30 VRZg== X-Gm-Message-State: AOAM532Tv4NjfUidxTEQvhYGWS6IdaVb+E9QhXyIBOvhazJd1CcbFbYG uQRUcmxGjTBgIOdupt2ZuUZwwQ== X-Google-Smtp-Source: ABdhPJyZ8vjESL1eqz3zOr0c6KrLsevpBtztK3bxcy3XYw0G+YAKg44wfGRodkrXogvKzjUSa6pUBQ== X-Received: by 2002:a7b:c057:0:b0:37b:ebad:c9c8 with SMTP id u23-20020a7bc057000000b0037bebadc9c8mr3745781wmc.61.1650037022651; Fri, 15 Apr 2022 08:37:02 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id c24-20020a7bc018000000b0038a18068cf5sm8459292wmb.15.2022.04.15.08.37.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 08:37:02 -0700 (PDT) From: Fabien Parent To: Dmitry Torokhov , Matthias Brugger Cc: Fabien Parent , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] Input: mtk-pmic-keys: add field to store if PMIC has key release IRQs Date: Fri, 15 Apr 2022 17:36:27 +0200 Message-Id: <20220415153629.1817202-6-fparent@baylibre.com> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220415153629.1817202-1-fparent@baylibre.com> References: <20220415153629.1817202-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_083704_295579_A73D5056 X-CRM114-Status: GOOD ( 15.68 ) 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 MT6358 PMIC is not the only PMIC to have release IRQs. In order to support more PMIC that supports release IRQs, such as MT6357, MT6359, and possibly others, let's add some field in the platform data to indicate whether a PMIC support release keys. Signed-off-by: Fabien Parent Tested-by: Mattijs Korpershoek # on mt8183-pumpkin --- drivers/input/keyboard/mtk-pmic-keys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index a0da644fe93d..609b87afd020 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -53,6 +53,7 @@ struct mtk_pmic_keys_regs { struct mtk_pmic_keys_pdata { const struct mtk_pmic_keys_regs keys_regs[MTK_PMIC_MAX_KEY_COUNT]; u32 pmic_rst_reg; + bool has_key_release_irqs; }; static const struct mtk_pmic_keys_pdata mt6397_pdata = { @@ -83,6 +84,7 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = { MTK_PMIC_KEYS_REGS(MT6358_TOPSTATUS, 0x8, MT6358_PSC_TOP_INT_CON0, 0xa), .pmic_rst_reg = MT6358_TOP_RST_MISC, + .has_key_release_irqs = true, }; struct mtk_pmic_keys_info { @@ -319,7 +321,7 @@ static int mtk_pmic_keys_probe(struct platform_device *pdev) return keys->keys[index].irq; } - if (of_device_is_compatible(node, "mediatek,mt6358-keys")) { + if (mtk_pmic_keys_pdata->has_key_release_irqs) { keys->keys[index].irq_r = platform_get_irq_byname(pdev, irqnames_r[index]); From patchwork Fri Apr 15 15:36:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12815175 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 DBF69C433EF for ; Fri, 15 Apr 2022 16:13:45 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OA+LflyPFpiYHIOb2udbts7Ebt9foaVxUGq8mTXEtoY=; b=tjbqyThRgxmddx F+1hH5jkKt+wSgT9cDUfLad7S8fz4uEYdvQgsrH4HYFg5jQm2m2kJMLi+Ew1gMk4roL4FLHaWmjSA Ox5RzNEeqXVlnjvRgk0pHhTjICZNPtFpOjmQ08D2HJsXucYhhOdiAEvlBan0hhffXM/QEyEncSLML bZ/OX5azQG80SP0KKyFRYQYHu0Z9gIH7S/CjXU2IghQJleF93cQDM5QBJvX3YlABsustAEAKdO4cq VWNjdY+oEFOdQowAV191uE0+PQErMHpnWnJeG0nl8ewUNzmOWSp9fVvO83vHyPEH1uDfc1oDkAnOV c7ocpEu3JuqUj0ops26w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfOYg-00Apnj-I0; Fri, 15 Apr 2022 16:12:31 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfO0Q-00AbTm-EF for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 15:37:08 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 123-20020a1c1981000000b0038b3616a71aso5227036wmz.4 for ; Fri, 15 Apr 2022 08:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aOuA22Fnc3OP61xN2U3nVIxEXPTaTGZoGkevrFGNYyg=; b=DyqkpaQ0iLmMxTSpSfK+MHcWI4dG85kzMTTwtuWYeCRYtIbx5bXRyT07WmWzHsFmI+ LI7CkRLc+ATmkIkjkRB9h7V4Mh98t7/3VuRbUF0WCDbS6f2SXmzSakByyD0Riyyh+BHk z5lhZdYKONmGFs7ue+eR/heV4ycjYDy1Q7Tc41VQvf4+ih15zXlglAOI8WCf6WOV2LnS 6JnC6vlrDmKK02wcArS0L3jp8LUEjEwldHeD6qMv0Af21Wnar178mT4n7B4ByVi4nMAb UccU/HRTf1L9z8lDcTAvb9l2ETglTQ1praXDN3tBtyA2Dp/Hudnldqd4NOKzHhFW7Xqf Ql/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aOuA22Fnc3OP61xN2U3nVIxEXPTaTGZoGkevrFGNYyg=; b=Y0M7J3AYbg6K+FlLZSYuJriVFJY3Uhc4jAnqpat/r5g/RE3aoOTXhuUIPRu5WlLwmI wmjWBAR0w/KPG4soBFFj9xJ/UVkmZocbodQVrjlapHHkoHzYvuorDHu/pNHyebv69Kvj iNBnn4rqVbnRy2aX4mBKl8KZkk+2hcmfgVd5sW2okWEIe2+mhtGdyMayGLAH7lU4yAFX EZCZUH71gmEf4d0D9E32ZM7q6U6X54jajY7ximHHsLPSaBlrozs/PNfx0IWY788tFnUT 8EXt1JSqoX62R6qKUHRtEWFejLL7IwS66CRtqzE4eIPbU919JBHWRqe2ZxAlLdtE/BIe ixVg== X-Gm-Message-State: AOAM532RhJQT+qkSeXfMWvspP8Z0JFb0pa98dYUazKM5nGRj96lLugam IFdhgDyGTAjjUllz0y2JUwIS4g== X-Google-Smtp-Source: ABdhPJx03NY3RAywsaD42S7tmhUjufCPfkN1P5jZuGzXIexElqoiAjwpZmPJGrrZ71UlLBgVNggQLw== X-Received: by 2002:a7b:c384:0:b0:38e:6b47:58c4 with SMTP id s4-20020a7bc384000000b0038e6b4758c4mr3783287wmj.134.1650037024073; Fri, 15 Apr 2022 08:37:04 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id c24-20020a7bc018000000b0038a18068cf5sm8459292wmb.15.2022.04.15.08.37.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 08:37:03 -0700 (PDT) From: Fabien Parent To: Dmitry Torokhov , Matthias Brugger Cc: Fabien Parent , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] Input: keyboard: mtk-pmic-keys: add support for MT6359 Date: Fri, 15 Apr 2022 17:36:28 +0200 Message-Id: <20220415153629.1817202-7-fparent@baylibre.com> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220415153629.1817202-1-fparent@baylibre.com> References: <20220415153629.1817202-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_083706_567783_489FDD85 X-CRM114-Status: GOOD ( 12.93 ) 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 Add support for the MT6359 PMIC. Signed-off-by: Fabien Parent --- drivers/input/keyboard/mtk-pmic-keys.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index 609b87afd020..115ed4aaae81 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -87,6 +88,17 @@ static const struct mtk_pmic_keys_pdata mt6358_pdata = { .has_key_release_irqs = true, }; +static const struct mtk_pmic_keys_pdata mt6359_pdata = { + .keys_regs[MTK_PMIC_PWRKEY_INDEX] = + MTK_PMIC_KEYS_REGS(MT6359_TOPSTATUS, + 0x2, MT6359_PSC_TOP_INT_CON0, 0x5), + .keys_regs[MTK_PMIC_HOMEKEY_INDEX] = + MTK_PMIC_KEYS_REGS(MT6359_TOPSTATUS, + 0x8, MT6359_PSC_TOP_INT_CON0, 0xa), + .pmic_rst_reg = MT6359_TOP_RST_MISC, + .has_key_release_irqs = true, +}; + struct mtk_pmic_keys_info { struct mtk_pmic_keys *keys; const struct mtk_pmic_keys_regs *regs; @@ -264,6 +276,9 @@ static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = { }, { .compatible = "mediatek,mt6358-keys", .data = &mt6358_pdata, + }, { + .compatible = "mediatek,mt6359-keys", + .data = &mt6359_pdata, }, { /* sentinel */ } From patchwork Fri Apr 15 15:36:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabien Parent X-Patchwork-Id: 12815174 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 A7124C433F5 for ; Fri, 15 Apr 2022 16:13:02 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BFaiJNNzPH5CGEK38yrnqDq97WG4EKW8VFJObhK/raY=; b=DnO0k3J+Pa33R8 NoincsagQwWkX2rm7MQXM00OOW8ANO5kei0gsFRXUkRS2/GHbCEjTmv9pWfxB9NItQtovHCgUfysF REwCISihojyzs0chlUwooZbfeVPdQbcjcTuqRIiR+/ydUs4FJKZTS1TlaH+GTUmaosVCE3VDW/cW9 7G3Xh6UgiGYo2x3I1ZhFBlvA30uHgDRura+yHtyirFUn6nUQ5RXl+zAFPgpRyjVHOfYlvvskk5Ujr zR5S/SjVCHKtvBWQvyewNu2eXgfisC0pETUny+4LmhAbKf6H+AnS7Mzn84Az9UNl3+VnRSV2t7+n0 KYpawZCcR49thPi1m9rg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfOY6-00ApWI-Tq; Fri, 15 Apr 2022 16:11:55 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nfO0Q-00AbUu-HV for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2022 15:37:08 +0000 Received: by mail-wm1-x32d.google.com with SMTP id l62-20020a1c2541000000b0038e4570af2fso5221034wml.5 for ; Fri, 15 Apr 2022 08:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=k5Hrv/6P14wuxEAoJwZ4UjPTdo8Z9vjBoCCIqwWWzR0=; b=KcwavP/bNwYUDWjOLWTRjKSPXsBlI7T5EpiuJmJHyK758VWcq/UQxaolWi2DTzsz9t kJuNEMoCZHya0SOybBjkjd6emwgywcjD49HjNWfdyZPD7Bd81Y+hnXD04fVhoPUBrk8Y fgT9MkofQkarujUGccZVT1ZoMCQdjGBvWUpmpZ6uDiFtXJQwNHdkpyzkLT1xIPpI/4yP SuZI10jpSceLhZ3RJXMHKZ6QYkcI/3Ta8+0hbgXXjc9+rqa5EVtgBDGn/iMYqpqLBQAv F8yHel57Vmpjzl7LYT368XTN3hQhvJTTXXKPyscFT7yD73vOZP+1J6QAOlVIaLx5LGAe p9/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k5Hrv/6P14wuxEAoJwZ4UjPTdo8Z9vjBoCCIqwWWzR0=; b=GdwBgLTcU7+pXusYGMaTH8d4ddawnb//Vd5xXY9Pd2syft+aHjJV34LpNLoo5hQuny eWqQXFgy5VP87MNOVUAjpu79gaSS/+o8JP/SrELblvr8ib0x9X5iQAPZgzON4/LOJcYn VQPlN1Fqo4y3rkrc3oXMl/ExD/cLms9R7YY4r4GMLfTZiY0KrEfovh1JyWafjA49ShEp mevSq4U5bMBAT9aANe98X9mZeimSq7Wr0e8GWrn/7/nazZkbud8AXB/IMm8FExVw6WBk Ooq6i4yI9267za9AScD2r+WC3JBp73YuK+GdVthPLJnNu4PvsJ/N2LfFI8bEycmDDAan +uFg== X-Gm-Message-State: AOAM531+hTI8gFJC/xOEpB6MkQx32GAKbnVB8M0Ymt08cyNshesgJ9QH 0j5uXUS5HuzBS+U4a5puKnNq6A== X-Google-Smtp-Source: ABdhPJxP2hHLChu7w5jeTrumBfb7Vqd/IYiSc2LBN1TOeIrWhbLE73c5LQrfRoy450OfnBz2o7LoOg== X-Received: by 2002:a1c:4c05:0:b0:38e:b736:350 with SMTP id z5-20020a1c4c05000000b0038eb7360350mr3878657wmf.65.1650037025270; Fri, 15 Apr 2022 08:37:05 -0700 (PDT) Received: from localhost.localdomain ([88.160.162.107]) by smtp.gmail.com with ESMTPSA id c24-20020a7bc018000000b0038a18068cf5sm8459292wmb.15.2022.04.15.08.37.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 08:37:04 -0700 (PDT) From: Fabien Parent To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: Fabien Parent , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 7/7] arm64: dts: mediatek: mt6359: add node for PMIC keys support Date: Fri, 15 Apr 2022 17:36:29 +0200 Message-Id: <20220415153629.1817202-8-fparent@baylibre.com> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20220415153629.1817202-1-fparent@baylibre.com> References: <20220415153629.1817202-1-fparent@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220415_083706_720536_9C40D014 X-CRM114-Status: GOOD ( 11.04 ) 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 Add node for the MT6359 PMIC keyboard in mt6359.dtsi. Signed-off-by: Fabien Parent --- Dependency on: https://patchwork.kernel.org/project/linux-mediatek/patch/1622011927-359-9-git-send-email-hsin-hsiung.wang@mediatek.com/ arch/arm64/boot/dts/mediatek/mt6359.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt6359.dtsi b/arch/arm64/boot/dts/mediatek/mt6359.dtsi index 18c0d5325c22..dcafe1ff23ae 100644 --- a/arch/arm64/boot/dts/mediatek/mt6359.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt6359.dtsi @@ -3,6 +3,8 @@ * Copyright (c) 2021 MediaTek Inc. */ +#include + &pwrap { pmic: pmic { compatible = "mediatek,mt6359"; @@ -294,5 +296,18 @@ mt6359_vsram_others_sshub_ldo: ldo_vsram_others_sshub { mt6359rtc: mt6359rtc { compatible = "mediatek,mt6358-rtc"; }; + + mt6359keys: keyboard { + compatible = "mediatek,mt6359-keys"; + + key-0 { + linux,keycodes = ; + wakeup-source; + }; + + key-1 { + linux,keycodes = ; + }; + }; }; };