[PATCH V4 09/14] cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Fri Apr 22 01:20:57 PDT 2022


Il 22/04/22 09:52, Rex-BC Chen ha scritto:
> From: Jia-Wei Chang <jia-wei.chang at mediatek.com>
> 
> Because the difference of sram and proc should in a range of min_volt_shift
> and max_volt_shift. We need to adjust the sram and proc step by step.
> 
> We replace VOLT_TOL (voltage tolerance) with the platform data and update the
> logic to determine the voltage boundary and invoking regulator_set_voltage.
> 
> - Use 'sram_min_volt' and 'sram_max_volt' to determine the voltage boundary
>    of sram regulator.
> - Use (sram_min_volt - min_volt_shift) and 'proc_max_volt' to determine the
>    voltage boundary of vproc regulator.
> 
> Moreover, to prevent infinite loop when tracking voltage, we calculate the
> maximum value for each platform data.
> We assume min voltage is 0 and tracking target voltage using
> min_volt_shift for each iteration.
> The retry_max is 3 times of expeted iteration count.
> 
> Signed-off-by: Jia-Wei Chang <jia-wei.chang at mediatek.com>
> Signed-off-by: Rex-BC Chen <rex-bc.chen at mediatek.com>


Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>




More information about the Linux-mediatek mailing list