Currently, a multi-step frequency change is done from the power_management_task. This stops the fan controller from working while it's ramping up.
A possible improvement would be to have a separate frequency_controller_task, that can both do the initial frequency ramp and any subsequent changes. This way, the power_management_task can just handle the fan and overheat control.
Voltage adjustments could also be moved into this new task.