#include <linux/platform_device.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
+#include <linux/pm_runtime.h>
 
 #include <asm/io.h>
 
                goto fail;
        }
 
+       /* Enable the clock/module so that we can access the registers */
+       pm_runtime_enable(&pdev->dev);
+       pm_runtime_get_sync(&pdev->dev);
+
        id_entry = platform_get_device_id(pdev);
        if (id_entry && (id_entry->driver_data & OMAP_RTC_HAS_KICKER)) {
                rtc_writel(KICK0_VALUE, OMAP_RTC_KICK0_REG);
 fail0:
        if (id_entry && (id_entry->driver_data & OMAP_RTC_HAS_KICKER))
                rtc_writel(0, OMAP_RTC_KICK0_REG);
+       pm_runtime_put_sync(&pdev->dev);
+       pm_runtime_disable(&pdev->dev);
        iounmap(rtc_base);
 fail:
        release_mem_region(mem->start, resource_size(mem));
        rtc_device_unregister(rtc);
        if (id_entry && (id_entry->driver_data & OMAP_RTC_HAS_KICKER))
                rtc_writel(0, OMAP_RTC_KICK0_REG);
+
+       /* Disable the clock/module */
+       pm_runtime_put_sync(&pdev->dev);
+       pm_runtime_disable(&pdev->dev);
+
        iounmap(rtc_base);
        release_mem_region(mem->start, resource_size(mem));
        return 0;
        else
                rtc_write(0, OMAP_RTC_INTERRUPTS_REG);
 
+       /* Disable the clock/module */
+       pm_runtime_put_sync(&pdev->dev);
+
        return 0;
 }
 
 static int omap_rtc_resume(struct platform_device *pdev)
 {
+       /* Enable the clock/module so that we can access the registers */
+       pm_runtime_get_sync(&pdev->dev);
+
        if (device_may_wakeup(&pdev->dev))
                disable_irq_wake(omap_rtc_alarm);
        else