Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 340e5b70 authored by xiaolin's avatar xiaolin
Browse files

msm: qpnp-rtc: Enable the node of wakealarm



Move the function device_init_wakeup ahead of rtc_device_register.
Because we need to set up all the parameters before we register
the rtc device into the kernel. Wakealarm is one of them.Otherwise
the wakealarm wouldn't be generated so we can't wake up device
after shutdown.

Change-Id: I6dc70423248600d9ef3c233098228c81d40af540
Signed-off-by: default avatarxiaolin <xiaolin@codeaurora.org>
parent 3fca24c8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2015, 2017-2019,The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -597,7 +597,7 @@ static int qpnp_rtc_probe(struct platform_device *pdev)
		rtc_ops = &qpnp_rtc_rw_ops;

	dev_set_drvdata(&pdev->dev, rtc_dd);

	device_init_wakeup(&pdev->dev, 1);
	/* Register the RTC device */
	rtc_dd->rtc = rtc_device_register("qpnp_rtc", &pdev->dev,
					  rtc_ops, THIS_MODULE);
@@ -627,6 +627,7 @@ static int qpnp_rtc_probe(struct platform_device *pdev)
fail_req_irq:
	rtc_device_unregister(rtc_dd->rtc);
fail_rtc_enable:
	device_init_wakeup(&pdev->dev, 0);
	dev_set_drvdata(&pdev->dev, NULL);

	return rc;