17fe2f639SDominik Brodowski #ifndef __CPUPOWER_HELPERS_SYSFS_H__
27fe2f639SDominik Brodowski #define __CPUPOWER_HELPERS_SYSFS_H__
37fe2f639SDominik Brodowski 
47fe2f639SDominik Brodowski #define PATH_TO_CPU "/sys/devices/system/cpu/"
57fe2f639SDominik Brodowski #define MAX_LINE_LEN 255
67fe2f639SDominik Brodowski #define SYSFS_PATH_MAX 255
77fe2f639SDominik Brodowski 
87fe2f639SDominik Brodowski extern unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen);
97fe2f639SDominik Brodowski 
107c74d2bcSThomas Renninger extern int sysfs_is_cpu_online(unsigned int cpu);
117c74d2bcSThomas Renninger 
122cd005caSDominik Brodowski extern unsigned long sysfs_get_idlestate_latency(unsigned int cpu,
132cd005caSDominik Brodowski 						unsigned int idlestate);
142cd005caSDominik Brodowski extern unsigned long sysfs_get_idlestate_usage(unsigned int cpu,
152cd005caSDominik Brodowski 					unsigned int idlestate);
162cd005caSDominik Brodowski extern unsigned long long sysfs_get_idlestate_time(unsigned int cpu,
172cd005caSDominik Brodowski 						unsigned int idlestate);
182cd005caSDominik Brodowski extern char *sysfs_get_idlestate_name(unsigned int cpu,
192cd005caSDominik Brodowski 				unsigned int idlestate);
202cd005caSDominik Brodowski extern char *sysfs_get_idlestate_desc(unsigned int cpu,
212cd005caSDominik Brodowski 				unsigned int idlestate);
227fe2f639SDominik Brodowski extern int sysfs_get_idlestate_count(unsigned int cpu);
237fe2f639SDominik Brodowski 
247fe2f639SDominik Brodowski extern char *sysfs_get_cpuidle_governor(void);
257fe2f639SDominik Brodowski extern char *sysfs_get_cpuidle_driver(void);
267fe2f639SDominik Brodowski 
277fe2f639SDominik Brodowski extern int sysfs_get_sched(const char *smt_mc);
287fe2f639SDominik Brodowski extern int sysfs_set_sched(const char *smt_mc, int val);
297fe2f639SDominik Brodowski 
307fe2f639SDominik Brodowski #endif /* __CPUPOWER_HELPERS_SYSFS_H__ */
31