thermal: devfreq_cooling: refactor code and add get_voltage function
Move the code which gets the voltage for a given frequency.
This code will be resused in few places.
Acked-by: Javi Merino <javi.merino@kernel.org>
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
authored by Lukasz Luba and committed by Zhang Rui e34cab4c 39da7c50