Lines Matching +full:speed +full:- +full:grade
1 // SPDX-License-Identifier: GPL-2.0
5 * The sun50i-cpufreq-nvmem driver reads the efuse value from the SoC to
15 #include <linux/nvmem-consumer.h>
29 * sun50i_cpufreq_get_efuse() - Determine speed grade from efuse value
45 return -ENODEV; in sun50i_cpufreq_get_efuse()
49 return -ENOENT; in sun50i_cpufreq_get_efuse()
52 "allwinner,sun50i-h6-operating-points"); in sun50i_cpufreq_get_efuse()
55 return -ENOENT; in sun50i_cpufreq_get_efuse()
73 * the slowest bin. Expected efuse values are 1-3, slowest in sun50i_cpufreq_get_efuse()
77 *versions = efuse_value - 1; in sun50i_cpufreq_get_efuse()
90 u32 speed = 0; in sun50i_cpufreq_nvmem_probe() local
96 return -ENOMEM; in sun50i_cpufreq_nvmem_probe()
98 ret = sun50i_cpufreq_get_efuse(&speed); in sun50i_cpufreq_nvmem_probe()
104 snprintf(name, MAX_NAME_LEN, "speed%d", speed); in sun50i_cpufreq_nvmem_probe()
110 ret = -ENODEV; in sun50i_cpufreq_nvmem_probe()
122 cpufreq_dt_pdev = platform_device_register_simple("cpufreq-dt", -1, in sun50i_cpufreq_nvmem_probe()
157 .name = "sun50i-cpufreq-nvmem",
162 { .compatible = "allwinner,sun50i-h6" },
191 return -ENODEV; in sun50i_cpufreq_init()
198 platform_device_register_simple("sun50i-cpufreq-nvmem", in sun50i_cpufreq_init()
199 -1, NULL, 0); in sun50i_cpufreq_init()
216 MODULE_DESCRIPTION("Sun50i-h6 cpufreq driver");