From bd869d265f52e4d9e8f96fc625c185b9b762a0b5 Mon Sep 17 00:00:00 2001 From: Michael Bestas Date: Mon, 30 Sep 2019 23:04:35 +0300 Subject: power: Introduce is_schedutil_governor Change-Id: Ie3cfd0cb11b368cd9399a6dcea6b6cfa1f4d7916 --- utils.c | 5 +++++ utils.h | 1 + 2 files changed, 6 insertions(+) diff --git a/utils.c b/utils.c index 7f6229b..57ffc91 100644 --- a/utils.c +++ b/utils.c @@ -192,6 +192,11 @@ int is_interactive_governor(char* governor) { return 0; } +int is_schedutil_governor(char* governor) { + if (strncmp(governor, SCHEDUTIL_GOVERNOR, (strlen(SCHEDUTIL_GOVERNOR) + 1)) == 0) return 1; + return 0; +} + #ifndef INTERACTION_BOOST void interaction(int UNUSED(duration), int UNUSED(num_args), int UNUSED(opt_list[])) { #else diff --git a/utils.h b/utils.h index d5037cf..28c59de 100644 --- a/utils.h +++ b/utils.h @@ -34,6 +34,7 @@ int sysfs_write(char* path, char* s); int get_scaling_governor(char governor[], int size); int get_scaling_governor_check_cores(char governor[], int size, int core_num); int is_interactive_governor(char*); +int is_schedutil_governor(char*); void perform_hint_action(int hint_id, int resource_values[], int num_resources); void undo_hint_action(int hint_id); -- cgit v1.2.3