mfd: provide RTC resource in MT6397 MFD
authorEddie Huang <eddie.huang@mediatek.com>
Wed, 6 May 2015 07:23:40 +0000 (15:23 +0800)
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 24 Jun 2015 23:13:34 +0000 (01:13 +0200)
Provide MT6397 RTC interrupt, base address, and register in
MT6397 MFD.

Signed-off-by: Eddie Huang <eddie.huang@mediatek.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
drivers/mfd/mt6397-core.c

index 09bc7804952a4a8bb2775e79b6d75fff309742db..4027623236ee934143d464507c0ae1fbd91ea9dc 100644 (file)
 #include <linux/mfd/mt6397/core.h>
 #include <linux/mfd/mt6397/registers.h>
 
+#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",