pm: modify for nxstyle
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
3ea2dbb7b4
commit
7fa3ecde5a
@ -62,10 +62,10 @@ struct pm_greedy_governor_s
|
||||
|
||||
/* PM governor methods */
|
||||
|
||||
static void greedy_governor_statechanged(int domain,
|
||||
enum pm_state_e newstate);
|
||||
static enum pm_state_e greedy_governor_checkstate(int domain);
|
||||
static void greedy_governor_activity(int domain, int count);
|
||||
static void greedy_governor_statechanged(int domain,
|
||||
enum pm_state_e newstate);
|
||||
static enum pm_state_e greedy_governor_checkstate(int domain);
|
||||
static void greedy_governor_activity(int domain, int count);
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
@ -73,9 +73,12 @@ static void greedy_governor_activity(int domain, int count);
|
||||
|
||||
static const struct pm_governor_s g_greedy_governor_ops =
|
||||
{
|
||||
.statechanged = greedy_governor_statechanged, /* statechanged */
|
||||
.checkstate = greedy_governor_checkstate, /* checkstate */
|
||||
.activity = greedy_governor_activity, /* activity */
|
||||
NULL, /* initialize */
|
||||
NULL, /* deinitialize */
|
||||
greedy_governor_statechanged, /* statechanged */
|
||||
greedy_governor_checkstate, /* checkstate */
|
||||
greedy_governor_activity, /* activity */
|
||||
NULL /* priv */
|
||||
};
|
||||
|
||||
static struct pm_greedy_governor_s g_pm_greedy_governor;
|
||||
|
@ -81,8 +81,8 @@ static void pm_wakelock_stats(FAR struct pm_wakelock_s *wakelock, bool stay)
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define pm_wakelock_stats_rm(w)
|
||||
#define pm_wakelock_stats(w, s)
|
||||
# define pm_wakelock_stats_rm(w)
|
||||
# define pm_wakelock_stats(w, s)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
@ -193,14 +193,14 @@ void pm_relax(int domain, enum pm_state_e state)
|
||||
*
|
||||
* 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
|
||||
* performing meaningful activities (non-idle), needs the power kept at
|
||||
* the last the specified level.
|
||||
* And this will timeout after time (ms), menas auto pm_relax
|
||||
*
|
||||
* Input Parameters:
|
||||
* domain - The domain of the PM activity
|
||||
* state - The state want to stay.
|
||||
* ms - The timeout value ms
|
||||
* state - The state want to stay.
|
||||
* ms - The timeout value ms
|
||||
*
|
||||
* Returned Value:
|
||||
* None.
|
||||
|
@ -194,7 +194,7 @@ static void pm_stats(FAR struct pm_domain_s *dom, int curstate, int newstate)
|
||||
clock_systime_timespec(&dom->start);
|
||||
}
|
||||
#else
|
||||
#define pm_stats(dom, curstate, newstate)
|
||||
# define pm_stats(dom, curstate, newstate)
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
|
@ -56,8 +56,6 @@
|
||||
|
||||
int pm_register(FAR struct pm_callback_s *callbacks)
|
||||
{
|
||||
irqstate_t flags;
|
||||
|
||||
DEBUGASSERT(callbacks);
|
||||
|
||||
/* Add the new entry to the end of the list of registered callbacks */
|
||||
|
@ -87,13 +87,11 @@
|
||||
* own, custom idle loop to support board-specific IDLE time power management
|
||||
*/
|
||||
|
||||
#define PM_WAKELOCK_INITIALIZER(name, domain, state) {name, domain, state}
|
||||
|
||||
#define PM_WAKELOCK_DECLARE(var, name, domain, state) \
|
||||
struct pm_wakelock_s var = PM_WAKELOCK_INITIALIZER(name, domain, state)
|
||||
struct pm_wakelock_s var = {name, domain, state}
|
||||
|
||||
#define PM_WAKELOCK_DECLARE_STATIC(var, name, domain, state) \
|
||||
static struct pm_wakelock_s var = PM_WAKELOCK_INITIALIZER(name, domain, state)
|
||||
static struct pm_wakelock_s var = {name, domain, state}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
@ -801,7 +799,6 @@ void pm_auto_updatestate(int domain);
|
||||
* avoid so much conditional compilation in driver code when PM is disabled:
|
||||
*/
|
||||
|
||||
# define PM_WAKELOCK_INITIALIZER(n,d,s) {0}
|
||||
# define PM_WAKELOCK_DECLARE(v,n,d,s)
|
||||
# define PM_WAKELOCK_DECLARE_STATIC(v,n,d,s)
|
||||
# define pm_initialize()
|
||||
|
Loading…
Reference in New Issue
Block a user