Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1719777
| Path | csiph.com!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Chen Zhong <chen.zhong@mediatek.com> |
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 1/5] mfd: mt6397: create irq mappings in mfd core driver |
| Date | Fri, 25 Aug 2017 08:40:01 +0200 |
| Message-ID | <uigrD-xp-17@gated-at.bofh.it> (permalink) |
| References | <uigrD-xp-3@gated-at.bofh.it> |
| X-Mailer | git-send-email 1.7.9.5 |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| X-Mtk | N |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 55 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Matthias Brugger <matthias.bgg@gmail.com>, Lee Jones <lee.jones@linaro.org>, Eddie Huang <eddie.huang@mediatek.com>, Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@free-electrons.com>, Andi Shyti <andi.shyti@samsung.com>, Javier Martinez Canillas <javier@osg.samsung.com>, Chen Zhong <chen.zhong@mediatek.com>, Linus Walleij <linus.walleij@linaro.org>, Jaechul Lee <jcsing.lee@samsung.com>, <linux-input@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <linux-kernel@vger.kernel.org>, <linux-rtc@vger.kernel.org> |
| X-Original-Date | Fri, 25 Aug 2017 14:32:29 +0800 |
| X-Original-Message-ID | <1503642753-12385-2-git-send-email-chen.zhong@mediatek.com> |
| X-Original-References | <1503642753-12385-1-git-send-email-chen.zhong@mediatek.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1719777 |
Show key headers only | View raw
The core driver should create and manage irq mappings instead of leaf drivers. This patch change to pass irq domain to devm_mfd_add_devices() and it will create mapping for irq resources automatically. And remove irq mapping in rtc driver since this has been done in core driver. Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Chen Zhong <chen.zhong@mediatek.com> --- drivers/mfd/mt6397-core.c | 4 ++-- drivers/rtc/rtc-mt6397.c | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 04a601f..6546d7f 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -289,7 +289,7 @@ static int mt6397_probe(struct platform_device *pdev) ret = devm_mfd_add_devices(&pdev->dev, -1, mt6323_devs, ARRAY_SIZE(mt6323_devs), NULL, - 0, NULL); + 0, pmic->irq_domain); break; case MT6397_CID_CODE: @@ -304,7 +304,7 @@ static int mt6397_probe(struct platform_device *pdev) ret = devm_mfd_add_devices(&pdev->dev, -1, mt6397_devs, ARRAY_SIZE(mt6397_devs), NULL, - 0, NULL); + 0, pmic->irq_domain); break; default: diff --git a/drivers/rtc/rtc-mt6397.c b/drivers/rtc/rtc-mt6397.c index 1a61fa5..385f830 100644 --- a/drivers/rtc/rtc-mt6397.c +++ b/drivers/rtc/rtc-mt6397.c @@ -322,10 +322,9 @@ static int mtk_rtc_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); rtc->addr_base = res->start; - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - rtc->irq = irq_create_mapping(mt6397_chip->irq_domain, res->start); - if (rtc->irq <= 0) - return -EINVAL; + rtc->irq = platform_get_irq(pdev, 0); + if (rtc->irq < 0) + return rtc->irq; rtc->regmap = mt6397_chip->regmap; rtc->dev = &pdev->dev; -- 1.7.9.5
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3 0/5] Add MediaTek PMIC keys support Chen Zhong <chen.zhong@mediatek.com> - 2017-08-25 08:40 +0200
[PATCH v3 3/5] dt-bindings: mfd: Add bindings for the keys as subnode of PMIC Chen Zhong <chen.zhong@mediatek.com> - 2017-08-25 08:40 +0200
Re: [PATCH v3 3/5] dt-bindings: mfd: Add bindings for the keys as subnode of PMIC Lee Jones <lee.jones@linaro.org> - 2017-09-05 09:40 +0200
[PATCH v3 1/5] mfd: mt6397: create irq mappings in mfd core driver Chen Zhong <chen.zhong@mediatek.com> - 2017-08-25 08:40 +0200
Re: [PATCH v3 1/5] mfd: mt6397: create irq mappings in mfd core driver Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-08-25 10:50 +0200
[PATCH v3 5/5] mfd: mt6397: Add PMIC keys support to MT6397 driver Chen Zhong <chen.zhong@mediatek.com> - 2017-08-25 08:40 +0200
Re: [PATCH v3 5/5] mfd: mt6397: Add PMIC keys support to MT6397 driver Lee Jones <lee.jones@linaro.org> - 2017-09-05 09:40 +0200
[PATCH v3 2/5] dt-bindings: input: Add document bindings for mtk-pmic-keys Chen Zhong <chen.zhong@mediatek.com> - 2017-08-25 08:40 +0200
Re: [PATCH v3 2/5] dt-bindings: input: Add document bindings for mtk-pmic-keys Rob Herring <robh@kernel.org> - 2017-08-31 22:00 +0200
Re: [PATCH v3 2/5] dt-bindings: input: Add document bindings for mtk-pmic-keys Chen Zhong <chen.zhong@mediatek.com> - 2017-09-01 04:10 +0200
Re: [PATCH v3 2/5] dt-bindings: input: Add document bindings for mtk-pmic-keys Chen Zhong <chen.zhong@mediatek.com> - 2017-09-02 04:20 +0200
Re: [PATCH v3 2/5] dt-bindings: input: Add document bindings for mtk-pmic-keys Rob Herring <robh@kernel.org> - 2017-09-05 18:10 +0200
Re: [PATCH v3 2/5] dt-bindings: input: Add document bindings for mtk-pmic-keys Chen Zhong <chen.zhong@mediatek.com> - 2017-09-07 05:10 +0200
Re: [PATCH v3 0/5] Add MediaTek PMIC keys support Chen Zhong <chen.zhong@mediatek.com> - 2017-08-26 04:40 +0200
csiph-web