/* This file is part of cputemp2maxfreq. Copyright (C) 2023-2024 pa4wdh cputemp2maxfreq is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License , or (at your option) any later version. cputemp2maxfreq is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with cputemp2maxfreq; see the file COPYING. If not, see . */ #include #include #include #include #include #include #include #include "debug.h" #include "sysfs.h" #include "cputemp2maxfreq.h" extern struct s_cpudata cpudata; // Set a cpufreq parameter to a value int cpufreq_set_str(char *parameter,char *value,long int checkdelay) { int cpu; char sysfs_file[128]; int done=0; DEBUG1_CPUFREQ("Set %s to %s\n",parameter,value) if (cpudata.cpulist==NULL) { DEBUG1_CPUFREQ("No CPU list\n"); return -1; } for(cpu=0;cpu