diff options
author | Sudeep Holla <Sudeep.Holla@arm.com> | 2015-10-21 06:10:00 -0400 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-11-08 08:12:30 -0500 |
commit | 347e40f0302c7e817e64256284b9e69a8b2711d2 (patch) | |
tree | 3218028ec0c0ac438c5ea377b152eec804ada66c /drivers/rtc | |
parent | 7a96f2874c524a0f42b8c8f2ac03da3f02c96194 (diff) |
rtc: opal: enable support for the stardard "wakeup-source" property
Though the opal rtc driver should and will continue to support the legacy
"has-tpo" 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 "has-tpo" 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-opal.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-opal.c b/drivers/rtc/rtc-opal.c index 590e1a45e0b2..df39ce02a99d 100644 --- a/drivers/rtc/rtc-opal.c +++ b/drivers/rtc/rtc-opal.c | |||
@@ -199,8 +199,9 @@ static int opal_rtc_probe(struct platform_device *pdev) | |||
199 | { | 199 | { |
200 | struct rtc_device *rtc; | 200 | struct rtc_device *rtc; |
201 | 201 | ||
202 | if (pdev->dev.of_node && of_get_property(pdev->dev.of_node, "has-tpo", | 202 | if (pdev->dev.of_node && |
203 | NULL)) { | 203 | (of_property_read_bool(pdev->dev.of_node, "wakeup-source") || |
204 | of_property_read_bool(pdev->dev.of_node, "has-tpo")/* legacy */)) { | ||
204 | device_set_wakeup_capable(&pdev->dev, true); | 205 | device_set_wakeup_capable(&pdev->dev, true); |
205 | opal_rtc_ops.read_alarm = opal_get_tpo_time; | 206 | opal_rtc_ops.read_alarm = opal_get_tpo_time; |
206 | opal_rtc_ops.set_alarm = opal_set_tpo_time; | 207 | opal_rtc_ops.set_alarm = opal_set_tpo_time; |