/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/volt/ |
H A D | base.c | 28 #include <subdev/bios/volt.h> 32 nvkm_volt_get(struct nvkm_volt *volt) in nvkm_volt_get() argument 36 if (volt->func->volt_get) in nvkm_volt_get() 37 return volt->func->volt_get(volt); in nvkm_volt_get() 39 ret = volt->func->vid_get(volt); in nvkm_volt_get() 41 for (i = 0; i < volt->vid_nr; i++) { in nvkm_volt_get() 42 if (volt->vid[i].vid == ret) in nvkm_volt_get() 43 return volt in nvkm_volt_get() 51 nvkm_volt_set(struct nvkm_volt *volt, u32 uv) nvkm_volt_set() argument 82 nvkm_volt_map_min(struct nvkm_volt *volt, u8 id) nvkm_volt_map_min() argument 104 nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp) nvkm_volt_map() argument 160 nvkm_volt_set_id(struct nvkm_volt *volt, u8 id, u8 min_id, u8 temp, int condition) nvkm_volt_set_id() argument 186 nvkm_volt_parse_bios(struct nvkm_bios *bios, struct nvkm_volt *volt) nvkm_volt_parse_bios() argument 233 nvkm_volt_speedo_read(struct nvkm_volt *volt) nvkm_volt_speedo_read() argument 243 struct nvkm_volt *volt = nvkm_volt(subdev); nvkm_volt_init() local 257 struct nvkm_volt *volt = nvkm_volt(subdev); nvkm_volt_oneinit() local 283 nvkm_volt_ctor(const struct nvkm_volt_func *func, struct nvkm_device *device, int index, struct nvkm_volt *volt) nvkm_volt_ctor() argument [all...] |
H A D | gk20a.c | 95 struct gk20a_volt *volt = gk20a_volt(base); in gk20a_volt_vid_get() local 98 uv = regulator_get_voltage(volt->vdd); in gk20a_volt_vid_get() 100 for (i = 0; i < volt->base.vid_nr; i++) in gk20a_volt_vid_get() 101 if (volt->base.vid[i].uv >= uv) in gk20a_volt_vid_get() 110 struct gk20a_volt *volt = gk20a_volt(base); in gk20a_volt_vid_set() local 111 struct nvkm_subdev *subdev = &volt->base.subdev; in gk20a_volt_vid_set() 113 nvkm_debug(subdev, "set voltage as %duv\n", volt->base.vid[vid].uv); in gk20a_volt_vid_set() 114 return regulator_set_voltage(volt->vdd, volt->base.vid[vid].uv, 1200000); in gk20a_volt_vid_set() 120 struct gk20a_volt *volt in gk20a_volt_set_id() local 147 gk20a_volt_ctor(struct nvkm_device *device, int index, const struct cvb_coef *coefs, int nb_coefs, int vmin, struct gk20a_volt *volt) gk20a_volt_ctor() argument 177 struct gk20a_volt *volt; gk20a_volt_new() local [all...] |
H A D | gf100.c | 29 gf100_volt_speedo_read(struct nvkm_volt *volt) in gf100_volt_speedo_read() argument 31 struct nvkm_device *device = volt->subdev.device; in gf100_volt_speedo_read() 41 gf100_volt_oneinit(struct nvkm_volt *volt) in gf100_volt_oneinit() argument 43 struct nvkm_subdev *subdev = &volt->subdev; in gf100_volt_oneinit() 44 if (volt->speedo <= 0) in gf100_volt_oneinit() 61 struct nvkm_volt *volt; in gf100_volt_new() local 64 ret = nvkm_volt_new_(&gf100_volt, device, index, &volt); in gf100_volt_new() 65 *pvolt = volt; in gf100_volt_new() 69 return nvkm_voltgpio_init(volt); in gf100_volt_new()
|
H A D | gpio.c | 24 #include <subdev/volt.h> 36 nvkm_voltgpio_get(struct nvkm_volt *volt) in nvkm_voltgpio_get() argument 38 struct nvkm_gpio *gpio = volt->subdev.device->gpio; in nvkm_voltgpio_get() 43 if (volt->vid_mask & (1 << i)) { in nvkm_voltgpio_get() 55 nvkm_voltgpio_set(struct nvkm_volt *volt, u8 vid) in nvkm_voltgpio_set() argument 57 struct nvkm_gpio *gpio = volt->subdev.device->gpio; in nvkm_voltgpio_set() 61 if (volt->vid_mask & (1 << i)) { in nvkm_voltgpio_set() 72 nvkm_voltgpio_init(struct nvkm_volt *volt) in nvkm_voltgpio_init() argument 74 struct nvkm_subdev *subdev = &volt->subdev; in nvkm_voltgpio_init() 86 if (volt in nvkm_voltgpio_init() [all...] |
H A D | gk104.c | 26 #include <subdev/volt.h> 29 #include <subdev/bios/volt.h> 69 gk104_volt_speedo_read(struct nvkm_volt *volt) in gk104_volt_speedo_read() argument 71 struct nvkm_device *device = volt->subdev.device; in gk104_volt_speedo_read() 103 struct gk104_volt *volt; in gk104_volt_new() local 115 if (!(volt = kzalloc(sizeof(*volt), GFP_KERNEL))) in gk104_volt_new() 117 nvkm_volt_ctor(volt_func, device, index, &volt->base); in gk104_volt_new() 118 *pvolt = &volt->base; in gk104_volt_new() 119 volt in gk104_volt_new() [all...] |
H A D | gm20b.c | 70 struct gk20a_volt *volt; in gm20b_volt_new() local 79 volt = kzalloc(sizeof(*volt), GFP_KERNEL); in gm20b_volt_new() 80 if (!volt) in gm20b_volt_new() 82 *pvolt = &volt->base; in gm20b_volt_new() 88 ARRAY_SIZE(gm20b_na_cvb_coef), vmin, volt); in gm20b_volt_new() 91 ARRAY_SIZE(gm20b_cvb_coef), vmin, volt); in gm20b_volt_new()
|
H A D | gf117.c | 29 gf117_volt_speedo_read(struct nvkm_volt *volt) in gf117_volt_speedo_read() argument 31 struct nvkm_device *device = volt->subdev.device; in gf117_volt_speedo_read() 51 struct nvkm_volt *volt; in gf117_volt_new() local 54 ret = nvkm_volt_new_(&gf117_volt, device, index, &volt); in gf117_volt_new() 55 *pvolt = volt; in gf117_volt_new() 59 return nvkm_voltgpio_init(volt); in gf117_volt_new()
|
H A D | nv40.c | 35 struct nvkm_volt *volt; in nv40_volt_new() local 38 ret = nvkm_volt_new_(&nv40_volt, device, index, &volt); in nv40_volt_new() 39 *pvolt = volt; in nv40_volt_new() 43 return nvkm_voltgpio_init(volt); in nv40_volt_new()
|
/kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/subdev/volt/ |
H A D | base.c | 28 #include <subdev/bios/volt.h> 32 nvkm_volt_get(struct nvkm_volt *volt) in nvkm_volt_get() argument 36 if (volt->func->volt_get) in nvkm_volt_get() 37 return volt->func->volt_get(volt); in nvkm_volt_get() 39 ret = volt->func->vid_get(volt); in nvkm_volt_get() 41 for (i = 0; i < volt->vid_nr; i++) { in nvkm_volt_get() 42 if (volt->vid[i].vid == ret) in nvkm_volt_get() 43 return volt in nvkm_volt_get() 51 nvkm_volt_set(struct nvkm_volt *volt, u32 uv) nvkm_volt_set() argument 82 nvkm_volt_map_min(struct nvkm_volt *volt, u8 id) nvkm_volt_map_min() argument 104 nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp) nvkm_volt_map() argument 160 nvkm_volt_set_id(struct nvkm_volt *volt, u8 id, u8 min_id, u8 temp, int condition) nvkm_volt_set_id() argument 186 nvkm_volt_parse_bios(struct nvkm_bios *bios, struct nvkm_volt *volt) nvkm_volt_parse_bios() argument 233 nvkm_volt_speedo_read(struct nvkm_volt *volt) nvkm_volt_speedo_read() argument 243 struct nvkm_volt *volt = nvkm_volt(subdev); nvkm_volt_init() local 257 struct nvkm_volt *volt = nvkm_volt(subdev); nvkm_volt_oneinit() local 283 nvkm_volt_ctor(const struct nvkm_volt_func *func, struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_volt *volt) nvkm_volt_ctor() argument [all...] |
H A D | gk20a.c | 95 struct gk20a_volt *volt = gk20a_volt(base); in gk20a_volt_vid_get() local 98 uv = regulator_get_voltage(volt->vdd); in gk20a_volt_vid_get() 100 for (i = 0; i < volt->base.vid_nr; i++) in gk20a_volt_vid_get() 101 if (volt->base.vid[i].uv >= uv) in gk20a_volt_vid_get() 110 struct gk20a_volt *volt = gk20a_volt(base); in gk20a_volt_vid_set() local 111 struct nvkm_subdev *subdev = &volt->base.subdev; in gk20a_volt_vid_set() 113 nvkm_debug(subdev, "set voltage as %duv\n", volt->base.vid[vid].uv); in gk20a_volt_vid_set() 114 return regulator_set_voltage(volt->vdd, volt->base.vid[vid].uv, 1200000); in gk20a_volt_vid_set() 120 struct gk20a_volt *volt in gk20a_volt_set_id() local 147 gk20a_volt_ctor(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, const struct cvb_coef *coefs, int nb_coefs, int vmin, struct gk20a_volt *volt) gk20a_volt_ctor() argument 177 struct gk20a_volt *volt; gk20a_volt_new() local [all...] |
H A D | gf100.c | 29 gf100_volt_speedo_read(struct nvkm_volt *volt) in gf100_volt_speedo_read() argument 31 struct nvkm_device *device = volt->subdev.device; in gf100_volt_speedo_read() 41 gf100_volt_oneinit(struct nvkm_volt *volt) in gf100_volt_oneinit() argument 43 struct nvkm_subdev *subdev = &volt->subdev; in gf100_volt_oneinit() 44 if (volt->speedo <= 0) in gf100_volt_oneinit() 62 struct nvkm_volt *volt; in gf100_volt_new() local 65 ret = nvkm_volt_new_(&gf100_volt, device, type, inst, &volt); in gf100_volt_new() 66 *pvolt = volt; in gf100_volt_new() 70 return nvkm_voltgpio_init(volt); in gf100_volt_new()
|
H A D | gpio.c | 24 #include <subdev/volt.h> 36 nvkm_voltgpio_get(struct nvkm_volt *volt) in nvkm_voltgpio_get() argument 38 struct nvkm_gpio *gpio = volt->subdev.device->gpio; in nvkm_voltgpio_get() 43 if (volt->vid_mask & (1 << i)) { in nvkm_voltgpio_get() 55 nvkm_voltgpio_set(struct nvkm_volt *volt, u8 vid) in nvkm_voltgpio_set() argument 57 struct nvkm_gpio *gpio = volt->subdev.device->gpio; in nvkm_voltgpio_set() 61 if (volt->vid_mask & (1 << i)) { in nvkm_voltgpio_set() 72 nvkm_voltgpio_init(struct nvkm_volt *volt) in nvkm_voltgpio_init() argument 74 struct nvkm_subdev *subdev = &volt->subdev; in nvkm_voltgpio_init() 86 if (volt in nvkm_voltgpio_init() [all...] |
H A D | gk104.c | 26 #include <subdev/volt.h> 29 #include <subdev/bios/volt.h> 69 gk104_volt_speedo_read(struct nvkm_volt *volt) in gk104_volt_speedo_read() argument 71 struct nvkm_device *device = volt->subdev.device; in gk104_volt_speedo_read() 104 struct gk104_volt *volt; in gk104_volt_new() local 116 if (!(volt = kzalloc(sizeof(*volt), GFP_KERNEL))) in gk104_volt_new() 118 nvkm_volt_ctor(volt_func, device, type, inst, &volt->base); in gk104_volt_new() 119 *pvolt = &volt->base; in gk104_volt_new() 120 volt in gk104_volt_new() [all...] |
H A D | gm20b.c | 71 struct gk20a_volt *volt; in gm20b_volt_new() local 80 volt = kzalloc(sizeof(*volt), GFP_KERNEL); in gm20b_volt_new() 81 if (!volt) in gm20b_volt_new() 83 *pvolt = &volt->base; in gm20b_volt_new() 89 ARRAY_SIZE(gm20b_na_cvb_coef), vmin, volt); in gm20b_volt_new() 92 ARRAY_SIZE(gm20b_cvb_coef), vmin, volt); in gm20b_volt_new()
|
H A D | gf117.c | 29 gf117_volt_speedo_read(struct nvkm_volt *volt) in gf117_volt_speedo_read() argument 31 struct nvkm_device *device = volt->subdev.device; in gf117_volt_speedo_read() 52 struct nvkm_volt *volt; in gf117_volt_new() local 55 ret = nvkm_volt_new_(&gf117_volt, device, type, inst, &volt); in gf117_volt_new() 56 *pvolt = volt; in gf117_volt_new() 60 return nvkm_voltgpio_init(volt); in gf117_volt_new()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | volt.c | 26 #include <subdev/bios/volt.h> 32 u32 volt = 0; in nvbios_volt_table() local 36 volt = nvbios_rd32(bios, bit_P.offset + 0x0c); in nvbios_volt_table() 39 volt = nvbios_rd32(bios, bit_P.offset + 0x10); in nvbios_volt_table() 41 if (volt) { in nvbios_volt_table() 42 *ver = nvbios_rd08(bios, volt + 0); in nvbios_volt_table() 46 *cnt = nvbios_rd08(bios, volt + 2); in nvbios_volt_table() 47 *len = nvbios_rd08(bios, volt + 1); in nvbios_volt_table() 48 return volt; in nvbios_volt_table() 50 *hdr = nvbios_rd08(bios, volt in nvbios_volt_table() 72 u32 volt = nvbios_volt_table(bios, ver, hdr, cnt, len); nvbios_volt_parse() local 128 u32 volt = nvbios_volt_table(bios, ver, &hdr, &cnt, len); nvbios_volt_entry() local 140 u32 volt = nvbios_volt_entry(bios, idx, ver, len); nvbios_volt_entry_parse() local [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
H A D | volt.c | 26 #include <subdev/bios/volt.h> 32 u32 volt = 0; in nvbios_volt_table() local 36 volt = nvbios_rd32(bios, bit_P.offset + 0x0c); in nvbios_volt_table() 39 volt = nvbios_rd32(bios, bit_P.offset + 0x10); in nvbios_volt_table() 41 if (volt) { in nvbios_volt_table() 42 *ver = nvbios_rd08(bios, volt + 0); in nvbios_volt_table() 46 *cnt = nvbios_rd08(bios, volt + 2); in nvbios_volt_table() 47 *len = nvbios_rd08(bios, volt + 1); in nvbios_volt_table() 48 return volt; in nvbios_volt_table() 50 *hdr = nvbios_rd08(bios, volt in nvbios_volt_table() 72 u32 volt = nvbios_volt_table(bios, ver, hdr, cnt, len); nvbios_volt_parse() local 128 u32 volt = nvbios_volt_table(bios, ver, &hdr, &cnt, len); nvbios_volt_entry() local 140 u32 volt = nvbios_volt_entry(bios, idx, ver, len); nvbios_volt_entry_parse() local [all...] |
/kernel/linux/linux-5.10/arch/arm/mach-s3c/ |
H A D | mach-rx1950.c | 165 { .volt = 4100, .cur = 156, .level = 100}, 166 { .volt = 4050, .cur = 156, .level = 95}, 167 { .volt = 4025, .cur = 141, .level = 90}, 168 { .volt = 3995, .cur = 144, .level = 85}, 169 { .volt = 3957, .cur = 162, .level = 80}, 170 { .volt = 3931, .cur = 147, .level = 75}, 171 { .volt = 3902, .cur = 147, .level = 70}, 172 { .volt = 3863, .cur = 153, .level = 65}, 173 { .volt = 3838, .cur = 150, .level = 60}, 174 { .volt [all...] |
H A D | mach-h1940.c | 270 { .volt = 4070, .cur = 162, .level = 100}, 271 { .volt = 4040, .cur = 165, .level = 95}, 272 { .volt = 4016, .cur = 164, .level = 90}, 273 { .volt = 3996, .cur = 166, .level = 85}, 274 { .volt = 3971, .cur = 168, .level = 80}, 275 { .volt = 3951, .cur = 168, .level = 75}, 276 { .volt = 3931, .cur = 170, .level = 70}, 277 { .volt = 3903, .cur = 172, .level = 65}, 278 { .volt = 3886, .cur = 172, .level = 60}, 279 { .volt [all...] |
/kernel/linux/linux-5.10/drivers/regulator/ |
H A D | da9055-regulator.c | 71 struct da9055_volt_reg volt; member 136 ret = da9055_reg_read(regulator->da9055, info->volt.reg_b); in da9055_ldo_get_mode() 140 if (ret >> info->volt.sl_shift) in da9055_ldo_get_mode() 150 struct da9055_volt_reg volt = info->volt; in da9055_ldo_set_mode() local 163 return da9055_reg_update(regulator->da9055, volt.reg_b, in da9055_ldo_set_mode() 164 1 << volt.sl_shift, in da9055_ldo_set_mode() 165 val << volt.sl_shift); in da9055_ldo_set_mode() 172 struct da9055_volt_reg volt = info->volt; in da9055_regulator_get_voltage_sel() local [all...] |
/kernel/linux/linux-6.6/drivers/regulator/ |
H A D | da9055-regulator.c | 71 struct da9055_volt_reg volt; member 136 ret = da9055_reg_read(regulator->da9055, info->volt.reg_b); in da9055_ldo_get_mode() 140 if (ret >> info->volt.sl_shift) in da9055_ldo_get_mode() 150 struct da9055_volt_reg volt = info->volt; in da9055_ldo_set_mode() local 163 return da9055_reg_update(regulator->da9055, volt.reg_b, in da9055_ldo_set_mode() 164 1 << volt.sl_shift, in da9055_ldo_set_mode() 165 val << volt.sl_shift); in da9055_ldo_set_mode() 172 struct da9055_volt_reg volt = info->volt; in da9055_regulator_get_voltage_sel() local [all...] |
/kernel/linux/linux-5.10/drivers/cpufreq/ |
H A D | omap-cpufreq.c | 46 unsigned long freq, volt = 0, volt_old = 0, tol = 0; in omap_target() local 69 volt = dev_pm_opp_get_voltage(opp); in omap_target() 71 tol = volt * OPP_TOLERANCE / 100; in omap_target() 77 new_freq / 1000, volt ? volt / 1000 : -1); in omap_target() 81 r = regulator_set_voltage(mpu_reg, volt - tol, volt + tol); in omap_target() 93 r = regulator_set_voltage(mpu_reg, volt - tol, volt + tol); in omap_target()
|
/kernel/linux/linux-6.6/drivers/cpufreq/ |
H A D | omap-cpufreq.c | 46 unsigned long freq, volt = 0, volt_old = 0, tol = 0; in omap_target() local 69 volt = dev_pm_opp_get_voltage(opp); in omap_target() 71 tol = volt * OPP_TOLERANCE / 100; in omap_target() 77 new_freq / 1000, volt ? volt / 1000 : -1); in omap_target() 81 r = regulator_set_voltage(mpu_reg, volt - tol, volt + tol); in omap_target() 93 r = regulator_set_voltage(mpu_reg, volt - tol, volt + tol); in omap_target()
|
/kernel/linux/linux-5.10/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
H A D | base.c | 33 #include <subdev/volt.h> 83 struct nvkm_volt *volt = clk->subdev.device->volt; in nvkm_cstate_valid() local 102 if (!volt) in nvkm_cstate_valid() 105 voltage = nvkm_volt_map(volt, cstate->voltage, temp); in nvkm_cstate_valid() 108 return voltage <= min(max_volt, volt->max_uv); in nvkm_cstate_valid() 116 struct nvkm_volt *volt = device->volt; in nvkm_cstate_find_best() local 122 if (!volt) in nvkm_cstate_find_best() 125 max_volt = volt in nvkm_cstate_find_best() 165 struct nvkm_volt *volt = device->volt; nvkm_cstate_prog() local 228 struct nvkm_volt *volt = clk->subdev.device->volt; nvkm_cstate_new() local [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
H A D | base.c | 33 #include <subdev/volt.h> 83 struct nvkm_volt *volt = clk->subdev.device->volt; in nvkm_cstate_valid() local 102 if (!volt) in nvkm_cstate_valid() 105 voltage = nvkm_volt_map(volt, cstate->voltage, temp); in nvkm_cstate_valid() 108 return voltage <= min(max_volt, volt->max_uv); in nvkm_cstate_valid() 116 struct nvkm_volt *volt = device->volt; in nvkm_cstate_find_best() local 122 if (!volt) in nvkm_cstate_find_best() 125 max_volt = volt in nvkm_cstate_find_best() 165 struct nvkm_volt *volt = device->volt; nvkm_cstate_prog() local 228 struct nvkm_volt *volt = clk->subdev.device->volt; nvkm_cstate_new() local [all...] |