From patchwork Mon Aug 7 01:57:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "chen.zhong" X-Patchwork-Id: 9884255 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 A143A603B4 for ; Mon, 7 Aug 2017 01:59:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9177028584 for ; Mon, 7 Aug 2017 01:59:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8438028582; Mon, 7 Aug 2017 01:59:41 +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 54EC0285D5 for ; Mon, 7 Aug 2017 01:59:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751755AbdHGB7C (ORCPT ); Sun, 6 Aug 2017 21:59:02 -0400 Received: from mailgw01.mediatek.com ([218.249.47.110]:57901 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751748AbdHGB54 (ORCPT ); Sun, 6 Aug 2017 21:57:56 -0400 Received: from mtkcas32.mediatek.inc [(172.27.4.250)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1116463951; Mon, 07 Aug 2017 09:57:53 +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; Mon, 7 Aug 2017 09:57:51 +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; Mon, 7 Aug 2017 09:57:51 +0800 From: Chen Zhong To: Dmitry Torokhov CC: Rob Herring , Mark Rutland , Matthias Brugger , Lee Jones , Eddie Huang , Alessandro Zummo , Alexandre Belloni , Jaechul Lee , Jonathan Cameron , Javier Martinez Canillas , Linus Walleij , Chen Zhong , Beomho Seo , , , , , , Subject: [PATCH v2 5/5] mfd: mt6397: Add PMIC keys support to MT6397 driver Date: Mon, 7 Aug 2017 09:57:45 +0800 Message-ID: <1502071065-6745-6-git-send-email-chen.zhong@mediatek.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1502071065-6745-1-git-send-email-chen.zhong@mediatek.com> References: <1502071065-6745-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. Signed-off-by: Chen Zhong --- drivers/mfd/mt6397-core.c | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 6546d7f..3c6a765 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -43,6 +43,30 @@ }, }; +static const struct resource mt6323_keys_resources[] = { + { + .start = MT6323_IRQ_STATUS_PWRKEY, + .end = MT6323_IRQ_STATUS_PWRKEY, + .flags = IORESOURCE_IRQ, + }, { + .start = MT6323_IRQ_STATUS_FCHRKEY, + .end = MT6323_IRQ_STATUS_FCHRKEY, + .flags = IORESOURCE_IRQ, + }, +}; + +static const struct resource mt6397_keys_resources[] = { + { + .start = MT6397_IRQ_PWRKEY, + .end = MT6397_IRQ_PWRKEY, + .flags = IORESOURCE_IRQ, + }, { + .start = MT6397_IRQ_HOMEKEY, + .end = MT6397_IRQ_HOMEKEY, + .flags = IORESOURCE_IRQ, + }, +}; + static const struct mfd_cell mt6323_devs[] = { { .name = "mt6323-regulator", @@ -50,6 +74,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 +100,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)