t /sys/devices/system/cpu/cpufreq/pmqos/* - - - - security.SMACK64="System::Shared"
z /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 0440 root system_fw -
t /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq - - - - security.SMACK64="System::Shared"
+z /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 0660 root system_fw -
+t /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq - - - - security.SMACK64="System::Shared"
+z /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 0660 root system_fw -
+t /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq - - - - security.SMACK64="System::Shared"
z /sys/class/sec/temperature/* 0440 root system_fw -
t /sys/class/sec/temperature/* - - - - security.SMACK64="System::Shared"
z /sys/kernel/debug/fault_around_bytes 0660 root system_fw -
#include "../shared/sysfs.h"
+#define CPUFREQ_PATH_PREFIX "/sys/devices/system/cpu/"
#define CPUFREQ_PMQOS_PATH_PREFIX "/sys/devices/system/cpu/cpufreq/pmqos"
#define CPUFREQ_PATH_PREFIX "/sys/devices/system/cpu/"
#define TMU_PATH_PREFIX "/sys/class/sec/temperature/"
#define CPUFREQ_CPU_ONLINE_MIN_NUM_PATH_SUFFIX "/cpu_online_min"
#define CPUFREQ_CPU_ONLINE_MAX_NUM_PATH_SUFFIX "/cpu_online_max"
-#define CPUFREQ_MAX_FREQ_PATH_SUFFIX "/cpufreq_max"
-#define CPUFREQ_MIN_FREQ_PATH_SUFFIX "/cpufreq_min"
+#define CPUFREQ_MAX_FREQ_PATH_SUFFIX "/cpufreq/scaling_max_freq"
+#define CPUFREQ_MIN_FREQ_PATH_SUFFIX "/cpufreq/scaling_min_freq"
#define CPUFREQ_CURR_FREQ_PATH_SUFFIX "/cpufreq/cpuinfo_cur_freq"
#define CPUFREQ_DEFAULT_MIN_FREQ 0
if (!res_name)
return -EINVAL;
- snprintf(path, PATH_MAX, "%s%s",
- CPUFREQ_PMQOS_PATH_PREFIX,
- CPUFREQ_MIN_FREQ_PATH_SUFFIX);
+ snprintf(path, PATH_MAX, "%s%s%s",
+ CPUFREQ_PATH_PREFIX,
+ res_name,
+ CPUFREQ_MIN_FREQ_PATH_SUFFIX);
ret = sysfs_read_int(path, &min_freq);
if (ret < 0)
if (!res_name)
return -EINVAL;
- ret = snprintf(path, PATH_MAX, "%s%s",
- CPUFREQ_PMQOS_PATH_PREFIX,
+ snprintf(path, PATH_MAX, "%s%s%s",
+ CPUFREQ_PATH_PREFIX,
+ res_name,
CPUFREQ_MIN_FREQ_PATH_SUFFIX);
ret = sysfs_write_int(path, freq);
if (!res_name)
return -EINVAL;
- snprintf(path, PATH_MAX, "%s%s",
- CPUFREQ_PMQOS_PATH_PREFIX,
+ snprintf(path, PATH_MAX, "%s%s%s",
+ CPUFREQ_PATH_PREFIX,
+ res_name,
CPUFREQ_MAX_FREQ_PATH_SUFFIX);
ret = sysfs_read_int(path, &max_freq);
if (!res_name)
return -EINVAL;
- snprintf(path, PATH_MAX, "%s%s",
- CPUFREQ_PMQOS_PATH_PREFIX,
+ snprintf(path, PATH_MAX, "%s%s%s",
+ CPUFREQ_PATH_PREFIX,
+ res_name,
CPUFREQ_MAX_FREQ_PATH_SUFFIX);
ret = sysfs_write_int(path, freq);