aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorSudeep Holla <Sudeep.Holla@arm.com>2015-10-21 06:10:01 -0400
committerAlexandre Belloni <alexandre.belloni@free-electrons.com>2015-11-08 08:12:30 -0500
commitf4b6722248e4991a65e545d6b19e4497202e8a8a (patch)
treef2de61269bdb8b5b37f09853a06e98ab715e711f /drivers/rtc
parent347e40f0302c7e817e64256284b9e69a8b2711d2 (diff)
rtc: isl12057: enable support for the standard "wakeup-source" property
Though the isl12057 rtc driver should and will continue to support the legacy "isil,irq2-can-wakeup-machine" property to enable RTC as the wakeup source, we need to add support for the new standard property "wakeup-source". This patch adds support for "wakeup-source" property in addition to the existing "isil,irq2-can-wakeup-machine" property. Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: rtc-linux@googlegroups.com Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-isl12057.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c
index a0462e5430c7..54328d4ac0d3 100644
--- a/drivers/rtc/rtc-isl12057.c
+++ b/drivers/rtc/rtc-isl12057.c
@@ -466,9 +466,8 @@ static int isl12057_check_rtc_status(struct device *dev, struct regmap *regmap)
466 * is for instance the case on ReadyNAS 102, 104 and 2120. On those 466 * is for instance the case on ReadyNAS 102, 104 and 2120. On those
467 * devices with no IRQ driectly connected to the SoC, the RTC chip 467 * devices with no IRQ driectly connected to the SoC, the RTC chip
468 * can be forced as a wakeup source by stating that explicitly in 468 * can be forced as a wakeup source by stating that explicitly in
469 * the device's .dts file using the "isil,irq2-can-wakeup-machine" 469 * the device's .dts file using the "wakeup-source" boolean property.
470 * boolean property. This will guarantee 'wakealarm' sysfs entry is 470 * This will guarantee 'wakealarm' sysfs entry is available on the device.
471 * available on the device.
472 * 471 *
473 * The function below returns 1, i.e. the capability of the chip to 472 * The function below returns 1, i.e. the capability of the chip to
474 * wakeup the device, based on IRQ availability or if the boolean 473 * wakeup the device, based on IRQ availability or if the boolean
@@ -479,8 +478,9 @@ static bool isl12057_can_wakeup_machine(struct device *dev)
479{ 478{
480 struct isl12057_rtc_data *data = dev_get_drvdata(dev); 479 struct isl12057_rtc_data *data = dev_get_drvdata(dev);
481 480
482 return (data->irq || of_property_read_bool(dev->of_node, 481 return data->irq || of_property_read_bool(dev->of_node, "wakeup-source")
483 "isil,irq2-can-wakeup-machine")); 482 || of_property_read_bool(dev->of_node, /* legacy */
483 "isil,irq2-can-wakeup-machine");
484} 484}
485#else 485#else
486static bool isl12057_can_wakeup_machine(struct device *dev) 486static bool isl12057_can_wakeup_machine(struct device *dev)