Skip to contentSkip to conversation

mfd: tps6586x: add RTC driver for TI TPS6586x

PATCH In review [email protected] 1 participant 2 messages Mar 28, 2011 – Apr 6, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v9 1/1 mfd: tps6586x: add RTC driver for TI TPS6586x

From: Wei Ni <[email protected]>

this driver supports setting of alarms, and
reading/setting of time

---
v9: check the enable_irq_wake/disable_irq_wake return value. fix these two function's fisrt paremeter, it should use "&pdev->dev"

 drivers/rtc/rtc-tps6586x.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
drivers/rtc/rtc-tps6586x.c +14 -4
index b891899..a3944a5 100644
@@ -335,19 +335,29 @@ static int __devexit tps6586x_rtc_remove(struct platform_device *pdev)
 static int tps6586x_rtc_suspend(struct platform_device *pdev,
 				pm_message_t state)
 {
+	int ret;
 	struct tps6586x_rtc *rtc = dev_get_drvdata(&pdev->dev);
 
-	if (device_may_wakeup(pdev))
-		enable_irq_wake(rtc->irq);
+	if (device_may_wakeup(&pdev->dev))
+		ret = enable_irq_wake(rtc->irq);
+
+	if (ret)
+		dev_warn(&pdev->dev, "enable irq wakeup failed.\n");
+
 	return 0;
 }
 
 static int tps6586x_rtc_resume(struct platform_device *pdev)
 {
+	int ret;
 	struct tps6586x_rtc *rtc = dev_get_drvdata(&pdev->dev);
 
-	if (device_may_wakeup(pdev))
-		disable_irq_wake(rtc->irq);
+	if (device_may_wakeup(&pdev->dev))
+		ret = disable_irq_wake(rtc->irq);
+
+	if (ret)
+		dev_warn(&pdev->dev, "disable irq wakeup failed.\n");
+
 	return 0;
 }
 
Signature · 1 line
1.7.0
author
#1 lore raw

Could anyone review this issue?

Thanks
Wei.

-----Original Message-----
From: Wei Ni
Sent: Monday, March 28, 2011 6:37 PM
To: rtc-linux-/[email protected]; [email protected]; [email protected]
Cc: [email protected]; Wei Ni
Subject: [PATCH v9] mfd: tps6586x: add RTC driver for TI TPS6586x

From: Wei Ni <[email protected]>

this driver supports setting of alarms, and
reading/setting of time

---
v9: check the enable_irq_wake/disable_irq_wake return value. fix these two function's fisrt paremeter, it should use "&pdev->dev"

 drivers/rtc/rtc-tps6586x.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
drivers/rtc/rtc-tps6586x.c +14 -4
index b891899..a3944a5 100644
@@ -335,19 +335,29 @@ static int __devexit tps6586x_rtc_remove(struct platform_device *pdev)
 static int tps6586x_rtc_suspend(struct platform_device *pdev,
 				pm_message_t state)
 {
+	int ret;
 	struct tps6586x_rtc *rtc = dev_get_drvdata(&pdev->dev);
 
-	if (device_may_wakeup(pdev))
-		enable_irq_wake(rtc->irq);
+	if (device_may_wakeup(&pdev->dev))
+		ret = enable_irq_wake(rtc->irq);
+
+	if (ret)
+		dev_warn(&pdev->dev, "enable irq wakeup failed.\n");
+
 	return 0;
 }
 
 static int tps6586x_rtc_resume(struct platform_device *pdev)
 {
+	int ret;
 	struct tps6586x_rtc *rtc = dev_get_drvdata(&pdev->dev);
 
-	if (device_may_wakeup(pdev))
-		disable_irq_wake(rtc->irq);
+	if (device_may_wakeup(&pdev->dev))
+		ret = disable_irq_wake(rtc->irq);
+
+	if (ret)
+		dev_warn(&pdev->dev, "disable irq wakeup failed.\n");
+
 	return 0;
 }
 
Signature · 1 line
1.7.0