mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: [email protected] Signed-off-by: Sudeep Holla <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
This commit is contained in:
parent
7a96f2874c
commit
347e40f030
1 changed files with 3 additions and 2 deletions
|
|
@ -199,8 +199,9 @@ static int opal_rtc_probe(struct platform_device *pdev)
|
|||
{
|
||||
struct rtc_device *rtc;
|
||||
|
||||
if (pdev->dev.of_node && of_get_property(pdev->dev.of_node, "has-tpo",
|
||||
NULL)) {
|
||||
if (pdev->dev.of_node &&
|
||||
(of_property_read_bool(pdev->dev.of_node, "wakeup-source") ||
|
||||
of_property_read_bool(pdev->dev.of_node, "has-tpo")/* legacy */)) {
|
||||
device_set_wakeup_capable(&pdev->dev, true);
|
||||
opal_rtc_ops.read_alarm = opal_get_tpo_time;
|
||||
opal_rtc_ops.set_alarm = opal_set_tpo_time;
|
||||
|
|
|
|||
Loading…
Reference in a new issue