RE: [PATCH v3 3/3] soc: fsl: add RCPM driver

From
Ran Wang <hidden>
Date
2019-05-20 07:39:37
Also in
linux-arm-kernel, linux-devicetree, linux-pm, lkml
Reply to
Pavel Machek, 2019-05-20
Hi Pavel,

On Monday, May 20, 2019 15:27: Pavel Machek wrote:
Hi!
quoted
The NXP's QorIQ Processors based on ARM Core have RCPM module (Run
Control and Power Management), which performs all device-level tasks
associated with power management such as wakeup source control.

This driver depends on PM wakeup source framework which help to
collect wake information.

Signed-off-by: Ran Wang <redacted>
quoted
+// Copyright 2019 NXP
+//
+// Author: Ran Wang <ran.wang_1@nxp.com>,
extra ,
OK, will update.
quoted
+	rcpm = dev_get_drvdata(dev);
+	if (!rcpm)
+		return -EINVAL;
+
+	/* Begin with first registered wakeup source */
+	ws = wakeup_source_get_next(NULL);
+	while (ws) {
while (ws = wakeup_source_get_next(NULL))

?
I just answered this in v2 mail thread: 
"Actually, we only pass NULL to wakeup_source_get_next()
at very first call to get 1st wakeup source. Then in the while
loop, we will fetch next source but not 1st, that's different.
I am afraid your suggestion is not quite correct."

Regards
Ran
Thread (5 messages) 5 messages, 2 authors, last reply 2019-05-20
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help