Lines Matching refs:governor

294 	struct devfreq_governor *governor;  in try_then_request_governor()  local
304 governor = find_devfreq_governor(name); in try_then_request_governor()
305 if (IS_ERR(governor)) { in try_then_request_governor()
318 governor = find_devfreq_governor(name); in try_then_request_governor()
321 return governor; in try_then_request_governor()
411 if (!devfreq->governor) in devfreq_update_target()
415 err = devfreq->governor->get_target_freq(devfreq, &freq); in devfreq_update_target()
487 if (IS_SUPPORTED_FLAG(devfreq->governor->flags, IRQ_DRIVEN)) in devfreq_monitor_start()
525 if (IS_SUPPORTED_FLAG(devfreq->governor->flags, IRQ_DRIVEN)) in devfreq_monitor_stop()
564 if (IS_SUPPORTED_FLAG(devfreq->governor->flags, IRQ_DRIVEN)) in devfreq_monitor_suspend()
585 if (IS_SUPPORTED_FLAG(devfreq->governor->flags, IRQ_DRIVEN)) in devfreq_monitor_resume()
625 if (IS_SUPPORTED_FLAG(devfreq->governor->flags, IRQ_DRIVEN)) in devfreq_update_interval()
809 struct devfreq_governor *governor; in devfreq_add_device() local
947 governor = try_then_request_governor(governor_name); in devfreq_add_device()
948 if (IS_ERR(governor)) { in devfreq_add_device()
951 err = PTR_ERR(governor); in devfreq_add_device()
955 devfreq->governor = governor; in devfreq_add_device()
956 err = devfreq->governor->event_handler(devfreq, DEVFREQ_GOV_START, in devfreq_add_device()
964 create_sysfs_files(devfreq, devfreq->governor); in devfreq_add_device()
1003 if (devfreq->governor) { in devfreq_remove_device()
1004 devfreq->governor->event_handler(devfreq, in devfreq_remove_device()
1006 remove_sysfs_files(devfreq, devfreq->governor); in devfreq_remove_device()
1167 if (devfreq->governor) { in devfreq_suspend_device()
1168 ret = devfreq->governor->event_handler(devfreq, in devfreq_suspend_device()
1212 if (devfreq->governor) { in devfreq_resume_device()
1213 ret = devfreq->governor->event_handler(devfreq, in devfreq_resume_device()
1271 int devfreq_add_governor(struct devfreq_governor *governor) in devfreq_add_governor() argument
1277 if (!governor) { in devfreq_add_governor()
1283 g = find_devfreq_governor(governor->name); in devfreq_add_governor()
1291 list_add(&governor->node, &devfreq_governor_list); in devfreq_add_governor()
1297 if (!strncmp(devfreq->governor->name, governor->name, in devfreq_add_governor()
1300 if (devfreq->governor) { in devfreq_add_governor()
1303 __func__, devfreq->governor->name); in devfreq_add_governor()
1304 ret = devfreq->governor->event_handler(devfreq, in devfreq_add_governor()
1310 devfreq->governor->name, ret); in devfreq_add_governor()
1314 devfreq->governor = governor; in devfreq_add_governor()
1315 ret = devfreq->governor->event_handler(devfreq, in devfreq_add_governor()
1319 __func__, devfreq->governor->name, in devfreq_add_governor()
1332 static void devm_devfreq_remove_governor(void *governor) in devm_devfreq_remove_governor() argument
1334 WARN_ON(devfreq_remove_governor(governor)); in devm_devfreq_remove_governor()
1345 struct devfreq_governor *governor) in devm_devfreq_add_governor() argument
1349 err = devfreq_add_governor(governor); in devm_devfreq_add_governor()
1354 governor); in devm_devfreq_add_governor()
1362 int devfreq_remove_governor(struct devfreq_governor *governor) in devfreq_remove_governor() argument
1368 if (!governor) { in devfreq_remove_governor()
1374 g = find_devfreq_governor(governor->name); in devfreq_remove_governor()
1377 governor->name); in devfreq_remove_governor()
1385 if (!strncmp(devfreq->governor->name, governor->name, in devfreq_remove_governor()
1388 if (!devfreq->governor) { in devfreq_remove_governor()
1390 __func__, governor->name); in devfreq_remove_governor()
1394 ret = devfreq->governor->event_handler(devfreq, in devfreq_remove_governor()
1398 __func__, devfreq->governor->name, in devfreq_remove_governor()
1401 devfreq->governor = NULL; in devfreq_remove_governor()
1405 list_del(&governor->node); in devfreq_remove_governor()
1426 if (!df->governor) in governor_show()
1429 return sprintf(buf, "%s\n", df->governor->name); in governor_show()
1438 const struct devfreq_governor *governor, *prev_governor; in governor_store() local
1440 if (!df->governor) in governor_store()
1448 governor = try_then_request_governor(str_governor); in governor_store()
1449 if (IS_ERR(governor)) { in governor_store()
1450 ret = PTR_ERR(governor); in governor_store()
1453 if (df->governor == governor) { in governor_store()
1456 } else if (IS_SUPPORTED_FLAG(df->governor->flags, IMMUTABLE) in governor_store()
1457 || IS_SUPPORTED_FLAG(governor->flags, IMMUTABLE)) { in governor_store()
1466 ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL); in governor_store()
1469 __func__, df->governor->name, ret); in governor_store()
1472 remove_sysfs_files(df, df->governor); in governor_store()
1478 prev_governor = df->governor; in governor_store()
1479 df->governor = governor; in governor_store()
1480 ret = df->governor->event_handler(df, DEVFREQ_GOV_START, NULL); in governor_store()
1483 __func__, df->governor->name, ret); in governor_store()
1486 df->governor = prev_governor; in governor_store()
1487 ret = df->governor->event_handler(df, DEVFREQ_GOV_START, NULL); in governor_store()
1492 df->governor = NULL; in governor_store()
1501 create_sysfs_files(df, df->governor); in governor_store()
1510 static DEVICE_ATTR_RW(governor);
1519 if (!df->governor) in available_governors_show()
1528 if (IS_SUPPORTED_FLAG(df->governor->flags, IMMUTABLE)) { in available_governors_show()
1530 "%s ", df->governor->name); in available_governors_show()
1536 struct devfreq_governor *governor; in available_governors_show() local
1538 list_for_each_entry(governor, &devfreq_governor_list, node) { in available_governors_show()
1539 if (IS_SUPPORTED_FLAG(governor->flags, IMMUTABLE)) in available_governors_show()
1542 "%s ", governor->name); in available_governors_show()
1843 if (!df->governor) in polling_interval_store()
1850 df->governor->event_handler(df, DEVFREQ_GOV_UPDATE_INTERVAL, &value); in polling_interval_store()
1876 if (!df->governor || !df->profile) in timer_store()
1904 ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL); in timer_store()
1907 __func__, df->governor->name, ret); in timer_store()
1911 ret = df->governor->event_handler(df, DEVFREQ_GOV_START, NULL); in timer_store()
1914 __func__, df->governor->name, ret); in timer_store()
1992 if (!strncmp(devfreq->governor->name, DEVFREQ_GOV_PASSIVE, in devfreq_summary_show()
2008 if (IS_SUPPORTED_ATTR(devfreq->governor->attrs, POLLING_INTERVAL)) in devfreq_summary_show()
2018 devfreq->governor->name, in devfreq_summary_show()