diff --git a/configs/cloudctrl/src/stm32_autoleds.c b/configs/cloudctrl/src/stm32_autoleds.c index ee8c417653d..752b00cccf2 100644 --- a/configs/cloudctrl/src/stm32_autoleds.c +++ b/configs/cloudctrl/src/stm32_autoleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/cloudctrl/src/stm32_autoleds.c * - * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * Darcy Gong * @@ -145,8 +145,10 @@ static void led_setonoff(unsigned int bits); /* LED Power Management */ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif /**************************************************************************** @@ -284,7 +286,8 @@ static void led_setonoff(unsigned int bits) ****************************************************************************/ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -339,7 +342,8 @@ static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ #ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LEDs driver. * We always accept the state change by returning OK. diff --git a/configs/efm32-g8xx-stk/src/efm32_userleds.c b/configs/efm32-g8xx-stk/src/efm32_userleds.c index 73a40db3327..d21868ea62e 100644 --- a/configs/efm32-g8xx-stk/src/efm32_userleds.c +++ b/configs/efm32-g8xx-stk/src/efm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/efm32-g8xx-stk/src/efm32_userleds.c * - * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -88,8 +88,10 @@ static gpio_pinset_t g_ledcfg[BOARD_NLEDS] = /* LED Power Management */ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif /**************************************************************************** @@ -118,7 +120,8 @@ static struct pm_callback_s g_ledscb = ****************************************************************************/ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -173,7 +176,8 @@ static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ #ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LEDs driver. * We always accept the state change by returning OK. diff --git a/configs/fire-stm32v2/src/stm32_autoleds.c b/configs/fire-stm32v2/src/stm32_autoleds.c index 0afb2768a1b..82501996013 100644 --- a/configs/fire-stm32v2/src/stm32_autoleds.c +++ b/configs/fire-stm32v2/src/stm32_autoleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/fire-stm32v2/src/stm32_autoleds.c * - * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -149,8 +149,10 @@ static void led_setonoff(unsigned int bits); /* LED Power Management */ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif /**************************************************************************** @@ -265,7 +267,8 @@ static void led_setonoff(unsigned int bits) ****************************************************************************/ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -320,7 +323,8 @@ static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ #ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LEDs driver. * We always accept the state change by returning OK. diff --git a/configs/mikroe-stm32f4/src/stm32_idle.c b/configs/mikroe-stm32f4/src/stm32_idle.c index 9c2ea8ac23a..1866b7700bd 100644 --- a/configs/mikroe-stm32f4/src/stm32_idle.c +++ b/configs/mikroe-stm32f4/src/stm32_idle.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/mikroe_stm32f4/src/stm32_idle.c * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Diego Sanchez * @@ -84,6 +84,8 @@ # define CONFIG_PM_ALARM_NSEC 0 #endif +#define PM_IDLE_DOMAIN 0 /* Revisit */ + /**************************************************************************** * Private Data ****************************************************************************/ @@ -129,12 +131,12 @@ static void up_idlepm(void) /* Force the global state change */ - ret = pm_changestate(newstate); + ret = pm_changestate(PM_IDLE_DOMAIN, newstate); if (ret < 0) { /* The new state change failed, revert to the preceding state */ - (void)pm_changestate(oldstate); + (void)pm_changestate(PM_IDLE_DOMAIN, oldstate); /* No state change... */ @@ -190,7 +192,7 @@ static void up_idlepm(void) #endif /* Resume normal operation */ - pm_changestate(PM_NORMAL); + pm_changestate(PM_IDLE_DOMAIN, PM_NORMAL); newstate = PM_NORMAL; } break; @@ -236,7 +238,7 @@ static void up_alarmcb(void) * PM_STANDBY period. So just go to sleep. */ - pm_changestate(PM_SLEEP); + pm_changestate(PM_IDLE_DOMAIN, PM_SLEEP); } #endif diff --git a/configs/nucleo-f4x1re/src/stm32_userleds.c b/configs/nucleo-f4x1re/src/stm32_userleds.c index 17dbc3bfde6..9b02b9af749 100644 --- a/configs/nucleo-f4x1re/src/stm32_userleds.c +++ b/configs/nucleo-f4x1re/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/nucleo-f4x1re/src/stm32_userleds.c * - * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -81,8 +81,10 @@ /* LED Power Management */ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif /**************************************************************************** @@ -111,7 +113,8 @@ static struct pm_callback_s g_ledscb = ****************************************************************************/ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -166,7 +169,8 @@ static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ #ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LEDs driver. * We always accept the state change by returning OK. diff --git a/configs/nucleo-l476rg/src/stm32_userleds.c b/configs/nucleo-l476rg/src/stm32_userleds.c index 20460324d65..01d60f55edc 100644 --- a/configs/nucleo-l476rg/src/stm32_userleds.c +++ b/configs/nucleo-l476rg/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/nucleo-l476rg/src/stm32_userleds.c * - * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -81,8 +81,10 @@ /* LED Power Management */ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif /**************************************************************************** @@ -111,7 +113,8 @@ static struct pm_callback_s g_ledscb = ****************************************************************************/ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -166,7 +169,8 @@ static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ #ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LEDs driver. * We always accept the state change by returning OK. diff --git a/configs/shenzhou/src/stm32_autoleds.c b/configs/shenzhou/src/stm32_autoleds.c index f8b5473c37e..ebc161f643b 100644 --- a/configs/shenzhou/src/stm32_autoleds.c +++ b/configs/shenzhou/src/stm32_autoleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/shenzhou/src/stm32_autoleds.c * - * Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -144,8 +144,10 @@ static void led_setonoff(unsigned int bits); /* LED Power Management */ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif /**************************************************************************** @@ -281,7 +283,8 @@ static void led_setonoff(unsigned int bits) ****************************************************************************/ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -336,7 +339,8 @@ static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ #ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LEDs driver. * We always accept the state change by returning OK. diff --git a/configs/stm3210e-eval/src/stm32_idle.c b/configs/stm3210e-eval/src/stm32_idle.c index 7620735f22d..4930e1433b0 100644 --- a/configs/stm3210e-eval/src/stm32_idle.c +++ b/configs/stm3210e-eval/src/stm32_idle.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm3210e-eval/src/stm32_idle.c * - * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2015-2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Diego Sanchez * @@ -119,6 +119,8 @@ # endif #endif +#define PM_IDLE_DOMAIN 0 /* Revisit */ + /**************************************************************************** * Private Data ****************************************************************************/ @@ -294,12 +296,12 @@ static void stm32_idlepm(void) /* Force the global state change */ - ret = pm_changestate(newstate); + ret = pm_changestate(PM_IDLE_DOMAIN, newstate); if (ret < 0) { /* The new state change failed, revert to the preceding state */ - (void)pm_changestate(oldstate); + (void)pm_changestate(PM_IDLE_DOMAIN, oldstate); /* No state change... */ diff --git a/configs/stm3210e-eval/src/stm32_lcd.c b/configs/stm3210e-eval/src/stm32_lcd.c index 5bc221338dc..ed7ca1f2d8f 100644 --- a/configs/stm3210e-eval/src/stm32_lcd.c +++ b/configs/stm3210e-eval/src/stm32_lcd.c @@ -1,7 +1,7 @@ /************************************************************************************** * configs/stm3210e-eval/src/stm32_lcd.c * - * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * With power management enhancements by: @@ -410,8 +410,10 @@ static int stm3210e_setcontrast(struct lcd_dev_s *dev, unsigned int contrast); /* LCD Power Management */ #ifdef CONFIG_PM -static void stm3210e_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int stm3210e_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void stm3210e_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int stm3210e_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif /* Initialization */ @@ -1153,7 +1155,8 @@ static int stm3210e_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) ****************************************************************************/ #ifdef CONFIG_PM -static void stm3210e_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void stm3210e_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { #ifdef CONFIG_STM3210E_LCD_PWM uint32_t frac; @@ -1290,7 +1293,8 @@ static void stm3210e_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstat ****************************************************************************/ #ifdef CONFIG_PM -static int stm3210e_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int stm3210e_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LCD driver. We always * accept the state change by returning OK. diff --git a/configs/stm3210e-eval/src/stm32_leds.c b/configs/stm3210e-eval/src/stm32_leds.c index 9753d1da9c4..66679b48a32 100644 --- a/configs/stm3210e-eval/src/stm32_leds.c +++ b/configs/stm3210e-eval/src/stm32_leds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm3210e_eval/src/stm32_leds.c * - * Copyright (C) 2009-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2013, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -144,8 +144,10 @@ static void led_setonoff(unsigned int bits); /* LED Power Management */ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif /**************************************************************************** @@ -277,7 +279,8 @@ static void led_setonoff(unsigned int bits) ****************************************************************************/ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -332,7 +335,8 @@ static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ #ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LEDs driver. * We always accept the state change by returning OK. diff --git a/configs/stm32f429i-disco/src/stm32_idle.c b/configs/stm32f429i-disco/src/stm32_idle.c index fbf5b8e212c..b67073b8c2a 100644 --- a/configs/stm32f429i-disco/src/stm32_idle.c +++ b/configs/stm32f429i-disco/src/stm32_idle.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32f429i-disco/src/stm32_idle.c * - * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2015-2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Diego Sanchez * @@ -84,6 +84,8 @@ # define CONFIG_PM_ALARM_NSEC 0 #endif +#define PM_IDLE_DOMAIN 0 /* Revisit */ + /**************************************************************************** * Private Data ****************************************************************************/ @@ -129,12 +131,12 @@ static void stm32_idlepm(void) /* Force the global state change */ - ret = pm_changestate(newstate); + ret = pm_changestate(PM_IDLE_DOMAIN, newstate); if (ret < 0) { /* The new state change failed, revert to the preceding state */ - (void)pm_changestate(oldstate); + (void)pm_changestate(PM_IDLE_DOMAIN, oldstate); /* No state change... */ @@ -190,7 +192,7 @@ static void stm32_idlepm(void) #endif /* Resume normal operation */ - pm_changestate(PM_NORMAL); + pm_changestate(PM_IDLE_DOMAIN, PM_NORMAL); newstate = PM_NORMAL; } break; @@ -236,7 +238,7 @@ static void stm32_alarmcb(void) * PM_STANDBY period. So just go to sleep. */ - pm_changestate(PM_SLEEP); + pm_changestate(PM_IDLE_DOMAIN, PM_SLEEP); } #endif diff --git a/configs/stm32f429i-disco/src/stm32_userleds.c b/configs/stm32f429i-disco/src/stm32_userleds.c index d824437331c..682ccfd5f97 100644 --- a/configs/stm32f429i-disco/src/stm32_userleds.c +++ b/configs/stm32f429i-disco/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32f429i-disco/src/stm32_userleds.c * - * Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -87,8 +87,10 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = /* LED Power Management */ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif @@ -118,7 +120,8 @@ static struct pm_callback_s g_ledscb = ****************************************************************************/ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -173,7 +176,8 @@ static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ #ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LEDs driver. * We always accept the state change by returning OK. diff --git a/configs/stm32f4discovery/src/stm32_idle.c b/configs/stm32f4discovery/src/stm32_idle.c index 7c4e18b641f..58fe9423cb5 100644 --- a/configs/stm32f4discovery/src/stm32_idle.c +++ b/configs/stm32f4discovery/src/stm32_idle.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32f4discovery/src/stm32_idle.c * - * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2015-2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Diego Sanchez * @@ -84,6 +84,8 @@ # define CONFIG_PM_ALARM_NSEC 0 #endif +#define PM_IDLE_DOMAIN 0 /* Revisit */ + /**************************************************************************** * Private Data ****************************************************************************/ @@ -126,12 +128,12 @@ static void stm32_idlepm(void) /* Force the global state change */ - ret = pm_changestate(newstate); + ret = pm_changestate(PM_IDLE_DOMAIN, newstate); if (ret < 0) { /* The new state change failed, revert to the preceding state */ - (void)pm_changestate(oldstate); + (void)pm_changestatePM_IDLE_DOMAIN, oldstate); /* No state change... */ @@ -187,7 +189,7 @@ static void stm32_idlepm(void) #endif /* Resume normal operation */ - pm_changestate(PM_NORMAL); + pm_changestate(PM_IDLE_DOMAIN, PM_NORMAL); newstate = PM_NORMAL; } break; @@ -233,7 +235,7 @@ static void up_alarmcb(void) * PM_STANDBY period. So just go to sleep. */ - pm_changestate(PM_SLEEP); + pm_changestate(PM_IDLE_DOMAIN, PM_SLEEP); } #endif diff --git a/configs/stm32f4discovery/src/stm32_userleds.c b/configs/stm32f4discovery/src/stm32_userleds.c index 69b1f9bb95a..1401ca2bb4c 100644 --- a/configs/stm32f4discovery/src/stm32_userleds.c +++ b/configs/stm32f4discovery/src/stm32_userleds.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/stm32f4discovery/src/stm32_userleds.c * - * Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -88,8 +88,10 @@ static uint32_t g_ledcfg[BOARD_NLEDS] = /* LED Power Management */ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif @@ -119,7 +121,8 @@ static struct pm_callback_s g_ledscb = ****************************************************************************/ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -174,7 +177,8 @@ static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ #ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LEDs driver. * We always accept the state change by returning OK. diff --git a/configs/stm32l476vg-disco/src/stm32_buttons.c b/configs/stm32l476vg-disco/src/stm32_buttons.c index 7317f54168b..f4adf5d7a09 100644 --- a/configs/stm32l476vg-disco/src/stm32_buttons.c +++ b/configs/stm32l476vg-disco/src/stm32_buttons.c @@ -65,8 +65,10 @@ /* Button Power Management */ #ifdef CONFIG_PM -static void button_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int button_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void button_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int button_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif /**************************************************************************** @@ -111,7 +113,8 @@ static struct pm_callback_s g_buttonscb = ****************************************************************************/ #ifdef CONFIG_PM -static void button_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void button_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -201,7 +204,8 @@ static int button_handler(int irq, FAR void *context) ****************************************************************************/ #ifdef CONFIG_PM -static int button_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int button_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the Buttons driver. * We always accept the state change by returning OK. diff --git a/configs/stm32l476vg-disco/src/stm32_userleds.c b/configs/stm32l476vg-disco/src/stm32_userleds.c index bc1f52797a2..5e5c56d5f2c 100644 --- a/configs/stm32l476vg-disco/src/stm32_userleds.c +++ b/configs/stm32l476vg-disco/src/stm32_userleds.c @@ -77,8 +77,10 @@ /* LED Power Management */ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb, enum pm_state_e pmstate); -static int led_pm_prepare(struct pm_callback_s *cb, enum pm_state_e pmstate); +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate); #endif /**************************************************************************** @@ -107,7 +109,8 @@ static struct pm_callback_s g_ledscb = ****************************************************************************/ #ifdef CONFIG_PM -static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) +static void led_pm_notify(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { switch (pmstate) { @@ -169,7 +172,8 @@ static void led_pm_notify(struct pm_callback_s *cb , enum pm_state_e pmstate) ****************************************************************************/ #ifdef CONFIG_PM -static int led_pm_prepare(struct pm_callback_s *cb , enum pm_state_e pmstate) +static int led_pm_prepare(struct pm_callback_s *cb, int domain, + enum pm_state_e pmstate) { /* No preparation to change power modes is required by the LEDs driver. * We always accept the state change by returning OK.