(for devs only)
remember iscaela's "undervolt" hack for the stock - closed source - HTC kernel?
the following quick & dirty kernel mod will allow your users to query and set cpu supply voltages for each frequency through a sysfs interface
the patch is available here: 2.6.32-vddlevels.patch
after applying the patch the "CONFIG_CPU_FREQ_VDD_LEVELS" option will be available in the kernel configuration (set it to 'y')
usage:
query: (output: first column: frequency (kHz), second column: vdd* (mV))
incrementing/decrementing all levels by a specified amount* (mV):
adjusting the supply voltage* (second value, mV) at a specific frequency (first value, kHz):
*: vdd values must be a multiple of 25 (enforced by the interface; the regulator doesn't accept other values - found out in the hard way)
please note that the values set through this interface will only be written to the acpu table - they will only become effective when the specific frequency is (re)set by cpufreq
i took the input parser from iscaela's code - thanks for it
do not apply this patch if you plan to use avs
to query the constraints of the regulator ("max_microvolts", "min_microvolts") or the voltage currently supplied to the cpu ("microvolts" (uV)):
--
dedicated to the cheeky buggers at #leedroid-roms
remember iscaela's "undervolt" hack for the stock - closed source - HTC kernel?
the following quick & dirty kernel mod will allow your users to query and set cpu supply voltages for each frequency through a sysfs interface
the patch is available here: 2.6.32-vddlevels.patch
after applying the patch the "CONFIG_CPU_FREQ_VDD_LEVELS" option will be available in the kernel configuration (set it to 'y')
usage:
query: (output: first column: frequency (kHz), second column: vdd* (mV))
Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
128000: 950
245000: 950
384000: 975
422400: 975
460800: 1000
499200: 1025
537600: 1025
576000: 1050
614400: 1075
652800: 1100
691200: 1125
729600: 1150
768000: 1175
806400: 1200
844800: 1200
883200: 1225
921600: 1225
960000: 1250
998400: 1275
1036800: 1275
1075200: 1275
1113600: 1300
1152000: 1300
1190400: 1300
incrementing/decrementing all levels by a specified amount* (mV):
Code:
echo '-25' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
echo '+25' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
adjusting the supply voltage* (second value, mV) at a specific frequency (first value, kHz):
Code:
echo '998400 1250' > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
*: vdd values must be a multiple of 25 (enforced by the interface; the regulator doesn't accept other values - found out in the hard way)
please note that the values set through this interface will only be written to the acpu table - they will only become effective when the specific frequency is (re)set by cpufreq
i took the input parser from iscaela's code - thanks for it
do not apply this patch if you plan to use avs
to query the constraints of the regulator ("max_microvolts", "min_microvolts") or the voltage currently supplied to the cpu ("microvolts" (uV)):
Code:
grep '.' /sys/class/i2c-adapter/i2c-0/0-0048/regulator/regulator.0/*
--
dedicated to the cheeky buggers at #leedroid-roms
Last edited: