From patchwork Wed Oct 25 13:16:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "chen.zhong" X-Patchwork-Id: 10026755 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2A63260375 for ; Wed, 25 Oct 2017 13:52:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18C8528BB6 for ; Wed, 25 Oct 2017 13:52:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D41728BB0; Wed, 25 Oct 2017 13:52:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39D2A28B95 for ; Wed, 25 Oct 2017 13:52:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751628AbdJYNwN (ORCPT ); Wed, 25 Oct 2017 09:52:13 -0400 Received: from mailgw01.mediatek.com ([218.249.47.110]:39542 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750949AbdJYNwM (ORCPT ); Wed, 25 Oct 2017 09:52:12 -0400 X-UUID: 3bb0d2d45b0d4562a541a35002976605-20171025 Received: from mtkcas34.mediatek.inc [(172.27.4.250)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1247893265; Wed, 25 Oct 2017 21:16:13 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 25 Oct 2017 21:16:12 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Wed, 25 Oct 2017 21:16:12 +0800 From: Chen Zhong To: Dmitry Torokhov , Rob Herring , Lee Jones , Alexandre Belloni CC: Mark Rutland , Matthias Brugger , Eddie Huang , Alessandro Zummo , Linus Walleij , Beomho Seo , Javier Martinez Canillas , Jaechul Lee , Chen Zhong , Krzysztof Kozlowski , , , , , , Subject: [PATCH v6 6/6] mfd: mt6397: Add PMIC keys support to MT6397 driver Date: Wed, 25 Oct 2017 21:16:04 +0800 Message-ID: <1508937364-30054-7-git-send-email-chen.zhong@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1508937364-30054-1-git-send-email-chen.zhong@mediatek.com> References: <1508937364-30054-1-git-send-email-chen.zhong@mediatek.com> MIME-Version: 1.0 X-MTK: N Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds compatible strings and interrupts for pmic keys which serves as child device of MFD. Acked-for-MFD-by: Lee Jones Signed-off-by: Chen Zhong --- drivers/mfd/mt6397-core.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 6546d7f..77b64bd 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -43,6 +43,16 @@ }, }; +static const struct resource mt6323_keys_resources[] = { + DEFINE_RES_IRQ(MT6323_IRQ_STATUS_PWRKEY), + DEFINE_RES_IRQ(MT6323_IRQ_STATUS_FCHRKEY), +}; + +static const struct resource mt6397_keys_resources[] = { + DEFINE_RES_IRQ(MT6397_IRQ_PWRKEY), + DEFINE_RES_IRQ(MT6397_IRQ_HOMEKEY), +}; + static const struct mfd_cell mt6323_devs[] = { { .name = "mt6323-regulator", @@ -50,6 +60,11 @@ }, { .name = "mt6323-led", .of_compatible = "mediatek,mt6323-led" + }, { + .name = "mtk-pmic-keys", + .num_resources = ARRAY_SIZE(mt6323_keys_resources), + .resources = mt6323_keys_resources, + .of_compatible = "mediatek,mt6323-keys" }, }; @@ -71,7 +86,12 @@ }, { .name = "mt6397-pinctrl", .of_compatible = "mediatek,mt6397-pinctrl", - }, + }, { + .name = "mtk-pmic-keys", + .num_resources = ARRAY_SIZE(mt6397_keys_resources), + .resources = mt6397_keys_resources, + .of_compatible = "mediatek,mt6397-keys" + } }; static void mt6397_irq_lock(struct irq_data *data)