switch (type) {
case PASS_GOV_DUMMY:
+ case PASS_GOV_BASIC:
+ /* Don't use Hotplug interface */
return NULL;
case PASS_GOV_HOTPLUG_ONLY:
case PASS_GOV_STEP:
case PASS_GOV_RADIATION:
+ /* Use Hotplug interface */
hotplug = calloc(1, sizeof(struct pass_hotplug));
if (!hotplug) {
_E("cannot allocate the memory of struct pass_hotplug");
{
switch (type) {
case PASS_GOV_DUMMY:
+ return NULL;
+ case PASS_GOV_BASIC:
case PASS_GOV_HOTPLUG_ONLY:
+ /* Use the Resource controller only */
return &pass_gov_dummy;
case PASS_GOV_STEP:
+ /* Use the Resource controller and Step governor. */
return &pass_gov_step;
case PASS_GOV_RADIATION:
+ /* Use the Resource controller and Radiation governor. */
return &pass_gov_radiation;
default:
_E("Unknown governor type");
/*
* PASS Governor type
+ *
+ * ---------------------------------------------------------------------------
+ * | Governor name | HAL | Resource | Hotplug | Runtime |
+ * | | interface | controller | interface | governor |
+ * ---------------------------------------------------------------------------
+ * | GOV_DUMMY | Used | Un-used | Un-used | Un-used |
+ * | GOV_BASIC | Used | Used | Un-used | Un-used |
+ * | GOV_HOTPLUG_ONLY | Used | Used | Used | Un-used |
+ * | GOV_RADIATION | Used | Used | Used | Used (Radiation)|
+ * | GOV_STEP | Used | Used | Used | Used (Step) |
+ * ---------------------------------------------------------------------------
*/
enum pass_gov_type {
PASS_GOV_DUMMY = -1,
- PASS_GOV_HOTPLUG_ONLY = 0,
- PASS_GOV_STEP = 1,
- PASS_GOV_RADIATION = 2,
+ PASS_GOV_BASIC = 0,
+ PASS_GOV_HOTPLUG_ONLY = 1,
+ PASS_GOV_STEP = 2,
+ PASS_GOV_RADIATION = 3,
PASS_GOV_END,
};