Home
last modified time | relevance | path

Searched full:volt (Results 1 – 25 of 136) sorted by relevance

123456

/linux/drivers/gpu/drm/nouveau/nvkm/subdev/volt/
H A Dbase.c28 #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->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()
[all …]
H A Dgk20a.c95 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 …]
H A DKbuild2 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
H A Dgk104.c26 #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_obj(*volt))) 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->bios = bios; in gk104_volt_new()
127 nvkm_error(&volt->base.subdev, in gk104_volt_new()
[all …]
H A Dgpio.c24 #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->vid_mask & (1 << i)) { in nvkm_voltgpio_init()
[all …]
H A Dgf100.c29 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 Dgf117.c29 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()
H A Dgm20b.c71 struct gk20a_volt *volt; in gm20b_volt_new() local
80 volt = kzalloc_obj(*volt); 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 Dpriv.h5 #include <subdev/volt.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);
H A Dnv40.c36 struct nvkm_volt *volt; in nv40_volt_new() local
39 ret = nvkm_volt_new_(&nv40_volt, device, type, inst, &volt); in nv40_volt_new()
40 *pvolt = volt; in nv40_volt_new()
44 return nvkm_voltgpio_init(volt); in nv40_volt_new()
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
H A Dvolt.c26 #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 + 1); in nvbios_volt_table()
[all …]
/linux/drivers/regulator/
H A Dda9055-regulator.c70 struct da9055_volt_reg volt; member
135 ret = da9055_reg_read(regulator->da9055, info->volt.reg_b); in da9055_ldo_get_mode()
139 if (ret >> info->volt.sl_shift) in da9055_ldo_get_mode()
149 struct da9055_volt_reg volt = info->volt; in da9055_ldo_set_mode() local
162 return da9055_reg_update(regulator->da9055, volt.reg_b, in da9055_ldo_set_mode()
163 1 << volt.sl_shift, in da9055_ldo_set_mode()
164 val << volt.sl_shift); in da9055_ldo_set_mode()
171 struct da9055_volt_reg volt = info->volt; in da9055_regulator_get_voltage_sel() local
187 ret = da9055_reg_read(regulator->da9055, volt.reg_a); in da9055_regulator_get_voltage_sel()
189 ret = da9055_reg_read(regulator->da9055, volt.reg_b); in da9055_regulator_get_voltage_sel()
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
H A Dbase.c33 #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->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()
[all …]
H A Dgm20b.c24 #include <subdev/volt.h>
469 struct nvkm_volt *volt = base->subdev.device->volt; in gm20b_clk_calc() local
477 clk->new_uv = volt->vid[cstate->voltage].uv; in gm20b_clk_calc()
590 * - Voltage already increased to new level by volt, but maximum in gm20b_clk_prog()
596 * - Voltage is also old, it will be lowered by volt afterwards in gm20b_clk_prog()
854 struct nvkm_volt *volt = device->volt; in gm20b_clk_init() local
857 _clk->uv = nvkm_volt_get(volt); in gm20b_clk_init()
984 struct nvkm_volt *volt = subdev->device->volt; in gm20b_clk_init_safe_fmax() local
992 vmin = volt->vid[0].uv; in gm20b_clk_init_safe_fmax()
993 for (i = 1; i < volt->vid_nr; i++) { in gm20b_clk_init_safe_fmax()
[all …]
/linux/drivers/gpu/drm/nouveau/
H A Dnouveau_hwmon.c36 #include <nvkm/subdev/volt.h>
318 struct nvkm_volt *volt = nvxx_volt(drm); in nouveau_input_is_visible() local
320 if (!volt || nvkm_volt_get(volt) < 0) in nouveau_input_is_visible()
442 struct nvkm_volt *volt = nvxx_volt(drm); in nouveau_in_read() local
445 if (!volt) in nouveau_in_read()
452 ret = nvkm_volt_get(volt); in nouveau_in_read()
456 *val = volt->min_uv > 0 ? (volt->min_uv / 1000) : -ENODEV; in nouveau_in_read()
459 *val = volt->max_uv > 0 ? (volt->max_uv / 1000) : -ENODEV; in nouveau_in_read()
669 struct nvkm_volt *volt = nvxx_volt(drm); in nouveau_hwmon_init() local
676 if (!iccsense && !therm && !volt) { in nouveau_hwmon_init()
/linux/drivers/soc/samsung/
H A Dexynos-asv.c46 unsigned int new_volt, volt; in exynos_asv_update_cpu_opps() local
59 volt = dev_pm_opp_get_voltage(opp); in exynos_asv_update_cpu_opps()
60 new_volt = asv->opp_get_voltage(subsys, i, volt); in exynos_asv_update_cpu_opps()
63 if (new_volt == volt) in exynos_asv_update_cpu_opps()
75 opp_freq, volt, new_volt, cpu->id); in exynos_asv_update_cpu_opps()
/linux/drivers/hwmon/
H A Dmacsmc-hwmon.c85 struct macsmc_hwmon_sensors volt; member
102 *str = hwmon->volt.sensors[channel].label; in macsmc_hwmon_read_label()
356 &hwmon->volt.sensors[channel], 1000, val); in macsmc_hwmon_read()
411 sensor = &hwmon->volt.sensors[channel]; in macsmc_hwmon_is_visible()
662 hwmon->volt.sensors = devm_kcalloc(hwmon->dev, n_voltage, in macsmc_hwmon_populate_sensors()
664 if (!hwmon->volt.sensors) in macsmc_hwmon_populate_sensors()
668 sensor = &hwmon->volt.sensors[hwmon->volt.count]; in macsmc_hwmon_populate_sensors()
675 hwmon->volt.count++; in macsmc_hwmon_populate_sensors()
759 if (hwmon->volt.count) { in macsmc_hwmon_create_infos()
760 channel_info = &hwmon->volt.channel_info; in macsmc_hwmon_create_infos()
[all …]
/linux/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/
H A Dgk20a.c27 #include <subdev/volt.h>
124 struct nvkm_volt *volt = device->volt; in gk20a_pmu_dvfs_work() local
129 * The PMU is initialized before CLK and VOLT, so we have to make sure the in gk20a_pmu_dvfs_work()
130 * CLK and VOLT are ready here. in gk20a_pmu_dvfs_work()
132 if (!clk || !volt) in gk20a_pmu_dvfs_work()
/linux/Documentation/devicetree/bindings/regulator/
H A Dvexpress.txt5 - "compatible" value: "arm,vexpress-volt"
25 volt@0 {
26 compatible = "arm,vexpress-volt";
/linux/Documentation/hwmon/
H A Dgl518sm.rst62 measures voltages between 0.000 and 5.865 volt, with a resolution of 0.023
63 volt. The other inputs measure voltages between 0.000 and 4.845 volt, with
64 a resolution of 0.019 volt. Note that revision 0x00 chips do not support
/linux/drivers/input/misc/
H A Dtwl6040-vibra.c148 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()
302 dev_err(info->dev, "failed to set VDDVIBL volt %d\n", in twl6040_vibra_probe()
312 dev_err(info->dev, "failed to set VDDVIBR volt %d\n", in twl6040_vibra_probe()
/linux/arch/arm/mach-omap2/
H A Dsmartreflex-class3.c17 unsigned long volt = voltdm_get_voltage(sr->voltdm); in sr_class3_enable() local
19 if (!volt) { in sr_class3_enable()
26 return sr_enable(sr, volt); in sr_class3_enable()
/linux/drivers/power/supply/
H A Dtwl4030_madc_battery.c76 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()
/linux/arch/arm/boot/dts/arm/
H A Dvexpress-v2p-ca9.dts219 compatible = "arm,vexpress-volt";
228 compatible = "arm,vexpress-volt";
237 compatible = "arm,vexpress-volt";
246 compatible = "arm,vexpress-volt";
255 compatible = "arm,vexpress-volt";
265 compatible = "arm,vexpress-volt";
/linux/drivers/pcmcia/
H A Dyenta_socket.h48 #define CB_F5VCARD 0x00000400 /* Force 5.0 volt card */
49 #define CB_F3VCARD 0x00000800 /* Force 3.3 volt card */
50 #define CB_FXVCARD 0x00001000 /* Force X.X volt card */
51 #define CB_FYVCARD 0x00002000 /* Force Y.Y volt card */

123456