diff options
author | Chen Zhong <chen.zhong@mediatek.com> | 2017-10-25 15:15:59 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2018-04-16 16:16:04 +0200 |
commit | e695d3a0b3b302974c1fd7b36ea91fe58fb9ca14 (patch) | |
tree | bfc53de7aebef7a8830520b09b193bc9c524911a | |
parent | Linux 4.17-rc1 (diff) | |
download | linux-e695d3a0b3b302974c1fd7b36ea91fe58fb9ca14.tar.xz linux-e695d3a0b3b302974c1fd7b36ea91fe58fb9ca14.zip |
mfd: mt6397: Create irq mappings in mfd core driver
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.
Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/mt6397-core.c | 4 | ||||
-rw-r--r-- | 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 04a601f6aebe..6546d7f88b5e 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 1a61fa56f3ad..385f8303bb41 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; |