/drivers/gpu/drm/nouveau/nvkm/subdev/volt/ |
D | base.c | 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->vid[i].uv; in nvkm_volt_get() 51 nvkm_volt_set(struct nvkm_volt *volt, u32 uv) in nvkm_volt_set() argument 53 struct nvkm_subdev *subdev = &volt->subdev; in nvkm_volt_set() 54 int i, ret = -EINVAL, best_err = volt->max_uv, best = -1; in nvkm_volt_set() [all …]
|
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 = gk20a_volt(base); in gk20a_volt_set_id() local 121 struct nvkm_subdev *subdev = &volt->base.subdev; in gk20a_volt_set_id() [all …]
|
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()
|
D | gpio.c | 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->vid_mask & (1 << i)) { in nvkm_voltgpio_init() 92 volt->vid_mask &= ~(1 << i); in nvkm_voltgpio_init()
|
D | gk104.c | 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->bios = bios; in gk104_volt_new() 126 nvkm_error(&volt->base.subdev, in gk104_volt_new() 132 nvkm_voltgpio_init(&volt->base); in gk104_volt_new() 137 nvkm_debug(&volt->base.subdev, "Using %s mode\n", mode); in gk104_volt_new()
|
D | Kbuild | 2 nvkm-y += nvkm/subdev/volt/base.o 3 nvkm-y += nvkm/subdev/volt/gpio.o 4 nvkm-y += nvkm/subdev/volt/nv40.o 5 nvkm-y += nvkm/subdev/volt/gf100.o 6 nvkm-y += nvkm/subdev/volt/gf117.o 7 nvkm-y += nvkm/subdev/volt/gk104.o 8 nvkm-y += nvkm/subdev/volt/gk20a.o 9 nvkm-y += nvkm/subdev/volt/gm20b.o
|
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()
|
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()
|
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()
|
D | priv.h | 26 int nvkm_voltpwm_init(struct nvkm_volt *volt); 27 int nvkm_voltpwm_get(struct nvkm_volt *volt); 28 int nvkm_voltpwm_set(struct nvkm_volt *volt, u32 uv);
|
/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
D | volt.c | 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 + 1); in nvbios_volt_table() 51 *cnt = nvbios_rd08(bios, volt + 2); in nvbios_volt_table() [all …]
|
/drivers/regulator/ |
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 188 ret = da9055_reg_read(regulator->da9055, volt.reg_a); in da9055_regulator_get_voltage_sel() 190 ret = da9055_reg_read(regulator->da9055, volt.reg_b); in da9055_regulator_get_voltage_sel() [all …]
|
/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
D | base.c | 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->max_uv; in nvkm_cstate_find_best() 126 if (volt->max0_id != 0xff) in nvkm_cstate_find_best() 128 nvkm_volt_map(volt, volt->max0_id, clk->temp)); in nvkm_cstate_find_best() 129 if (volt->max1_id != 0xff) in nvkm_cstate_find_best() [all …]
|
D | gm20b.c | 468 struct nvkm_volt *volt = base->subdev.device->volt; in gm20b_clk_calc() local 476 clk->new_uv = volt->vid[cstate->voltage].uv; in gm20b_clk_calc() 853 struct nvkm_volt *volt = device->volt; in gm20b_clk_init() local 856 _clk->uv = nvkm_volt_get(volt); in gm20b_clk_init() 982 struct nvkm_volt *volt = subdev->device->volt; in gm20b_clk_init_safe_fmax() local 990 vmin = volt->vid[0].uv; in gm20b_clk_init_safe_fmax() 991 for (i = 1; i < volt->vid_nr; i++) { in gm20b_clk_init_safe_fmax() 992 if (volt->vid[i].uv <= vmin) { in gm20b_clk_init_safe_fmax() 993 vmin = volt->vid[i].uv; in gm20b_clk_init_safe_fmax() 994 id = volt->vid[i].vid; in gm20b_clk_init_safe_fmax()
|
/drivers/cpufreq/ |
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()
|
D | imx6q-cpufreq.c | 62 unsigned long freq_hz, volt, volt_old; in imx6q_set_target() local 77 volt = dev_pm_opp_get_voltage(opp); in imx6q_set_target() 84 new_freq / 1000, volt / 1000); in imx6q_set_target() 100 ret = regulator_set_voltage_tol(arm_reg, volt, 0); in imx6q_set_target() 174 ret = regulator_set_voltage_tol(arm_reg, volt, 0); in imx6q_set_target() 435 unsigned long volt = be32_to_cpup(val++); in imx6q_cpufreq_probe() local 437 imx6_soc_volt[soc_opp_count++] = volt; in imx6q_cpufreq_probe()
|
/drivers/mmc/core/ |
D | regulator.c | 170 int ret, volt, min_uV, max_uV; in mmc_regulator_set_vqmmc() local 184 ret = mmc_ocrbitnum_to_vdd(mmc->ios.vdd, &volt, &max_uV); in mmc_regulator_set_vqmmc() 189 __func__, volt, max_uV); in mmc_regulator_set_vqmmc() 191 min_uV = max(volt - 300000, 2700000); in mmc_regulator_set_vqmmc() 202 min_uV, volt, max_uV)) in mmc_regulator_set_vqmmc() 206 2700000, volt, 3600000); in mmc_regulator_set_vqmmc()
|
/drivers/gpu/drm/nouveau/nvkm/engine/device/ |
D | base.c | 488 .volt = nv40_volt_new, 514 .volt = nv40_volt_new, 540 .volt = nv40_volt_new, 566 .volt = nv40_volt_new, 592 .volt = nv40_volt_new, 618 .volt = nv40_volt_new, 644 .volt = nv40_volt_new, 670 .volt = nv40_volt_new, 696 .volt = nv40_volt_new, 722 .volt = nv40_volt_new, [all …]
|
/drivers/gpu/drm/nouveau/ |
D | nouveau_hwmon.c | 369 struct nvkm_volt *volt = nvxx_volt(&drm->client.device); in nouveau_input_is_visible() local 371 if (!volt || nvkm_volt_get(volt) < 0) in nouveau_input_is_visible() 493 struct nvkm_volt *volt = nvxx_volt(&drm->client.device); in nouveau_in_read() local 496 if (!volt) in nouveau_in_read() 503 ret = nvkm_volt_get(volt); in nouveau_in_read() 507 *val = volt->min_uv > 0 ? (volt->min_uv / 1000) : -ENODEV; in nouveau_in_read() 510 *val = volt->max_uv > 0 ? (volt->max_uv / 1000) : -ENODEV; in nouveau_in_read() 720 struct nvkm_volt *volt = nvxx_volt(&drm->client.device); in nouveau_hwmon_init() local 727 if (!iccsense && !therm && !volt) { in nouveau_hwmon_init()
|
/drivers/hwmon/ |
D | nct7904.c | 269 int ret, volt, index; in nct7904_read_in() local 279 volt = ((ret & 0xff00) >> 5) | (ret & 0x7); in nct7904_read_in() 281 volt *= 2; /* 0.002V scale */ in nct7904_read_in() 283 volt *= 6; /* 0.006V scale */ in nct7904_read_in() 284 *val = volt; in nct7904_read_in() 291 volt = ((ret & 0xff00) >> 5) | (ret & 0x7); in nct7904_read_in() 293 volt *= 2; /* 0.002V scale */ in nct7904_read_in() 295 volt *= 6; /* 0.006V scale */ in nct7904_read_in() 296 *val = volt; in nct7904_read_in() 303 volt = ((ret & 0xff00) >> 5) | (ret & 0x7); in nct7904_read_in() [all …]
|
/drivers/power/supply/ |
D | twl4030_madc_battery.c | 76 int volt) in twl4030_madc_bat_voltscale() argument 87 if (volt > calibration[0].voltage) { in twl4030_madc_bat_voltscale() 91 if (volt <= calibration[i].voltage && in twl4030_madc_bat_voltscale() 92 volt >= calibration[i+1].voltage) { in twl4030_madc_bat_voltscale() 95 ((calibration[i].voltage - volt) * in twl4030_madc_bat_voltscale()
|
/drivers/devfreq/ |
D | rk3399_dmc.c | 69 unsigned long volt, target_volt; member 129 regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt, in rk3399_dmcfreq_target() 130 dmcfreq->volt); in rk3399_dmcfreq_target() 146 regulator_set_voltage(dmcfreq->vdd_center, dmcfreq->volt, in rk3399_dmcfreq_target() 147 dmcfreq->volt); in rk3399_dmcfreq_target() 156 dmcfreq->volt = target_volt; in rk3399_dmcfreq_target() 445 data->volt = dev_pm_opp_get_voltage(opp); in rk3399_dmcfreq_probe()
|
/drivers/input/keyboard/ |
D | tm2-touchkey.c | 83 u32 volt; in tm2_touchkey_led_brightness_set() local 87 volt = TM2_TOUCHKEY_LED_VOLTAGE_MIN; in tm2_touchkey_led_brightness_set() 90 volt = TM2_TOUCHKEY_LED_VOLTAGE_MAX; in tm2_touchkey_led_brightness_set() 95 regulator_set_voltage(touchkey->vdd, volt, volt); in tm2_touchkey_led_brightness_set()
|
/drivers/input/misc/ |
D | twl6040-vibra.c | 148 int volt; in twl6040_vibra_set_effect() local 151 volt = regulator_get_voltage(info->supplies[0].consumer) / 1000; in twl6040_vibra_set_effect() 152 vibdatl = twl6040_vibra_code(volt, info->vibldrv_res, in twl6040_vibra_set_effect() 157 volt = regulator_get_voltage(info->supplies[1].consumer) / 1000; in twl6040_vibra_set_effect() 158 vibdatr = twl6040_vibra_code(volt, info->vibrdrv_res, in twl6040_vibra_set_effect()
|
/drivers/gpu/drm/nouveau/include/nvkm/subdev/ |
D | volt.h | 33 int nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temperature); 34 int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id);
|