Lines Matching +full:down +full:- +full:scaling
1 // SPDX-License-Identifier: GPL-2.0-only
3 * CPU frequency scaling for OMAP using OPP information
8 * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
10 * Copyright (C) 2007-2011 Texas Instruments, Inc.
11 * - OMAP3/4 support by Rajendra Nayak, Santosh Shilimkar
49 old_freq = policy->cur; in omap_target()
53 ret = clk_round_rate(policy->clk, freq); in omap_target()
67 return -EINVAL; in omap_target()
75 dev_dbg(mpu_dev, "cpufreq-omap: %u MHz, %ld mV --> %u MHz, %ld mV\n", in omap_target()
76 old_freq / 1000, volt_old ? volt_old / 1000 : -1, in omap_target()
77 new_freq / 1000, volt ? volt / 1000 : -1); in omap_target()
79 /* scaling up? scale voltage before frequency */ in omap_target()
81 r = regulator_set_voltage(mpu_reg, volt - tol, volt + tol); in omap_target()
89 ret = clk_set_rate(policy->clk, new_freq * 1000); in omap_target()
91 /* scaling down? scale voltage after frequency */ in omap_target()
93 r = regulator_set_voltage(mpu_reg, volt - tol, volt + tol); in omap_target()
95 dev_warn(mpu_dev, "%s: unable to scale voltage down.\n", in omap_target()
97 clk_set_rate(policy->clk, old_freq * 1000); in omap_target()
115 policy->clk = clk_get(NULL, "cpufreq_ck"); in omap_cpu_init()
116 if (IS_ERR(policy->clk)) in omap_cpu_init()
117 return PTR_ERR(policy->clk); in omap_cpu_init()
124 __func__, policy->cpu, result); in omap_cpu_init()
125 clk_put(policy->clk); in omap_cpu_init()
141 clk_put(policy->clk); in omap_cpu_exit()
162 return -EINVAL; in omap_cpufreq_probe()
192 .name = "omap-cpufreq",