Lines Matching refs:cpu_reg
34 struct regulator *cpu_reg; member
46 struct regulator *cpu_reg = priv->cpu_reg; in set_target() local
60 if (!IS_ERR(cpu_reg)) { in set_target()
75 volt_old = regulator_get_voltage(cpu_reg); in set_target()
85 if (!IS_ERR(cpu_reg) && new_freq > old_freq) { in set_target()
86 ret = regulator_set_voltage_tol(cpu_reg, volt, tol); in set_target()
97 if (!IS_ERR(cpu_reg) && volt_old > 0) in set_target()
98 regulator_set_voltage_tol(cpu_reg, volt_old, tol); in set_target()
103 if (!IS_ERR(cpu_reg) && new_freq < old_freq) { in set_target()
104 ret = regulator_set_voltage_tol(cpu_reg, volt, tol); in set_target()
119 struct regulator *cpu_reg; in allocate_resources() local
137 cpu_reg = regulator_get_optional(cpu_dev, reg); in allocate_resources()
138 if (IS_ERR(cpu_reg)) { in allocate_resources()
143 if (PTR_ERR(cpu_reg) == -EPROBE_DEFER) { in allocate_resources()
156 cpu, PTR_ERR(cpu_reg)); in allocate_resources()
162 if (!IS_ERR(cpu_reg)) in allocate_resources()
163 regulator_put(cpu_reg); in allocate_resources()
178 *creg = cpu_reg; in allocate_resources()
192 struct regulator *cpu_reg; in cpufreq_init() local
198 ret = allocate_resources(policy->cpu, &cpu_dev, &cpu_reg, &cpu_clk); in cpufreq_init()
236 if (!IS_ERR(cpu_reg)) { in cpufreq_init()
258 if (regulator_is_supported_voltage(cpu_reg, in cpufreq_init()
272 ret = regulator_set_voltage_time(cpu_reg, min_uV, max_uV); in cpufreq_init()
284 priv->cpu_reg = cpu_reg; in cpufreq_init()
314 if (!IS_ERR(cpu_reg)) in cpufreq_init()
315 regulator_put(cpu_reg); in cpufreq_init()
328 if (!IS_ERR(priv->cpu_reg)) in cpufreq_exit()
329 regulator_put(priv->cpu_reg); in cpufreq_exit()
377 struct regulator *cpu_reg; in dt_cpufreq_probe() local
388 ret = allocate_resources(0, &cpu_dev, &cpu_reg, &cpu_clk); in dt_cpufreq_probe()
393 if (!IS_ERR(cpu_reg)) in dt_cpufreq_probe()
394 regulator_put(cpu_reg); in dt_cpufreq_probe()