#include <linux/mfd/abx500/ab8500.h>
#include <linux/delay.h>
#include <linux/of.h>
+#include <linux/pm_wakeirq.h>
#define AB8500_RTC_SOFF_STAT_REG 0x00
#define AB8500_RTC_CC_CONF_REG 0x01
}
err = devm_request_threaded_irq(&pdev->dev, irq, NULL,
- rtc_alarm_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT,
+ rtc_alarm_handler, IRQF_ONESHOT,
"ab8500-rtc", rtc);
if (err < 0)
return err;
+ dev_pm_set_wake_irq(&pdev->dev, irq);
platform_set_drvdata(pdev, rtc);
err = ab8500_sysfs_rtc_register(&pdev->dev);
static int ab8500_rtc_remove(struct platform_device *pdev)
{
+ dev_pm_clear_wake_irq(&pdev->dev);
+ device_init_wakeup(&pdev->dev, false);
ab8500_sysfs_rtc_unregister(&pdev->dev);
return 0;