GUIDINGLI commented on code in PR #6673:
URL: https://github.com/apache/incubator-nuttx/pull/6673#discussion_r928776746


##########
drivers/power/pm_activity.c:
##########
@@ -143,21 +182,40 @@ void pm_stay(int domain, enum pm_state_e state)
 
 void pm_relax(int domain, enum pm_state_e state)
 {
-  FAR struct pm_domain_s *pdom;
-  irqstate_t flags;
+  DEBUGASSERT(state < PM_COUNT);
+  DEBUGASSERT(domain >= 0 && domain < CONFIG_PM_NDOMAINS);
 
-  /* Get a convenience pointer to minimize all of the indexing */
+  pm_wakelock_relax(&g_wakelock[domain][state]);
+}
 
-  DEBUGASSERT(domain >= 0 && domain < CONFIG_PM_NDOMAINS);
-  pdom = &g_pmglobals.domain[domain];
+/****************************************************************************
+ * Name: pm_staytimeout
+ *
+ * Description:
+ *   This function is called by a device driver to indicate that it is
+ *   performing meaningful activities (non-idle), needs the power at kept
+ *   last the specified level.
+ *   And this will be timeout after time (ms), menas auto pm_relax
+ *
+ * Input Parameters:
+ *   domain - The domain of the PM activity
+ *   state - The state want to stay.

Review Comment:
   don't need



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to