From patchwork Wed Apr 28 16:42:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mattijs Korpershoek X-Patchwork-Id: 12229675 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.0 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 6054DC433ED for ; Wed, 28 Apr 2021 16:45:21 +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 95B8360E08 for ; Wed, 28 Apr 2021 16:45:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95B8360E08 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=s9iCTpAITYE5e3QHp7DIKMowbD25GUV12zifn4PHMkA=; b=M22UnYJjuzKtWHyAwEgw5DzgE oiB4myzYtJxLKwi+L70Do4IVyQ+Zu/MkeNuxUKwlgCIZBl+bRttDvJFsoaeXrpNFZUES4M1waaBN0 b7c9wJIXInsM/DyRmTxh3vtb5J9/OalcPDF1gqRiQYoWw7Eeg8e6N7hNIbm/THRn3drDn23YsU7iW lMkOjhgw9RToCVaD4xDs/CgtcwNlC3y5aW4lPUn05IJv6H3eHU8hKw5hJdV7ZicCXSI3MgJWHAUhd R+O3p6rByIWbG4GCfYDAQTLu1bBq67GFi/bZFdjM57uS0StrWbywR8PdCspnVIpqpWrCAGrysBxOA bf9mlOinA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbnHy-003rbE-IH; Wed, 28 Apr 2021 16:43:51 +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 1lbnGk-003rHB-Rn for linux-arm-kernel@desiato.infradead.org; Wed, 28 Apr 2021 16:42:35 +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=GXfkThm6aq9/u6OAWtarhuCMLfUI31qoTKi2l6tIb1k=; b=xEfizALaVAfFssYa2E2irTQ6Y9 7pgKQ6Wpg5LEm5iYmI+bzdhErDvk60iY8mRjS1NNGnxdR5rTkS80iKaP5EZtTnqSng6LCyyy70qpZ Fsj7hha/3nzg6gdQ/2b8zjvnblzYTal4r6xfENH/Xrm94HWEZiYnF8CrXDT6y24H+sn8KfCvYvgnz EmJEzi6hXjx8VQE9XISvdx8sG+qT3Xm980ftS2TL1F/dwEAik4df0eDtflVgesQ5uD1yy+8mFnHgs Ij0ZbEfQlk+MMsj/AtYdbOR/X3vkPqaF7Kl5VZ2ZloMmAUP7SnIpmI1T6aSZLtzqS74QXukJ/K6nL uOj8nDkA==; Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbnGi-0001gm-Di for linux-arm-kernel@lists.infradead.org; Wed, 28 Apr 2021 16:42:33 +0000 Received: by mail-wm1-x331.google.com with SMTP id f15-20020a05600c4e8fb029013f5599b8a9so7617092wmq.1 for ; Wed, 28 Apr 2021 09:42: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=GXfkThm6aq9/u6OAWtarhuCMLfUI31qoTKi2l6tIb1k=; b=xmU+qrHv7iCFgEre0umPEDJpoZFKUJz6PeWoEJP7kgqcPPnt2GlvfbWlgxgRcRoW5m Hlbp1sBTPIZTSY3NmfBfy9a97mH1Ry/9oJ5dcLzE9476WrKmNNJgX89m+k5t8oVi5Dms 2qAK3qEAH2yE5ZjhCOHOHK4iWR8MUoPxkBT+AQeDHe8vTVmaktGMpJ5A/41cO1LvIa7Y Z5ROiKowdVjW+OqMPGsyQVbM1GmAIGwBNOv8zs0gxF+14n4x2xFcNadLaVm3n3zmQbz5 EZXHsua4uW1IXTUQ3N4/HYs5Lj5SNmLVLVmkbVejPCblZfW/+wdQQmgGssV+YiLqRcbn 8rBw== 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=GXfkThm6aq9/u6OAWtarhuCMLfUI31qoTKi2l6tIb1k=; b=ufo2IpD896ZTplHW1l+ffxS4MCoTndgmX4d2ZJZBj8E2OcEtXMHF734tYr7JPxD6HQ vsquLbQRTTLJxKJ2JezXLFROjHOZm345hNNuR0lpzAyTTIpb26G2jNPmC3ThsJMvjhRJ Lpmb+UoVz15GkkwKrx72OURQxq2m1a37I7mj98Cpnv9JQpybaoDRjg3/XHR4ADjPKgog bJ0fgRTmJHsbD2zwiGZzM/RVoiC5KkA7sD/o6gm0QXL9cDUN2/jc3F1GyQzcNBPgfmri tKZaXfKgfYIKVmNACLXxQyjlCz9GLxDS7SnhjSuvP5QeQm3KDljMAGK1aH/HIUBNcdRF 6gtw== X-Gm-Message-State: AOAM5305/M4HAmor+GqqI/J77DfVRGR13DIYbTsF5fVW7nB/X2T0Knr0 QW1SYSVDFb1C613WjFxNaw0jQQ== X-Google-Smtp-Source: ABdhPJzejFayeWt08Qeq2ENMXWRVl7HiK9xF6puIKoeU6c94FV5RAzpo0AXm6LqYCBzjp3xJke7duA== X-Received: by 2002:a1c:398a:: with SMTP id g132mr5691770wma.114.1619628151214; Wed, 28 Apr 2021 09:42:31 -0700 (PDT) Received: from groot.home ([2a01:cb19:826e:8e00:5864:ddd1:d623:f912]) by smtp.gmail.com with ESMTPSA id o10sm351299wrx.35.2021.04.28.09.42.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Apr 2021 09:42:30 -0700 (PDT) From: Mattijs Korpershoek To: Lee Jones , Matthias Brugger Cc: fparent@baylibre.com, Mattijs Korpershoek , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/7] mfd: mt6397: Add PMIC keys for MT6358 Date: Wed, 28 Apr 2021 18:42:18 +0200 Message-Id: <20210428164219.1115537-7-mkorpershoek@baylibre.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210428164219.1115537-1-mkorpershoek@baylibre.com> References: <20210428164219.1115537-1-mkorpershoek@baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210428_094232_482872_A65CBA41 X-CRM114-Status: GOOD ( 12.28 ) 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 This patch adds 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..13a5e15e9dd6 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 = "mtk-pmic-keys", + .num_resources = ARRAY_SIZE(mt6358_keys_resources), + .resources = mt6358_keys_resources, + .of_compatible = "mediatek,mt6358-keys" }, };