summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-14 08:43:32 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-14 08:43:32 +0400
commit21ebd6c68b5511b55f4f456e4ba17c2d711e3617 (patch)
tree2f4f98568a7a52ab6734fb190d0cbf6f9c1c6492 /drivers/rtc
parent4b8be38cf782f8ebebc089083fa0572ade79d7ca (diff)
parent74d836c4142e5d100f8d9a1b2ee3003c2ed7109d (diff)
downloadlinux-21ebd6c68b5511b55f4f456e4ba17c2d711e3617.tar.xz
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (59 commits) rtc: max8925: Add function to work as wakeup source mfd: Add pm ops to max8925 mfd: Convert aat2870 to dev_pm_ops mfd: Still check other interrupts if we get a wm831x touchscreen IRQ mfd: Introduce missing kfree in 88pm860x probe routine mfd: Add S5M series configuration mfd: Add s5m series irq driver mfd: Add S5M core driver mfd: Improve mc13xxx dt binding document mfd: Fix stmpe section mismatch mfd: Fix stmpe build warning mfd: Fix STMPE I2c build failure mfd: Constify aat2870-core i2c_device_id table gpio: Add support for stmpe variant 801 mfd: Add support for stmpe variant 801 mfd: Add support for stmpe variant 610 mfd: Add support for STMPE SPI interface mfd: Separate out STMPE controller and interface specific code misc: Remove max8997-muic sysfs attributes mfd: Remove unused wm831x_irq_data_to_mask_reg() ... Fix up trivial conflict in drivers/leds/Kconfig due to addition of LEDS_MAX8997 and LEDS_TCA6507 next to each other.
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-ab8500.c2
-rw-r--r--drivers/rtc/rtc-max8925.c26
2 files changed, 27 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c
index a0a9810adf0b..4bcf9ca2818a 100644
--- a/drivers/rtc/rtc-ab8500.c
+++ b/drivers/rtc/rtc-ab8500.c
@@ -15,7 +15,7 @@
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/mfd/abx500.h>
-#include <linux/mfd/ab8500.h>
+#include <linux/mfd/abx500/ab8500.h>
#include <linux/delay.h>
#define AB8500_RTC_SOFF_STAT_REG 0x00
diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c
index 4a5529346b47..2d71943bc436 100644
--- a/drivers/rtc/rtc-max8925.c
+++ b/drivers/rtc/rtc-max8925.c
@@ -261,6 +261,8 @@ static int __devinit max8925_rtc_probe(struct platform_device *pdev)
/* XXX - isn't this redundant? */
platform_set_drvdata(pdev, info);
+ device_init_wakeup(&pdev->dev, 1);
+
info->rtc_dev = rtc_device_register("max8925-rtc", &pdev->dev,
&max8925_rtc_ops, THIS_MODULE);
ret = PTR_ERR(info->rtc_dev);
@@ -290,10 +292,34 @@ static int __devexit max8925_rtc_remove(struct platform_device *pdev)
return 0;
}
+#ifdef CONFIG_PM_SLEEP
+static int max8925_rtc_suspend(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent);
+
+ if (device_may_wakeup(dev))
+ chip->wakeup_flag |= 1 << MAX8925_IRQ_RTC_ALARM0;
+ return 0;
+}
+static int max8925_rtc_resume(struct device *dev)
+{
+ struct platform_device *pdev = to_platform_device(dev);
+ struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent);
+
+ if (device_may_wakeup(dev))
+ chip->wakeup_flag &= ~(1 << MAX8925_IRQ_RTC_ALARM0);
+ return 0;
+}
+#endif
+
+static SIMPLE_DEV_PM_OPS(max8925_rtc_pm_ops, max8925_rtc_suspend, max8925_rtc_resume);
+
static struct platform_driver max8925_rtc_driver = {
.driver = {
.name = "max8925-rtc",
.owner = THIS_MODULE,
+ .pm = &max8925_rtc_pm_ops,
},
.probe = max8925_rtc_probe,
.remove = __devexit_p(max8925_rtc_remove),