power:govorner: add govorner to per domain.

For mult domains scene,,
activity and greety can be used at same time.
Let user to select domain governor.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
This commit is contained in:
zhuyanlin
2022-02-14 15:32:40 +08:00
committed by Alan Carvalho de Assis
parent 69cfe8d626
commit 5ce181e6b7
9 changed files with 178 additions and 41 deletions
+56
View File
@@ -223,6 +223,17 @@ struct pm_governor_s
CODE void (*initialize)(void);
/**************************************************************************
* Name: deinitialize
*
* Description:
* Allow the governor to release its internal data. This can be left to
* to NULL if not needed by the governor.
*
**************************************************************************/
CODE void (*deinitialize)(void);
/**************************************************************************
* Name: statechanged
*
@@ -313,6 +324,51 @@ extern "C"
void pm_initialize(void);
/****************************************************************************
* Name: pm_greedy_governor_initialize
*
* Description:
* Return the greedy governor instance.
*
* Returned Value:
* A pointer to the governor struct. Otherwise NULL is returned on error.
*
****************************************************************************/
FAR const struct pm_governor_s *pm_greedy_governor_initialize(void);
/****************************************************************************
* Name: pm_activity_governor_initialize
*
* Description:
* Return the activity governor instance.
*
* Returned Value:
* A pointer to the governor struct. Otherwise NULL is returned on error.
*
****************************************************************************/
FAR const struct pm_governor_s *pm_activity_governor_initialize(void);
/****************************************************************************
* Name: pm_set_governor
*
* Description:
* This function set the domain with assigned governor
*
* Input Parameters:
* domain - The PM domain to Set
* gov - The governor to use
*
* Returned Value:
* On success - OK
* On error - -EINVAL
*
*
****************************************************************************/
int pm_set_governor(int domain, FAR const struct pm_governor_s *gov);
/****************************************************************************
* Name: pm_auto_update
*