From patchwork Wed May 12 15:16:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12254107 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 485D9C433B4 for ; Wed, 12 May 2021 15:18:14 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A5C50613FB for ; Wed, 12 May 2021 15:18:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A5C50613FB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=GJDAYCox9hy0kIXE5tM9Uj8WKTJyAVTRzBcEfOVeOuE=; b=ePFl/BdT1btDfhlRuRaeldvgf FQrmhdC5GE0rxzieC7vAwH6Sx9Qsy5VNJ/QQVLdtBx1J4FOIC35XJzrcJMKOq/TxydWE1VAXthy2V 8EiQH4H/hjmRPrIFzaVlhnXxS4Z5xCHypP5NfkUdfJ0lufuFRrzNB/XldznmafWs91WC0vjiIYFg6 HnSKjh4QApDrT6El12KafCsYwnxDHXWHUsn4dg0bSwGNtjllT4sGBGXdsXgQ/dIZhY16zrZvuCm1Q 8phUkceLxBEKLsEP5BEiChXAHn1L8PHmMXRIsHMgqz9zOj1deLoeJpr9nrYzJcDfWNyCR/AeA67y+ rdTyQUbgA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgqbE-00396a-29; Wed, 12 May 2021 15:16:36 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgqbA-00395Y-LQ for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 15:16:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=KDuP19RIvFr3oYQnO2ffHmKNK3OSRhOK3RHFKslMECA=; b=XemQTczWrviQ04enSnakeWXXjK 7VYMzpjqo37CiLdbD2Gp7YI9/HQtVLyQ2FOMFyVs/3mGLteU8S8+rRy1KqxRKXt9Ns0lKDshe8Q+t Y1QjTKSJq6xQDY56U8kft5K2PENe5iR7oH+FxkUj8mUAmPcMXTY/Dj/doxE1p7BWo2M1w4vBQ7KjR sJvIJcpdEK4r9iHH0c7nPn3R1MZKKeBr16MTSXwAneaOUMDIWiekLAv45yFHgSREtulwtkhvJdc1Y 1hr7adhuEzxutwz2IlnKEFfcKoGf+tscv5ZdXI9g+MPKPqu9zEnAj108oLDsfAn0tBQenxTApNCNO qamumScw==; Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgqb7-00AVAb-CZ for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 15:16:31 +0000 Received: by mail-wm1-x334.google.com with SMTP id j3-20020a05600c4843b02901484662c4ebso3226021wmo.0 for ; Wed, 12 May 2021 08:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KDuP19RIvFr3oYQnO2ffHmKNK3OSRhOK3RHFKslMECA=; b=AHsi9QcSyHxTvetudNhwrxkqTejvmZjBagws09KH8tllOy1N/4NiMyr/HaBReldoV8 qeqBlAgDvFPkuTC+vOQ/VAN6vK/o4EYg3TNZEgHHvS3POxYlRYvtIfx4OVwjzT88jhcL T6DfkDjXNEz0lnH1cFFBdv8szeZAXGz7ArX3EAyCeM1Vu7k0uhkJ3j/Lcp1iN0ykjgbV 9pqPwNrU9Lm88JgI76C5qZeCP96z7xRH7XJyNetHGc2bdRBOh3yEy0BX1SNTS53UoD8w f4yd89zJGGdA15NY/0Gr+hK0SOwB1Sxh4cVtAbfEguquCCBM0B8YenRrNCrDEisM8h2P jY6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KDuP19RIvFr3oYQnO2ffHmKNK3OSRhOK3RHFKslMECA=; b=cVE18pKKEGWNXfrdpnBm/ZZB7aMw9IQWlsGKCr+DbuJ3qO4w1NwyQ6llAsk8Cgddvu upZUevyJkGC2YItkeYUckhME2OvLibxE4qysv8c+Woh0km+DX+gCPMgGk5so6ay1fFFC MpaDe8QXVErKflnxmgkvaIyy3h8+v4SRyemtNt8fo4LnplH6r7PoYWWRNGR8myJps7qy uJJ12QgBenINf1WXvnKx7ee6MEgqrMmxb8ceVPI2uRbgFp1TNSx8GY8wZZYP24wj97jE ycBiP30G/YOPGerwM+3P//faPZ8meVStzHm4MFL49a//g3a57zDJ4Xd+uTkC0IUnt21L cXgQ== X-Gm-Message-State: AOAM5334A2Lf9amfi7Wm9bOG8ELJ0h0u5HBZsH7+LPpO2uFxRDvdq4JQ 9Xss6V1/jTgOI0CWXPEbE0/ToA== X-Google-Smtp-Source: ABdhPJxkxuJGKpTC4HM24aBYSK3735xOUkAIGYxX68Mo3N9Oxk8oAVWYkmP52aGsOEU5pJ5UUbQhpg== X-Received: by 2002:a05:600c:1994:: with SMTP id t20mr39311918wmq.177.1620832586988; Wed, 12 May 2021 08:16:26 -0700 (PDT) Received: from mkorpershoek-XPS-13-9370.home (lfbn-tou-1-1465-169.w90-89.abo.wanadoo.fr. [90.89.34.169]) by smtp.gmail.com with ESMTPSA id c15sm30095011wrr.3.2021.05.12.08.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 08:16:26 -0700 (PDT) From: Mattijs Korpershoek To: Lee Jones , Matthias Brugger Cc: Fabien Parent , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Mattijs Korpershoek Subject: [PATCH v2 1/3] mfd: mt6397: add mt6358 register definitions for power key Date: Wed, 12 May 2021 17:16:12 +0200 Message-Id: <20210512151614.36996-2-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210512151614.36996-1-mkorpershoek@baylibre.com> References: <20210512151614.36996-1-mkorpershoek@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210512_081629_583231_D270745B X-CRM114-Status: GOOD ( 10.88 ) 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 To support power/home key detection, add definitions for two more MT6358 PMIC registers: - TOPSTATUS: homekey and powerkey debounce status - TOP_RST_MISC: controls homekey,powerkey long press reset time Signed-off-by: Mattijs Korpershoek --- include/linux/mfd/mt6358/registers.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/mfd/mt6358/registers.h b/include/linux/mfd/mt6358/registers.h index 2ad0b312aa28..201139b12140 100644 --- a/include/linux/mfd/mt6358/registers.h +++ b/include/linux/mfd/mt6358/registers.h @@ -8,6 +8,8 @@ /* PMIC Registers */ #define MT6358_SWCID 0xa +#define MT6358_TOPSTATUS 0x28 +#define MT6358_TOP_RST_MISC 0x14c #define MT6358_MISC_TOP_INT_CON0 0x188 #define MT6358_MISC_TOP_INT_STATUS0 0x194 #define MT6358_TOP_INT_STATUS0 0x19e From patchwork Wed May 12 15:16:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12254109 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E934EC433ED for ; Wed, 12 May 2021 15:18:31 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3199461C4B for ; Wed, 12 May 2021 15:18:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3199461C4B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=BHFaLUJkWgZinxnNbp41nLNWpfLQXndd/YRGRVIXg4Y=; b=JKeyrT7LfsG377TjvtXcn/obP c1SogKt2HVcMmx1Kx0HoQTZEWJgFEAIdygZzV5MDEZ9VoVqqtqbm3aDwBKenMgVxRs90+gvewTAs/ fppwJJhXwjVNMAjYNJ3OpGeLHzK3OYh3+wzFm9PhC2HApbS5zu2GtGCQgYBUyl4wRgMEN5iVtVh9+ 9eoYXIfQGQLmX+ClfxpRSj3LTi0OLRwznjHldCLmAphn7hRoQFIFePKP02NxVRMIVwOC9Wt5yR+Vi QFS3smwk42vvs0NM+mdl7uQPhTWo8VSZxZ+S14UFDaNl5fDNMNERqm8Vh66qIR0XUi9aIqXlkZCEO zAs9WK9Aw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgqbT-00399Q-4r; Wed, 12 May 2021 15:16:53 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgqbB-00395k-Fu for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 15:16:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=MfFeXs1ZnrbznR36F+Azd1TerVAYLHFbsoRX86sMJbQ=; b=CkkofOGI17JXJcdEEnNbNxBsfq P+iPksty4fofC/t0Ojqeat/Zt/BJQc4ZUZRxZPVcBTHpMbtLAPKHnR98g28pj8JXGHyivsD44a0GJ CNY9yevv1LBmc5NNmn900w/fshSGWg+NxyocSPF+dZ0PUlZxlT0AmjFiy6MhuWGsZXYpyDY5CVESw XsyjuS+qbfvUGNi5oY34ijMPQXoEgYukqZefH8ByWpo1b+qcEQIdl6yTgT+qMLfMCiaxugGyfI/nB UzS93bXuLn5i09kvVRw+rZ/UBG3gfLJ0dmh2szhJqJ2ApQ0UtLM2Ahx6NJVyeO3bt2OUub4vNyB29 03n72dtg==; Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgqb8-00AVAc-2S for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 15:16:32 +0000 Received: by mail-wr1-x431.google.com with SMTP id t18so24025451wry.1 for ; Wed, 12 May 2021 08:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MfFeXs1ZnrbznR36F+Azd1TerVAYLHFbsoRX86sMJbQ=; b=JmGEKDtyLCxs8ih8SFYJQC1LLuoqLBv9WC0ywiw/HDuirOvpxjFwjKYt7c0GqBTZbU iyE/4ZGYd8U/Yrgo0HBMFgseBw4fOH2TWSkvIFmLP651zntea/3oHDKEDPTyi/XjbG22 TiH9bZloPBt9frGjpE+MafNYSpeRLttE+nvlrcSq9If0NUnfcYMEWCrrV7I3EAM1vCzC wEcbCk1/xI9ziBJc89O78fk590MtnV4MVkhqelAQSwKAVEiNxdzkKmTCNIxqFh/9I7+b C+nc0tcqniTfHdRgUt1dOFg2nnyQd0dr149uv+INh/WBdPkWgzlQX5bhdXn5wQJ7HnQc WMHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MfFeXs1ZnrbznR36F+Azd1TerVAYLHFbsoRX86sMJbQ=; b=Lr8zXRwb4pG0SHeTE81yIP75dOMWobcR46DrNaYltChtalkkhy8k9q16svGyiBQFzP SosT1ZD1TASd15NGl+N2n0CCT20ysWo74aMohqarJmxBiJ8EngZiCZGqW0jSiN2qYpia 2tSWdKfDq6ZMtQdVXQe6Z+xPd8jXzqw5JwhV7cSeDH6kMfa+B0b9M0Fks3fIcCro8Ciu ov3sgDzoZk54y/0/i4iw1BVtCODtFDZMHvKh1X9oToLnJkUi7azvVp8s77olMyItijH6 Qm+CBcMm8C5ytbyP4OY0+L+Wh8oGNiQjQTyAXboPM8sd/HVcBevtYRavZU/k7p46cIFB 7shA== X-Gm-Message-State: AOAM533EMCLhCR/pZzGsARWIBPzjiYDYeYC57JDRMRkfB3PNF00oTdD0 jVfhcBSNCrTpCx5EIsx6YolMOg== X-Google-Smtp-Source: ABdhPJy3ftP3rXXtEFvXj3wuD7w2m7S7OnMv+h0sS0P0toXNlX2FpVMw8NkgEyR8e0ycTyT3ed1U9g== X-Received: by 2002:adf:fa46:: with SMTP id y6mr2986989wrr.83.1620832588280; Wed, 12 May 2021 08:16:28 -0700 (PDT) Received: from mkorpershoek-XPS-13-9370.home (lfbn-tou-1-1465-169.w90-89.abo.wanadoo.fr. [90.89.34.169]) by smtp.gmail.com with ESMTPSA id c15sm30095011wrr.3.2021.05.12.08.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 08:16:27 -0700 (PDT) From: Mattijs Korpershoek To: Lee Jones , Matthias Brugger Cc: Fabien Parent , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Mattijs Korpershoek Subject: [PATCH v2 2/3] mfd: mt6397: keys: use named IRQs instead of index Date: Wed, 12 May 2021 17:16:13 +0200 Message-Id: <20210512151614.36996-3-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210512151614.36996-1-mkorpershoek@baylibre.com> References: <20210512151614.36996-1-mkorpershoek@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210512_081630_123491_17AD77C7 X-CRM114-Status: GOOD ( 12.63 ) 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 Some pmics of the mt6397 family (such as MT6358), have two IRQs per physical key: one for press event, another for release event. The mtk-pmic-keys driver assumes that each key only has one IRQ. The key index and the RES_IRQ resource index have a 1/1 mapping. This won't work for MT6358, as we have multiple resources (2) for one key. To prepare mtk-pmic-keys to support MT6358, retrieve IRQs by name instead of by index. Note: The keys_resources are not part of the device-tree bindings so this won't break any DT schemas. Signed-off-by: Mattijs Korpershoek --- drivers/mfd/mt6397-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 7518d74c3b4c..8738b5524783 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -46,13 +46,13 @@ static const struct resource mt6397_rtc_resources[] = { }; static const struct resource mt6323_keys_resources[] = { - DEFINE_RES_IRQ(MT6323_IRQ_STATUS_PWRKEY), - DEFINE_RES_IRQ(MT6323_IRQ_STATUS_FCHRKEY), + DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_PWRKEY, "powerkey"), + DEFINE_RES_IRQ_NAMED(MT6323_IRQ_STATUS_FCHRKEY, "homekey"), }; static const struct resource mt6397_keys_resources[] = { - DEFINE_RES_IRQ(MT6397_IRQ_PWRKEY), - DEFINE_RES_IRQ(MT6397_IRQ_HOMEKEY), + DEFINE_RES_IRQ_NAMED(MT6397_IRQ_PWRKEY, "powerkey"), + DEFINE_RES_IRQ_NAMED(MT6397_IRQ_HOMEKEY, "homekey"), }; static const struct resource mt6323_pwrc_resources[] = { From patchwork Wed May 12 15:16:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12254113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53D30C433ED for ; Wed, 12 May 2021 15:19:08 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B22A361C5D for ; Wed, 12 May 2021 15:19:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B22A361C5D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; 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=rz+85/hxk2reLYz0Ypke6k/xFE6h/uEIrvWlK49+Koo=; b=iYZAStfRk26+WHrzfdNCkp6GQ 85ECg94TPJ80rhYaeBrSj7zVfqFWsIq6pYHlcXXYtVipcrZxRIH2CSujrdne274/ZXl+mRQl60bLs EBFvvDOit8cJCyAfXMir4OFo54z2UHwmSIqpuT0eaPDDwSWFbBd1aq8gdTV6t6Zv6QERv1T4frN52 oc56eJ6gIZSG+PxQP0leMYV3qT+h79ItzCJZHnKyHWLo04oSRQVTKoNSDxkxIjxTHk6hsifP7JliJ Cns6BByOlWNdwGj3AijeygMk0NsYuEuy6tVlSMVfyYlpKNpm5TGqyLgonTPkg4V+VQ8vC5Qjb/SyF 1PLyhUIBw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lgqc1-0039Hv-2K; Wed, 12 May 2021 15:17:25 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgqbE-00396e-2F for linux-arm-kernel@desiato.infradead.org; Wed, 12 May 2021 15:16:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=63QQCc6cTan1btl2te+SCsjBWU0FH3iC+vQeIXSq1iY=; b=ZY5kK1CtWiesXXjrgMJa/Jy9FC tcVtqud847e+cGckFpZzpa/R5p0Qodi/r1IY65U+0JqaMUeCOP7eJS84FiPZiTx+q8F8z7YLlnI/I UaWy09BI8KBd283j07Ci8rVuRdjSt32mB2WPP7hEh19iDz9766QDCQWzzEtG5TddjHbaOmL5tA/GU XJbhVovnCXDfoCCbIkL2SxnJ4sNzOtF2jiDCvfg5j2kpl92mSG8H93uzc9AjU0pOMIqeShaLrqybY xiSCaO7+DZ9CZargNfYu/bLd6/rnQFU0EqJrh1PyBnBaq6W7BcTxRt4No2GTVSkeJ43i1IF/Vuff6 7a102k2Q==; Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lgqbB-00AVCT-Fk for linux-arm-kernel@lists.infradead.org; Wed, 12 May 2021 15:16:34 +0000 Received: by mail-wm1-x335.google.com with SMTP id 82-20020a1c01550000b0290142562ff7c9so3237332wmb.3 for ; Wed, 12 May 2021 08:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=63QQCc6cTan1btl2te+SCsjBWU0FH3iC+vQeIXSq1iY=; b=V9R2XWR/saz6XB8NRctn/cGN1pRjTqiEDub+PuWKysZpA8EcL4PA+58xSrmgeB0du5 Bv41I/jd6D/4Tif0aS/r1KPKknFBgvQ0DOqezpAF7EHP+xLskYV9C6YxDMmIwPnt78Gu UjvQ2c6VGMv0oIwds2bqw31zezgXow/oq+REYMVZyGoQ5fjX64W2axB6QRE3elQt3Yrb BYaCJWef7OxPOs+WqHrzq2b4DEvybfNEIV3UcgcQfs2SoI9M8ryJD8mztruRKRx9nwy9 Zcqr2jR4+eVBb0ikee0QNVVFIT4OQItpdd1eFKYHCz/Tuk4GVZ7xwHCztgO9nOscQeN5 9UGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=63QQCc6cTan1btl2te+SCsjBWU0FH3iC+vQeIXSq1iY=; b=DJ++UDvILzb+lEFqOAkMjCo1WuMq1K7CmGW9RmEGsBOaoOG+YVcSaAGFsRHGEXIsnu EDZI0TcQeu4nBw5XFqFFNxy8J5m3C2j+5qPMPzCXGZ4zHOOaU8/gyxdG/hTQrZ+RHBkv uHt2WxEWDXJoBh5nWO9N+ZSyyl4Bph46jMlb4wkaSInuWSiNM9VC2Jxbo0waQZ+3Xm4S mRDY9/lpXNXZcYSM0LOpN3mrUc8EKTHPHDzfmjbcjYC4bmOXtvJd2mxLQubs3nji//JV XKi8jmJ7NN1st1ZLgEgwZKenqutgi2GzGG5QIRCvkDME3fcwP4+mbZ4VYaTrP3GYzf1c yBTw== X-Gm-Message-State: AOAM5313yg7vq+UAn2SApjRchcm4vmTjKVfH1V5grn+uHDAq4OREmbP5 hkMGdeGA4lEbxCh4B2kaGpYc7Q== X-Google-Smtp-Source: ABdhPJy33NvSem24eI2h1X+78s6h8Fyljd3qZ3KpToCeaJt1bQMLx99FHMfDjjXFE0vPCV8Wp+5oKA== X-Received: by 2002:a05:600c:3592:: with SMTP id p18mr20474678wmq.44.1620832589473; Wed, 12 May 2021 08:16:29 -0700 (PDT) Received: from mkorpershoek-XPS-13-9370.home (lfbn-tou-1-1465-169.w90-89.abo.wanadoo.fr. [90.89.34.169]) by smtp.gmail.com with ESMTPSA id c15sm30095011wrr.3.2021.05.12.08.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 May 2021 08:16:29 -0700 (PDT) From: Mattijs Korpershoek To: Lee Jones , Matthias Brugger Cc: Fabien Parent , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Mattijs Korpershoek Subject: [PATCH v2 3/3] mfd: mt6397: add PMIC keys for MT6358 Date: Wed, 12 May 2021 17:16:14 +0200 Message-Id: <20210512151614.36996-4-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210512151614.36996-1-mkorpershoek@baylibre.com> References: <20210512151614.36996-1-mkorpershoek@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210512_081633_548617_3F321DD7 X-CRM114-Status: GOOD ( 12.23 ) 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 compatible strings and interrupts for pmic keys which serves as child device of MFD. MT6358 has two interrupts per key: one for press, another one for release (_R) Signed-off-by: Mattijs Korpershoek --- drivers/mfd/mt6397-core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 8738b5524783..5b79975dc13c 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -45,6 +45,13 @@ static const struct resource mt6397_rtc_resources[] = { DEFINE_RES_IRQ(MT6397_IRQ_RTC), }; +static const struct resource mt6358_keys_resources[] = { + DEFINE_RES_IRQ_NAMED(MT6358_IRQ_PWRKEY, "powerkey"), + DEFINE_RES_IRQ_NAMED(MT6358_IRQ_HOMEKEY, "homekey"), + DEFINE_RES_IRQ_NAMED(MT6358_IRQ_PWRKEY_R, "powerkey_r"), + DEFINE_RES_IRQ_NAMED(MT6358_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"), @@ -96,6 +103,11 @@ static const struct mfd_cell mt6358_devs[] = { }, { .name = "mt6358-sound", .of_compatible = "mediatek,mt6358-sound" + }, { + .name = "mt6358-keys", + .num_resources = ARRAY_SIZE(mt6358_keys_resources), + .resources = mt6358_keys_resources, + .of_compatible = "mediatek,mt6358-keys" }, };