From a5d7ea0912cc35efb61bccb1f07432f25fce6281 Mon Sep 17 00:00:00 2001 From: Eddie Huang Date: Wed, 6 May 2015 15:23:40 +0800 Subject: mfd: provide RTC resource in MT6397 MFD Provide MT6397 RTC interrupt, base address, and register in MT6397 MFD. Signed-off-by: Eddie Huang Acked-by: Lee Jones Signed-off-by: Alexandre Belloni --- drivers/mfd/mt6397-core.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drivers/mfd/mt6397-core.c') diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c index 09bc780..4027623 100644 --- a/drivers/mfd/mt6397-core.c +++ b/drivers/mfd/mt6397-core.c @@ -21,9 +21,27 @@ #include #include +#define MT6397_RTC_BASE 0xe000 +#define MT6397_RTC_SIZE 0x3e + +static const struct resource mt6397_rtc_resources[] = { + { + .start = MT6397_RTC_BASE, + .end = MT6397_RTC_BASE + MT6397_RTC_SIZE, + .flags = IORESOURCE_MEM, + }, + { + .start = MT6397_IRQ_RTC, + .end = MT6397_IRQ_RTC, + .flags = IORESOURCE_IRQ, + }, +}; + static const struct mfd_cell mt6397_devs[] = { { .name = "mt6397-rtc", + .num_resources = ARRAY_SIZE(mt6397_rtc_resources), + .resources = mt6397_rtc_resources, .of_compatible = "mediatek,mt6397-rtc", }, { .name = "mt6397-regulator", -- cgit v1.1