PM: Add activity domain to all PM callbacks

This commit is contained in:
Gregory Nutt
2016-03-27 11:18:44 -06:00
parent 83aa1bebf3
commit 0e8ff50d18
16 changed files with 132 additions and 76 deletions
+9 -5
View File
@@ -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 <gnutt@nuttx.org>
* Darcy Gong <darcy.gong@gmail.com>
*
@@ -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.