Add function for cpu frequency scaling.