/drivers/iio/adc/ |
D | qcom-vadc-common.c | 388 s64 voltage = 0, result = 0; in qcom_vadc_scale_volt() local 390 qcom_vadc_scale_calib(calib_graph, adc_code, absolute, &voltage); in qcom_vadc_scale_volt() 392 voltage = voltage * prescale->den; in qcom_vadc_scale_volt() 393 result = div64_s64(voltage, prescale->num); in qcom_vadc_scale_volt() 404 s64 voltage = 0; in qcom_vadc_scale_therm() local 407 qcom_vadc_scale_calib(calib_graph, adc_code, absolute, &voltage); in qcom_vadc_scale_therm() 410 voltage = div64_s64(voltage, 1000); in qcom_vadc_scale_therm() 414 voltage, result_mdec); in qcom_vadc_scale_therm() 428 s64 voltage = 0; in qcom_vadc_scale_die_temp() local 431 qcom_vadc_scale_calib(calib_graph, adc_code, absolute, &voltage); in qcom_vadc_scale_die_temp() [all …]
|
/drivers/regulator/ |
D | Kconfig | 8 This framework is designed to provide a generic interface to voltage 10 provide voltage and current control to client or consumer drivers and 16 to both voltage regulators (where voltage output is controllable) and 34 tristate "Fixed voltage regulator support" 36 This driver provides support for fixed voltage regulators, 43 This driver provides a virtual consumer for the voltage and 60 tristate "Marvell 88PG86X voltage regulators" 64 This driver supports Marvell 88PG867 and 88PG868 voltage regulators. 72 This driver supports Marvell 88PM800 voltage regulator chips. 74 the voltage is programmed via I2C interface. [all …]
|
D | twl6030-regulator.c | 317 int voltage = 0; in twl6030smps_list_voltage() local 321 voltage = 100000; in twl6030smps_list_voltage() 326 voltage = 0; in twl6030smps_list_voltage() 329 voltage = 1350 * 1000; in twl6030smps_list_voltage() 332 voltage = 1500 * 1000; in twl6030smps_list_voltage() 335 voltage = 1800 * 1000; in twl6030smps_list_voltage() 338 voltage = 1900 * 1000; in twl6030smps_list_voltage() 341 voltage = 2100 * 1000; in twl6030smps_list_voltage() 344 voltage += (600000 + (12500 * (index - 1))); in twl6030smps_list_voltage() 350 voltage = 0; in twl6030smps_list_voltage() [all …]
|
D | pwm-regulator.c | 156 unsigned int voltage; in pwm_regulator_get_voltage() local 160 voltage = pwm_get_relative_duty_cycle(&pstate, duty_unit); in pwm_regulator_get_voltage() 161 if (voltage < min(max_uV_duty, min_uV_duty) || in pwm_regulator_get_voltage() 162 voltage > max(max_uV_duty, min_uV_duty)) in pwm_regulator_get_voltage() 171 voltage = min_uV_duty - voltage; in pwm_regulator_get_voltage() 174 voltage = voltage - min_uV_duty; in pwm_regulator_get_voltage() 178 voltage = DIV_ROUND_CLOSEST_ULL((u64)voltage * diff_uV, diff_duty); in pwm_regulator_get_voltage() 180 return voltage + min_uV; in pwm_regulator_get_voltage()
|
D | helpers.c | 364 int ret, voltage; in regulator_map_voltage_linear() local 389 voltage = rdev->desc->ops->list_voltage(rdev, ret); in regulator_map_voltage_linear() 390 if (voltage < min_uV || voltage > max_uV) in regulator_map_voltage_linear() 414 int voltage, i; in regulator_map_voltage_linear_range() local 434 voltage = rdev->desc->ops->list_voltage(rdev, sel); in regulator_map_voltage_linear_range() 435 if (voltage >= min_uV && voltage <= max_uV) in regulator_map_voltage_linear_range() 461 int voltage, i; in regulator_map_voltage_pickable_linear_range() local 491 voltage = rdev->desc->ops->list_voltage(rdev, ret); in regulator_map_voltage_pickable_linear_range() 498 if (voltage < min_uV || voltage > max_uV) in regulator_map_voltage_pickable_linear_range()
|
/drivers/thermal/ |
D | devfreq_cooling.c | 138 unsigned long voltage; in get_voltage() local 151 voltage = dev_pm_opp_get_voltage(opp) / 1000; /* mV */ in get_voltage() 154 if (voltage == 0) { in get_voltage() 160 return voltage; in get_voltage() 177 unsigned long voltage; in get_static_power() local 182 voltage = get_voltage(df, freq); in get_static_power() 184 if (voltage == 0) in get_static_power() 187 return dfc->power_ops->get_static_power(df, voltage); in get_static_power() 204 unsigned long voltage) in get_dynamic_power() argument 212 voltage); in get_dynamic_power() [all …]
|
/drivers/hwmon/ |
D | ltc4245.c | 174 u32 voltage = 0; in ltc4245_get_voltage() local 179 voltage = regval * 55; in ltc4245_get_voltage() 183 voltage = regval * 22; in ltc4245_get_voltage() 187 voltage = regval * 15; in ltc4245_get_voltage() 191 voltage = regval * -55; in ltc4245_get_voltage() 194 voltage = regval * 10; in ltc4245_get_voltage() 202 return voltage; in ltc4245_get_voltage() 210 unsigned int voltage; in ltc4245_get_current() local 230 voltage = regval * 250; /* voltage in uV */ in ltc4245_get_current() 231 curr = voltage / 50; /* sense resistor 50 mOhm */ in ltc4245_get_current() [all …]
|
D | ltc4215.c | 80 u32 voltage = 0; in ltc4215_get_voltage() local 85 voltage = regval * 151 / 1000; in ltc4215_get_voltage() 89 voltage = regval * 605 / 10; in ltc4215_get_voltage() 96 voltage = regval * 482 * 125 / 1000; in ltc4215_get_voltage() 104 return voltage; in ltc4215_get_voltage() 128 const unsigned int voltage = data->regs[LTC4215_SENSE] * 151; in ltc4215_get_current() local 131 const unsigned int curr = voltage / 4; in ltc4215_get_current() 140 const int voltage = ltc4215_get_voltage(dev, attr->index); in ltc4215_voltage_show() local 142 return snprintf(buf, PAGE_SIZE, "%d\n", voltage); in ltc4215_voltage_show()
|
D | ads7871.c | 133 static SENSOR_DEVICE_ATTR_RO(in0_input, voltage, 0); 134 static SENSOR_DEVICE_ATTR_RO(in1_input, voltage, 1); 135 static SENSOR_DEVICE_ATTR_RO(in2_input, voltage, 2); 136 static SENSOR_DEVICE_ATTR_RO(in3_input, voltage, 3); 137 static SENSOR_DEVICE_ATTR_RO(in4_input, voltage, 4); 138 static SENSOR_DEVICE_ATTR_RO(in5_input, voltage, 5); 139 static SENSOR_DEVICE_ATTR_RO(in6_input, voltage, 6); 140 static SENSOR_DEVICE_ATTR_RO(in7_input, voltage, 7);
|
D | adt7475.c | 206 u16 voltage[3][6]; member 341 val = data->voltage[sattr->nr][sattr->index]; in voltage_show() 363 data->voltage[sattr->nr][sattr->index] = in voltage_store() 379 data->voltage[sattr->nr][sattr->index] >> 2); in voltage_store() 1082 static SENSOR_DEVICE_ATTR_2_RO(in0_input, voltage, INPUT, 0); 1083 static SENSOR_DEVICE_ATTR_2_RW(in0_max, voltage, MAX, 0); 1084 static SENSOR_DEVICE_ATTR_2_RW(in0_min, voltage, MIN, 0); 1085 static SENSOR_DEVICE_ATTR_2_RO(in0_alarm, voltage, ALARM, 0); 1086 static SENSOR_DEVICE_ATTR_2_RO(in1_input, voltage, INPUT, 1); 1087 static SENSOR_DEVICE_ATTR_2_RW(in1_max, voltage, MAX, 1); [all …]
|
D | ab8500.c | 87 int voltage, ret; in ab8500_read_sensor() local 95 ret = iio_read_channel_processed(ab8500_data->aux1, &voltage); in ab8500_read_sensor() 98 ret = ab8500_voltage_to_temp(&ab8500_data->cfg, voltage, temp); in ab8500_read_sensor() 102 ret = iio_read_channel_processed(ab8500_data->aux2, &voltage); in ab8500_read_sensor() 105 ret = ab8500_voltage_to_temp(&ab8500_data->cfg, voltage, temp); in ab8500_read_sensor()
|
/drivers/leds/ |
D | leds-regulator.c | 32 int voltage = regulator_list_voltage(supply, 0); in led_regulator_get_max_brightness() local 34 if (voltage <= 0) in led_regulator_get_max_brightness() 41 ret = regulator_set_voltage(supply, voltage, voltage); in led_regulator_get_max_brightness() 94 int voltage; in regulator_led_brightness_set() local 105 voltage = led_regulator_get_voltage(led->vcc, value); in regulator_led_brightness_set() 107 value, voltage); in regulator_led_brightness_set() 109 ret = regulator_set_voltage(led->vcc, voltage, voltage); in regulator_led_brightness_set() 112 voltage, ret); in regulator_led_brightness_set()
|
/drivers/w1/slaves/ |
D | w1_ds2438.c | 188 int adc_input, uint16_t *voltage) in w1_ds2438_get_voltage() argument 224 …*voltage = (((uint16_t) w1_buf[DS2438_VOLTAGE_MSB]) << 8) | ((uint16_t) w1_buf[DS2438_VOLTAGE_LSB]… in w1_ds2438_get_voltage() 236 static int w1_ds2438_get_current(struct w1_slave *sl, int16_t *voltage) in w1_ds2438_get_current() argument 245 *voltage = (((int16_t) w1_buf[DS2438_CURRENT_MSB]) << 8) | ((int16_t) w1_buf[DS2438_CURRENT_LSB]); in w1_ds2438_get_current() 283 int16_t voltage; in iad_read() local 290 if (w1_ds2438_get_current(sl, &voltage) == 0) { in iad_read() 291 ret = snprintf(buf, count, "%i\n", voltage); in iad_read() 355 uint16_t voltage; in vad_read() local 362 if (w1_ds2438_get_voltage(sl, DS2438_ADC_INPUT_VAD, &voltage) == 0) { in vad_read() 363 ret = snprintf(buf, count, "%u\n", voltage); in vad_read() [all …]
|
/drivers/media/pci/ddbridge/ |
D | ddbridge-max.c | 153 enum fe_sec_voltage voltage) in lnb_set_voltage() argument 157 if (dev->link[link].lnb.oldvoltage[input] == voltage) in lnb_set_voltage() 159 switch (voltage) { in lnb_set_voltage() 161 if (dev->link[link].lnb.voltage[input]) in lnb_set_voltage() 175 dev->link[link].lnb.oldvoltage[input] = voltage; in lnb_set_voltage() 192 dev->link[port->lnr].lnb.voltage[dvb->input & 3] & bit; in max_set_input_unlocked() 194 dev->link[port->lnr].lnb.voltage[dvb->input & 3] &= ~bit; in max_set_input_unlocked() 196 dev->link[port->lnr].lnb.voltage[dvb->input & 3] |= obit; in max_set_input_unlocked() 225 if (dvb->voltage == SEC_VOLTAGE_18) in max_set_tone() 230 if (dvb->voltage == SEC_VOLTAGE_18) in max_set_tone() [all …]
|
/drivers/power/supply/ |
D | cpcap-charger.c | 149 int voltage; member 240 val->intval = ddata->voltage; in cpcap_charger_get_property() 266 static int cpcap_charger_match_voltage(int voltage) in cpcap_charger_match_voltage() argument 268 switch (voltage) { in cpcap_charger_match_voltage() 294 int voltage = ddata->voltage; in cpcap_charger_get_bat_const_charge_voltage() local 303 voltage = prop.intval; in cpcap_charger_get_bat_const_charge_voltage() 308 return voltage; in cpcap_charger_get_bat_const_charge_voltage() 316 int voltage, batvolt; in cpcap_charger_set_property() local 320 voltage = cpcap_charger_match_voltage(val->intval); in cpcap_charger_set_property() 322 if (voltage > batvolt) in cpcap_charger_set_property() [all …]
|
D | twl4030_madc_battery.c | 87 if (volt > calibration[0].voltage) { in twl4030_madc_bat_voltscale() 90 for (i = 0; calibration[i+1].voltage >= 0; i++) { 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() 98 (calibration[i].voltage - in twl4030_madc_bat_voltscale() 99 calibration[i+1].voltage); in twl4030_madc_bat_voltscale() 188 return ((struct twl4030_madc_bat_calibration *)b)->voltage - in twl4030_cmp() 189 ((struct twl4030_madc_bat_calibration *)a)->voltage; in twl4030_cmp()
|
D | cpcap-battery.c | 117 int voltage; member 373 if (state->voltage >= in cpcap_battery_full() 398 state.voltage = cpcap_battery_get_voltage(ddata); in cpcap_battery_update_status() 501 tmp = (latest->voltage / 10000) * latest->current_ua; in cpcap_battery_get_property() 508 tmp *= (latest->voltage / 10000); in cpcap_battery_get_property() 515 tmp *= ((latest->voltage + previous->voltage) / 20000); in cpcap_battery_get_property() 521 else if (latest->voltage >= 3750000) in cpcap_battery_get_property() 523 else if (latest->voltage >= 3300000) in cpcap_battery_get_property() 525 else if (latest->voltage > 3100000) in cpcap_battery_get_property() 527 else if (latest->voltage <= 3100000) in cpcap_battery_get_property() [all …]
|
D | rx51_battery.c | 43 int voltage = rx51_battery_read_adc(di->channel_vbat); in rx51_battery_read_voltage() local 45 if (voltage < 0) { in rx51_battery_read_voltage() 46 dev_err(di->dev, "Could not read ADC: %d\n", voltage); in rx51_battery_read_voltage() 47 return voltage; in rx51_battery_read_voltage() 50 return 1000 * (10000 * voltage / 1705); in rx51_battery_read_voltage()
|
/drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
D | gk20a.c | 370 .voltage = 0, 376 .voltage = 1, 382 .voltage = 2, 388 .voltage = 3, 394 .voltage = 4, 400 .voltage = 5, 406 .voltage = 6, 412 .voltage = 7, 418 .voltage = 8, 424 .voltage = 9, [all …]
|
D | base.c | 84 int voltage; in nvkm_cstate_valid() local 105 voltage = nvkm_volt_map(volt, cstate->voltage, temp); in nvkm_cstate_valid() 106 if (voltage < 0) in nvkm_cstate_valid() 108 return voltage <= min(max_volt, volt->max_uv); in nvkm_cstate_valid() 187 ret = nvkm_volt_set_id(volt, cstate->voltage, in nvkm_cstate_prog() 188 pstate->base.voltage, clk->temp, +1); in nvkm_cstate_prog() 202 ret = nvkm_volt_set_id(volt, cstate->voltage, in nvkm_cstate_prog() 203 pstate->base.voltage, clk->temp, -1); in nvkm_cstate_prog() 239 if (volt && nvkm_volt_map_min(volt, cstepX.voltage) > volt->max_uv) in nvkm_cstate_new() 247 cstate->voltage = cstepX.voltage; in nvkm_cstate_new() [all …]
|
D | gm20b.c | 476 clk->new_uv = volt->vid[cstate->voltage].uv; in gm20b_clk_calc() 642 .voltage = 0, 648 .voltage = 1, 654 .voltage = 2, 660 .voltage = 3, 666 .voltage = 4, 672 .voltage = 5, 678 .voltage = 6, 684 .voltage = 7, 690 .voltage = 8, [all …]
|
/drivers/media/usb/ttusb-dec/ |
D | ttusbdecfe.c | 23 u8 voltage; member 130 lnb_voltage = htonl(state->voltage); in ttusbdecfe_dvbs_set_frontend() 170 enum fe_sec_voltage voltage) in ttusbdecfe_dvbs_set_voltage() argument 174 switch (voltage) { in ttusbdecfe_dvbs_set_voltage() 176 state->voltage = 13; in ttusbdecfe_dvbs_set_voltage() 179 state->voltage = 18; in ttusbdecfe_dvbs_set_voltage() 227 state->voltage = 0; in ttusbdecfe_dvbs_attach()
|
/drivers/gpu/drm/radeon/ |
D | rs600.c | 226 struct radeon_voltage *voltage = &ps->clock_info[0].voltage; in rs600_pm_misc() local 230 if ((voltage->type == VOLTAGE_GPIO) && (voltage->gpio.valid)) { in rs600_pm_misc() 232 tmp = RREG32(voltage->gpio.reg); in rs600_pm_misc() 233 if (voltage->active_high) in rs600_pm_misc() 234 tmp |= voltage->gpio.mask; in rs600_pm_misc() 236 tmp &= ~(voltage->gpio.mask); in rs600_pm_misc() 237 WREG32(voltage->gpio.reg, tmp); in rs600_pm_misc() 238 if (voltage->delay) in rs600_pm_misc() 239 udelay(voltage->delay); in rs600_pm_misc() 241 tmp = RREG32(voltage->gpio.reg); in rs600_pm_misc() [all …]
|
/drivers/misc/cardreader/ |
D | rts5227.c | 25 static void rts5227_fill_driving(struct rtsx_pcr *pcr, u8 voltage) in rts5227_fill_driving() argument 41 if (voltage == OUTPUT_3V3) { in rts5227_fill_driving() 264 static int rts5227_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) in rts5227_switch_output_voltage() argument 268 if (voltage == OUTPUT_3V3) { in rts5227_switch_output_voltage() 272 } else if (voltage == OUTPUT_1V8) { in rts5227_switch_output_voltage() 285 rts5227_fill_driving(pcr, voltage); in rts5227_switch_output_voltage() 415 static int rts522a_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) in rts522a_switch_output_voltage() argument 419 if (voltage == OUTPUT_3V3) { in rts522a_switch_output_voltage() 423 } else if (voltage == OUTPUT_1V8) { in rts522a_switch_output_voltage() 436 rts5227_fill_driving(pcr, voltage); in rts522a_switch_output_voltage()
|
/drivers/opp/ |
D | Kconfig | 7 voltage pairs that the device will support per voltage domain. This 12 representing individual voltage domains and provides SOC
|