From patchwork Thu May 6 09:41: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: 12241929 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,URIBL_BLOCKED, 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 E2B5FC433B4 for ; Thu, 6 May 2021 09:44:20 +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 46C2F61077 for ; Thu, 6 May 2021 09:44:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46C2F61077 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=P6c9PHQD7U5r/Xvg9SAH7htnR gFbwzhg+/NRidVyP8QIo7V1wdXm3Jd9ujjvIN9+pVMvUwrv6mWCVKRs6MjzSRYMAVnM8CupK5/AkU Mhf09pwFdiApbh+w8S6Gbsj8TFeFAkqTVXbHIZtfxO/Ycgc1uIwU7TYPlHxcB/2/PCk3LpDCWB0xx 5pqzs42ISXmeyjj066Cx1pzN3HhQcocuCpgDQJbMmHZbfbGwYi3ajfpiEYXsDIaQUvOcgKd5vF7g+ 7/V6EMlR2WuNq5prR3VJh7BfPfpuyGjC5y1DP4RhD3oUAuLeHEL6k8mUM/s5Wo4RYeisswgzrPae4 L8qgmqQ+w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leaW4-003qOs-OF; Thu, 06 May 2021 09:41:56 +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 1leaVe-003qKd-AV for linux-arm-kernel@desiato.infradead.org; Thu, 06 May 2021 09:41:30 +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=1ODKja779pbaEZSTKA6SWq1e+F MkgjyW8rhivNlIeXjcwc9pBZAokE3jphNNrwwwq3IUajlloaSPy4gUszUehFMJXZ/L/Pt299fAaZo muvyVBdjtAjoW0x3QQWstmLW1H+gg/hb9rCbnou8iUVCqGvOkc/mHiqnZVoVFDNZBU4y7qda96AC+ q3gi9fne19RiRDVNipcbVgQ2gI9/tugy3yDRQNfc1H1Bi9vIlIU6sCKhgX2xYCbkBhZ3z8x26W8tM rBWnV3cmVVaSh7z646RmN0qlS42GI12s2xgtOwlDfNOspG72SHZuCMb8OAq1sCgGmSatTbqY//VX1 UdRiL7rw==; Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leaVa-005uyB-RJ for linux-arm-kernel@lists.infradead.org; Thu, 06 May 2021 09:41:29 +0000 Received: by mail-wr1-x42b.google.com with SMTP id l14so4884671wrx.5 for ; Thu, 06 May 2021 02:41:25 -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=k0Xs3EkXrnyoP2PbgSrq8y2ftS9kgvDiDnida+rHIzEoM7j3qDw36lGXYrV/8N/vmH idvneoPCQPd45bMDsZKDKLypoyJw9q97iEl81Cs5tbrs7Ui0U1jYyg+AmwvayaGeH1Pe YFJbH/UH0XRk6jO8wJcn+2OOoHkjbCm2kg+zuTz6HTt7XEH/LqRUOLVmF/AR7g104Qsq BN3qBi1QKZ9LmDznT+hygxT234aAmLA21J7C9Ybe3SU8n6moRzYxHhzRG277VeIlgM6L zjQbjWWy6iFfHcYrFT9zuTemmuFru1UPK82rVg5euKSzZ2cnVXOBSMeVcHd39lKV6V7o MHSg== 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=N2eJdlxSXgjdc8m5zwyUBuHTNzeYH0inCaV3sG19/DazCGwR3ARXofEbceNWmUzrlI uT/856p88g0Ht7bDQeUf7w/JZiUI6z83wEcBqlPAnmd/RVa7ksP4/F7FYPi7NbEjljMJ wZi9Zmu/XIr4a76DBiT9fz4yqdAjxuW3io3XH338poARosYpgcK6VPnl3NBon3qYIPdG Z6VTEwE6NONlM4tzxFDAEUQudJKFLYj73i6kflXD5P6J4OmNGEav5j9WU/2G+z0MKnX5 rGJ8U/CVrLCgS7yBIPjz+hescE3jYvtSnbiKXy4ifecnTRJFL0PjVpa5wh6px+RR+xpq F3rg== X-Gm-Message-State: AOAM532VG+CEDs4RyShMWswHotG4Na1K3SR3tfnnKxVQsmqEJEkVitHP wWKhla6ZqSEG/3185ilOOYZ6Ow== X-Google-Smtp-Source: ABdhPJzwRD5YwKJypFE4rH6ogHDtfIjZiYWqGARQDqBZhdYYG/mrrB63EhsuHj3vNlIwsukv1vsMMA== X-Received: by 2002:a5d:60cd:: with SMTP id x13mr3784698wrt.377.1620294084131; Thu, 06 May 2021 02:41:24 -0700 (PDT) Received: from groot.home ([2a01:cb19:826e:8e00:2492:c5b6:6c3f:6de4]) by smtp.gmail.com with ESMTPSA id y14sm3360421wrs.64.2021.05.06.02.41.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 02:41:23 -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 1/3] mfd: mt6397: add mt6358 register definitions for power key Date: Thu, 6 May 2021 11:41:13 +0200 Message-Id: <20210506094116.638527-2-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210506094116.638527-1-mkorpershoek@baylibre.com> References: <20210506094116.638527-1-mkorpershoek@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_024126_903295_32E93964 X-CRM114-Status: GOOD ( 10.53 ) 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 Thu May 6 09:41: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: 12241931 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,URIBL_BLOCKED, 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 C54B7C433ED for ; Thu, 6 May 2021 09:44:29 +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 282116112F for ; Thu, 6 May 2021 09:44:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 282116112F 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=vZFmfeMwZbxFrow5k/t8B24wpe/NJbXxjqsjHkqMKJI=; b=FMrLJUe1x290RDv7oXqT0Pwp5 NVX0FIG9WQwI1uv228t38XVkMxzi2BC6RbcNfQhWq6GayT7cgeYkrEcXFNxeM+4DrqXN3KBZqtmnz b8VFIC3K5d/rsJJ5Z5vR24vbou8CrqnlDvTG5EKwjWNdPZSeGGG0kXpt2hdm1ft/81we8x6op4UHv Xck5DK5DcX5dN5ZqH+CWBzEL/pVDE3VC9Iyy7ZzpEUyA4DSosUwAm+r+YsKT6V32sdcCqdYRx5DNQ uTqDgeBpdywUhu2J8rxylyKXvZCagyRkIAfJ1flNMnRqh+Pro3RPayXG+ezAoo3SYo3wWjnG5fOU2 RZYQFo9yw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leaWJ-003qRV-8s; Thu, 06 May 2021 09:42:11 +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 1leaVe-003qKe-Cl for linux-arm-kernel@desiato.infradead.org; Thu, 06 May 2021 09:41:30 +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=WGLMaIjJ/59GAV1ofZhUU7K8F2hooQOdMuE41Fq9fiw=; b=Qj/Mwrcjc3B3BU03wrZUVu1bcX cWrZshkgKMAdqJ17E/Yz7vp7cWkgkEAlY14QWzuOBkeK/OKN4YWL0PDIm8U32khh0qfkwesiRG6jC VgwLbeY6DOSXRcPJdo5AH4QB8h2VzqGY55nRpfQ9jGIPg8HGNnc8iUFyrPD7xaRs9E8ENSCsfGYXr GySuX917w9t8EUF3UeXx7dSJ0RKBVWyTPnfbJ8THeGvt5Fke7Ur22VebDX1CHbTbLv1xmTZ5GL9rz Ymh7mbSY/Lw7gTHStTdZF4PdffkmPup1/Q+yjrn/Pr1C14R5Bh1XX6T20rwoGEERq5TfvmuF44BRT u82ZEkIA==; Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leaVb-005uyn-G0 for linux-arm-kernel@lists.infradead.org; Thu, 06 May 2021 09:41:29 +0000 Received: by mail-wr1-x42b.google.com with SMTP id l13so4860182wru.11 for ; Thu, 06 May 2021 02:41:27 -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=WGLMaIjJ/59GAV1ofZhUU7K8F2hooQOdMuE41Fq9fiw=; b=RkMnsD6KvMi6ZHCsPL8Dnl+4tGuWsXTN0tNVSraD1ZobCZPyShwIr47yrOkmMSQ1YE Dbw4UZHC5UpyoSn/gIIW1Ah18Rj9PgOMgz3EcHWBiEuVkdEpttBAnDiMoUtgv5XBIMLQ GMvKu7m3Z2D2J5OnzQd4sraDUcwPY83/P/UxzsGnowrwefRRd71b2s7c6YyPqM17BPlL JwE7IZI5WMOy+CcJE6XsolcQwzhQOt0DyQqkhxg5WUiYQ4xZwBmxrcsbi7OUhdx14BLe DZUW4sxnIOOFW2HnydnhO6RCGjz8Qr6z1ZclNx0bdPzpwnKNhgtgIoEKGqz7vAJ38iSC sqXQ== 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=WGLMaIjJ/59GAV1ofZhUU7K8F2hooQOdMuE41Fq9fiw=; b=dc0ET9GjdeqAmOD1Ojsz/PBcG/PouDMsD6a/TsCsKlZFIhwNB9OYVMwrDTqd2vf/Io 1KqgOKr0AjDBKHXB8BoFHcyOsU+o+G5unAUocFSJwmYYGcrBq/T/QBjcwtRPZHM5l/aS B21pqXXOHX56fJRvzbyxzLJAhGkh1z/7obdPWulBGqfVYvLJyY0nE2ZdgR8XkcpqjGnr HqakSqGe5qS1OKLsI809JE90QnjHrby6Q8J2GBehFAchpICGHul7Sg7aZlHY627cox/B JJn9LllelodeThxTNWeVF/oN1dYxbgyeBI4wpmGjX3eA7kPDc7WCLF3NqfiCxqOj2hqc gGtA== X-Gm-Message-State: AOAM533RtzgszwkxaDhKBKFvXBSSwKHZgS+yujPxSVJ6RmO+M2f0NraL GTFngjR5XaH5jyIMNvHtra2NnA== X-Google-Smtp-Source: ABdhPJwfEmWX/6FYzIU3H4cSjuIgImGG9IfqUxLnFTDYk1RcDZyq0ZieLpUOw1Km6YShmQ444UtqXg== X-Received: by 2002:adf:fd0c:: with SMTP id e12mr3802633wrr.324.1620294086330; Thu, 06 May 2021 02:41:26 -0700 (PDT) Received: from groot.home ([2a01:cb19:826e:8e00:2492:c5b6:6c3f:6de4]) by smtp.gmail.com with ESMTPSA id y14sm3360421wrs.64.2021.05.06.02.41.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 02:41: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 2/3] mfd: mt6397: keys: use named IRQs instead of index Date: Thu, 6 May 2021 11:41:14 +0200 Message-Id: <20210506094116.638527-3-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210506094116.638527-1-mkorpershoek@baylibre.com> References: <20210506094116.638527-1-mkorpershoek@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_024127_552392_A8DFD448 X-CRM114-Status: GOOD ( 12.36 ) 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 a83fbc486d26..5818e0c328c9 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 Thu May 6 09:41:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12241933 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,URIBL_BLOCKED, 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 57B8CC433ED for ; Thu, 6 May 2021 09:44:39 +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 A52D16112F for ; Thu, 6 May 2021 09:44:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A52D16112F 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=hHvUV04vnvEeAu2B/A1Jw5PRxV4u2+LWgH4i1zyvupY=; b=DnYMrPyZLMvakIOnxPRk/Oi8h SwFCuHaQANpmDQDWAMlin5tSdPITBwXVLBx/4y7pQRYgdAfr7YD7rchsypuyB6SenbI03BtGEyLbf BMKCcY6MKtlZHW7tE1DfyQ40hnm1AG0bAZ/j3JuCg++Glpvym+Cgu/deh6G6teYp1wp3Wg0wmqlVz 9t2q+95MziParvnTlDnDa1GeMvljlrGKsmyJzi9ID//Q9OypaZWQ1CAXHr8VMjbpGVkQriUfkInd1 9EZbAt7WSnm0xU91jVq4z1WVyy2KVlT57A402FV2wFVmVRd6wjU/mohMc5GG31TkdC3IBeFAwm6JQ NeIwVQAYw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leaWa-003qV7-0P; Thu, 06 May 2021 09:42:28 +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 1leaVg-003qLy-Oe for linux-arm-kernel@desiato.infradead.org; Thu, 06 May 2021 09:41:39 +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=2Fx6koaa90dYpE3ZRxt64nTsgkrkT9Jbk1TcCB5fNN0=; b=YXbpubwQNnXjyDmODksLfPDYeU VXqI9Yk8oDX2n+Ep98L7tGT/aAsT+whCAWiPMtZQNPdg5GBFGfgU6FxxNkvESbWPykRWCvRTwUxew D/vRcUa+TDNRO1n6cKx2j9D1pPyZGvkzuLjzYFau7TZzgbULhPun6unC7zvrxk8Ti67T+EdRWPIV4 9ZpTZWHcyD8JGJWdogcUWwh8/zcHZXdyAtWq3TvU+7XKPSLqigsR+X+Mfvv8QtJ7P2zgym/3yeevc +ASnKtGgdyKCUD3M3tF5xGufTL12YL8KkSH/HmR7u/cHF7kht2Cbj0FGeLRGbZfaYBWn9tWtlnMSn XSWMTvRA==; Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leaVe-005uzx-Ai for linux-arm-kernel@lists.infradead.org; Thu, 06 May 2021 09:41:31 +0000 Received: by mail-wr1-x429.google.com with SMTP id z6so4879603wrm.4 for ; Thu, 06 May 2021 02:41: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=2Fx6koaa90dYpE3ZRxt64nTsgkrkT9Jbk1TcCB5fNN0=; b=wC3Ic9YCYaHpZrOqunPpyYOqVY53CB3utNaWddVKzbePn1psarS5wOSL9rDqiGA5PZ tLwVV2cgdSVbz1Q596AT0odEQdLgAGLBiFiLDApR7AJtpmkFBWzBCNsPpnxBNdvBGSPf evOvz+zv1cD+YqHRYbJc31pvemA99u2nCNualt2jG3fjN/fZtnAim/DbSoiRJMyPXYoO 9afg+s5W5miOwxKAyXiQ5tS3HyRprBGvW+nBAAnMUIcQ4ZldLIHKK0OLMHHNc0zji+WA cYOSa8pVOjGrAeqE0Dzkc1Y5dRefprQyt9dhvCnMSkwSPUPUY/HjWdAUYDnP+pT3hP+p vsbg== 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=2Fx6koaa90dYpE3ZRxt64nTsgkrkT9Jbk1TcCB5fNN0=; b=foaeXiunea+UpIL2H9ZuvwklnDyVrNNAyP4ThYhYzL5veEX+WEI+lhEMvWugXsuT/f HNyoUgPMf5rTVMiccOtWihIYb+yVQiKN2wKW/Sz//e64OyJN5bZf5WmFhGpvfspIEvTF X4+5z92x2Cd4DjvI6/2bh2Uwt1I/FvfU0wtRw9EQPP8f43tXSLIs3MeigxGAE4h6t3WY XqxqQRjG2MxrXqlKWKymp65Xd5shoWb/CVkQDJGwTqFOIuyDXJ80Q3pe3x37Grm68Lgz EiUcxl87OYSD9HjZk4XAj/FeiYMlQJz0oX2JZdK7Y/nEUkhcBjG1ItLt68BKrG4ZDLDH xj1A== X-Gm-Message-State: AOAM5335gPiz/nynCsouljqAEvTaif9CTX4Siq6i2eGpo9mYTyfNTpft 5Vp1EEsGZuXLsB/kJy70KEAAzw== X-Google-Smtp-Source: ABdhPJwuueqdh6i+rN0lH8eSnaptLU3QU7FT191ZcG1FDtrzmHFTBRmmGWCFldj3ivZo5PFhl3nMzw== X-Received: by 2002:a05:6000:1cc:: with SMTP id t12mr4007908wrx.156.1620294088524; Thu, 06 May 2021 02:41:28 -0700 (PDT) Received: from groot.home ([2a01:cb19:826e:8e00:2492:c5b6:6c3f:6de4]) by smtp.gmail.com with ESMTPSA id y14sm3360421wrs.64.2021.05.06.02.41.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 02:41:28 -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 3/3] mfd: mt6397: add PMIC keys for MT6358 Date: Thu, 6 May 2021 11:41:15 +0200 Message-Id: <20210506094116.638527-4-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210506094116.638527-1-mkorpershoek@baylibre.com> References: <20210506094116.638527-1-mkorpershoek@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_024130_376112_D554C775 X-CRM114-Status: GOOD ( 11.94 ) 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 5818e0c328c9..f882c76b4f88 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" }, };