PM: Add domain to all PM interfaces. Internal PM data structures now handle multiple PM domains.

This commit is contained in:
Gregory Nutt 2016-03-27 13:01:32 -06:00
parent 32acc35c88
commit 267e20c729
11 changed files with 14 additions and 11 deletions

View File

@ -100,7 +100,7 @@ static void up_idlepm(void)
/* Decide, which power saving level can be obtained */
newstate = pm_checkstate();
newstate = pm_checkstate(PM_IDLE_DOMAIN);
/* Check for state changes */

View File

@ -93,7 +93,7 @@ static void up_idlepm(void)
/* Decide, which power saving level can be obtained */
newstate = pm_checkstate();
newstate = pm_checkstate(PM_IDLE_DOMAIN);
/* Check for state changes */

View File

@ -88,7 +88,7 @@ static void up_idlepm(void)
/* Decide, which power saving level can be obtained */
newstate = pm_checkstate();
newstate = pm_checkstate(PM_IDLE_DOMAIN);
/* Check for state changes */

View File

@ -89,7 +89,7 @@ static void up_idlepm(void)
/* Decide, which power saving level can be obtained */
newstate = pm_checkstate();
newstate = pm_checkstate(PM_IDLE_DOMAIN);
/* Check for state changes */

View File

@ -89,7 +89,7 @@ static void up_idlepm(void)
/* Decide, which power saving level can be obtained */
newstate = pm_checkstate();
newstate = pm_checkstate(PM_IDLE_DOMAIN);
/* Check for state changes */

View File

@ -91,7 +91,7 @@ static void up_idlepm(void)
/* Decide, which power saving level can be obtained */
newstate = pm_checkstate();
newstate = pm_checkstate(PM_IDLE_DOMAIN);
/* Check for state changes */

View File

@ -252,6 +252,7 @@
#if defined(CONFIG_PM) && !defined(CONFIG_PM_SERIAL_ACTIVITY)
# define CONFIG_PM_SERIAL_ACTIVITY 10
# define PM_IDLE_DOMAIN 0 /* Revisit */
#endif
#ifdef USE_SERIALDRIVER
@ -1781,7 +1782,7 @@ static int up_interrupt_common(struct up_dev_s *priv)
/* Report serial activity to the power management logic */
#if defined(CONFIG_PM) && CONFIG_PM_SERIAL_ACTIVITY > 0
pm_activity(CONFIG_PM_SERIAL_ACTIVITY);
pm_activity(PM_IDLE_DOMAIN, CONFIG_PM_SERIAL_ACTIVITY);
#endif
/* Loop until there are no characters to be transferred or,

View File

@ -205,6 +205,7 @@
#if defined(CONFIG_PM) && !defined(CONFIG_PM_SERIAL_ACTIVITY)
# define CONFIG_PM_SERIAL_ACTIVITY 10
# define PM_IDLE_DOMAIN 0 /* Revisit */
#endif
#ifdef USE_SERIALDRIVER
@ -1713,7 +1714,7 @@ static int up_interrupt_common(struct up_dev_s *priv)
/* Report serial activity to the power management logic */
#if defined(CONFIG_PM) && CONFIG_PM_SERIAL_ACTIVITY > 0
pm_activity(CONFIG_PM_SERIAL_ACTIVITY);
pm_activity(PM_IDLE_DOMAIN, CONFIG_PM_SERIAL_ACTIVITY);
#endif
/* Loop until there are no characters to be transferred or,

View File

@ -91,7 +91,7 @@ static void up_idlepm(void)
/* Decide, which power saving level can be obtained */
newstate = pm_checkstate();
newstate = pm_checkstate(PM_IDLE_DOMAIN);
/* Check for state changes */

View File

@ -205,6 +205,7 @@
#if defined(CONFIG_PM) && !defined(CONFIG_PM_SERIAL_ACTIVITY)
# define CONFIG_PM_SERIAL_ACTIVITY 10
# define PM_IDLE_DOMAIN 0 /* Revisit */
#endif
#ifdef USE_SERIALDRIVER
@ -1456,7 +1457,7 @@ static int up_interrupt_common(struct up_dev_s *priv)
/* Report serial activity to the power management logic */
#if defined(CONFIG_PM) && CONFIG_PM_SERIAL_ACTIVITY > 0
pm_activity(CONFIG_PM_SERIAL_ACTIVITY);
pm_activity(PM_IDLE_DOMAIN, CONFIG_PM_SERIAL_ACTIVITY);
#endif
/* Loop until there are no characters to be transferred or,

View File

@ -155,7 +155,7 @@ void up_idle(void)
static enum pm_state_e state = PM_NORMAL;
enum pm_state_e newstate;
newstate = pm_checkstate();
newstate = pm_checkstate(PM_IDLE_DOMAIN);
if (newstate != state)
{
if (pm_changestate(PM_IDLE_DOMAIN, newstate) == OK)