| /drivers/iio/adc/ |
| A D | qcom-vadc-common.c | 435 voltage = div64_s64(voltage, 1000); in qcom_vadc_scale_therm() 461 voltage = 0; in qcom_vadc_scale_die_temp() 479 voltage = div64_s64(voltage, prescale->numerator); in qcom_vadc_scale_chg_temp() 480 voltage = ((PMI_CHG_SCALE_1) * (voltage * 2)); in qcom_vadc_scale_chg_temp() 481 voltage = (voltage + PMI_CHG_SCALE_2); in qcom_vadc_scale_chg_temp() 521 voltage = div64_s64(voltage, data->full_scale_code_volt); in qcom_vadc_scale_code_voltage_factor() 525 voltage = div64_s64(voltage, temp); in qcom_vadc_scale_code_voltage_factor() 527 voltage = 0; in qcom_vadc_scale_code_voltage_factor() 575 int voltage; in qcom_vadc_scale_hw_calib_therm() local 604 int voltage; in qcom_vadc7_scale_hw_calib_die_temp() local [all …]
|
| /drivers/regulator/ |
| A D | Kconfig | 16 to both voltage regulators (where voltage output is controllable) and 422 input voltage supply of 2.5V to 5.5V. The output voltage is 538 voltage regulators. It supports software based voltage control 556 voltage control for different voltage domains 1211 bypass switch. If the input voltage is low than the required voltage, 1293 input voltage to output voltage that can be equal to, higher or lower 1294 than input voltage. It operates with wide input voltage range from 1588 voltage regulators. It supports software based voltage control 1597 voltage regulators. It supports software based voltage control 1613 voltage domains. [all …]
|
| A D | twl6030-regulator.c | 316 int voltage = 0; in twl6030smps_list_voltage() local 320 voltage = 100000; in twl6030smps_list_voltage() 325 voltage = 0; in twl6030smps_list_voltage() 328 voltage = 1350 * 1000; in twl6030smps_list_voltage() 331 voltage = 1500 * 1000; in twl6030smps_list_voltage() 334 voltage = 1800 * 1000; in twl6030smps_list_voltage() 337 voltage = 1900 * 1000; in twl6030smps_list_voltage() 340 voltage = 2100 * 1000; in twl6030smps_list_voltage() 349 voltage = 0; in twl6030smps_list_voltage() 373 voltage = 0; in twl6030smps_list_voltage() [all …]
|
| A D | pwm-regulator.c | 156 unsigned int voltage; in pwm_regulator_get_voltage() local 167 voltage = pwm_get_relative_duty_cycle(&pstate, duty_unit); in pwm_regulator_get_voltage() 168 if (voltage < min(max_uV_duty, min_uV_duty) || in pwm_regulator_get_voltage() 169 voltage > max(max_uV_duty, min_uV_duty)) in pwm_regulator_get_voltage() 178 voltage = min_uV_duty - voltage; in pwm_regulator_get_voltage() 181 voltage = voltage - min_uV_duty; in pwm_regulator_get_voltage() 185 voltage = DIV_ROUND_CLOSEST_ULL((u64)voltage * diff_uV, diff_duty); in pwm_regulator_get_voltage() 187 return voltage + min_uV; in pwm_regulator_get_voltage()
|
| /drivers/hwmon/ |
| A 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() 318 long voltage; in ltc4245_read_power() local [all …]
|
| A 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 sysfs_emit(buf, "%d\n", voltage); in ltc4215_voltage_show()
|
| A 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);
|
| A D | adt7475.c | 213 u16 voltage[3][7]; member 371 data->voltage[sattr->nr][sattr->index] = in voltage_store() 1397 data->voltage[MIN][i] = ret << 2; in adt7475_update_limits() 1402 data->voltage[MAX][i] = ret << 2; in adt7475_update_limits() 1409 data->voltage[MIN][5] = ret << 2; in adt7475_update_limits() 1414 data->voltage[MAX][5] = ret << 2; in adt7475_update_limits() 1421 data->voltage[MIN][6] = ret << 2; in adt7475_update_limits() 1426 data->voltage[MAX][6] = ret << 2; in adt7475_update_limits() 2108 data->voltage[INPUT][i] = in adt7475_update_measure() 2136 data->voltage[INPUT][5] = ret << 2 | in adt7475_update_measure() [all …]
|
| /drivers/leds/ |
| A D | leds-regulator.c | 33 int voltage = regulator_list_voltage(supply, 0); in led_regulator_get_max_brightness() local 35 if (voltage <= 0) in led_regulator_get_max_brightness() 42 ret = regulator_set_voltage(supply, voltage, voltage); in led_regulator_get_max_brightness() 95 int voltage; in regulator_led_brightness_set() local 106 voltage = led_regulator_get_voltage(led->vcc, value); in regulator_led_brightness_set() 108 value, voltage); in regulator_led_brightness_set() 110 ret = regulator_set_voltage(led->vcc, voltage, voltage); in regulator_led_brightness_set() 113 voltage, ret); in regulator_led_brightness_set()
|
| /drivers/devfreq/ |
| A D | mtk-cci-devfreq.c | 78 voltage = new_voltage; in mtk_ccifreq_set_voltage() 80 voltage = vsram - soc_data->min_volt_shift; in mtk_ccifreq_set_voltage() 82 ret = regulator_set_voltage(drv->proc_reg, voltage, in mtk_ccifreq_set_voltage() 90 voltage = max(new_voltage, in mtk_ccifreq_set_voltage() 97 if (voltage == new_voltage) in mtk_ccifreq_set_voltage() 101 voltage + soc_data->min_volt_shift); in mtk_ccifreq_set_voltage() 112 pre_voltage = voltage; in mtk_ccifreq_set_voltage() 153 voltage = dev_pm_opp_get_voltage(opp); in mtk_ccifreq_target() 164 target_voltage = max(inter_voltage, voltage); in mtk_ccifreq_target() 200 if (voltage < inter_voltage || voltage < pre_voltage) { in mtk_ccifreq_target() [all …]
|
| /drivers/media/pci/ddbridge/ |
| A D | ddbridge-max.c | 144 enum fe_sec_voltage voltage) in lnb_set_voltage() argument 150 switch (voltage) { in lnb_set_voltage() 152 if (dev->link[link].lnb.voltage[input]) in lnb_set_voltage() 166 dev->link[link].lnb.oldvoltage[input] = voltage; in lnb_set_voltage() 216 if (dvb->voltage == SEC_VOLTAGE_18) in max_set_tone() 221 if (dvb->voltage == SEC_VOLTAGE_18) in max_set_tone() 243 dvb->voltage = voltage; in max_set_voltage() 251 if (voltage == SEC_VOLTAGE_OFF) in max_set_voltage() 262 if (voltage == SEC_VOLTAGE_OFF) in max_set_voltage() 274 if (dvb->voltage == SEC_VOLTAGE_18) in max_set_voltage() [all …]
|
| /drivers/power/supply/ |
| A 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() 182 return ((struct twl4030_madc_bat_calibration *)b)->voltage - in twl4030_cmp() 183 ((struct twl4030_madc_bat_calibration *)a)->voltage; in twl4030_cmp()
|
| A D | cpcap-charger.c | 143 int voltage; member 250 switch (voltage) { in cpcap_charger_match_voltage() 276 int voltage = ddata->voltage; in cpcap_charger_get_bat_const_charge_voltage() local 285 voltage = prop.intval; in cpcap_charger_get_bat_const_charge_voltage() 290 return voltage; in cpcap_charger_get_bat_const_charge_voltage() 318 int voltage, batvolt; in cpcap_charger_set_property() local 330 if (voltage > batvolt) in cpcap_charger_set_property() 331 voltage = batvolt; in cpcap_charger_set_property() 332 ddata->voltage = voltage; in cpcap_charger_set_property() 573 switch (voltage) { in cpcap_charger_voltage_to_regval() [all …]
|
| A D | cpcap-battery.c | 116 int voltage; member 577 if (empty->voltage && empty->voltage != -1) { in cpcap_battery_update_status() 578 empty->voltage = -1; in cpcap_battery_update_status() 582 empty->voltage = -1; in cpcap_battery_update_status() 591 if (full->voltage) { in cpcap_battery_update_status() 592 full->voltage = 0; in cpcap_battery_update_status() 720 tmp *= ((latest->voltage + previous->voltage) / 20000); in cpcap_battery_get_property() 749 if (!empty->voltage) in cpcap_battery_get_property() 755 empty->voltage = 0; in cpcap_battery_get_property() 763 empty->voltage = 0; in cpcap_battery_get_property() [all …]
|
| A D | ltc4162-l-charger.c | 446 u32 voltage; in ltc4162l_get_vcharge() local 469 voltage = 3812500 + (regval * 12500); in ltc4162l_get_vcharge() 471 val->intval = voltage; in ltc4162l_get_vcharge() 475 voltage = 3412500 + (regval * 12500); in ltc4162l_get_vcharge() 477 val->intval = voltage; in ltc4162l_get_vcharge() 481 voltage = 6000000 + (regval * 28571); in ltc4162l_get_vcharge() 483 val->intval = voltage; in ltc4162l_get_vcharge() 497 u32 voltage; in ltc4015_get_vcharge() local 518 val->intval = voltage; in ltc4015_get_vcharge() 524 val->intval = voltage; in ltc4015_get_vcharge() [all …]
|
| A 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/w1/slaves/ |
| A D | w1_ds2438.c | 223 int adc_input, uint16_t *voltage) in w1_ds2438_get_voltage() argument 271 static int w1_ds2438_get_current(struct w1_slave *sl, int16_t *voltage) in w1_ds2438_get_current() argument 318 int16_t voltage; in iad_read() local 325 if (w1_ds2438_get_current(sl, &voltage) == 0) in iad_read() 326 ret = snprintf(buf, count, "%i\n", voltage); in iad_read() 439 uint16_t voltage; in vad_read() local 446 if (w1_ds2438_get_voltage(sl, DS2438_ADC_INPUT_VAD, &voltage) == 0) in vad_read() 447 ret = snprintf(buf, count, "%u\n", voltage); in vad_read() 460 uint16_t voltage; in vdd_read() local 467 if (w1_ds2438_get_voltage(sl, DS2438_ADC_INPUT_VDD, &voltage) == 0) in vdd_read() [all …]
|
| /drivers/iio/dac/ |
| A D | ad3552r-common.c | 160 int voltage; in ad3552r_get_ref_voltage() local 163 voltage = devm_regulator_get_enable_read_voltage(dev, "vref"); in ad3552r_get_ref_voltage() 164 if (voltage < 0 && voltage != -ENODEV) in ad3552r_get_ref_voltage() 165 return dev_err_probe(dev, voltage, in ad3552r_get_ref_voltage() 168 if (voltage == -ENODEV) { in ad3552r_get_ref_voltage() 177 if (voltage > 2500000 + delta || voltage < 2500000 - delta) { in ad3552r_get_ref_voltage()
|
| /drivers/gpu/drm/nouveau/nvkm/subdev/clk/ |
| A 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 …]
|
| A 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 …]
|
| /drivers/gpu/drm/radeon/ |
| A D | rs600.c | 232 struct radeon_voltage *voltage = &ps->clock_info[0].voltage; in rs600_pm_misc() local 236 if ((voltage->type == VOLTAGE_GPIO) && (voltage->gpio.valid)) { in rs600_pm_misc() 239 if (voltage->active_high) in rs600_pm_misc() 240 tmp |= voltage->gpio.mask; in rs600_pm_misc() 244 if (voltage->delay) in rs600_pm_misc() 245 udelay(voltage->delay); in rs600_pm_misc() 248 if (voltage->active_high) in rs600_pm_misc() 251 tmp |= voltage->gpio.mask; in rs600_pm_misc() 253 if (voltage->delay) in rs600_pm_misc() 254 udelay(voltage->delay); in rs600_pm_misc() [all …]
|
| /drivers/media/usb/ttusb-dec/ |
| A 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/misc/cardreader/ |
| A 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() 245 static int rts5227_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) in rts5227_switch_output_voltage() argument 249 if (voltage == OUTPUT_3V3) { in rts5227_switch_output_voltage() 253 } else if (voltage == OUTPUT_1V8) { in rts5227_switch_output_voltage() 266 rts5227_fill_driving(pcr, voltage); in rts5227_switch_output_voltage() 397 static int rts522a_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage) in rts522a_switch_output_voltage() argument 401 if (voltage == OUTPUT_3V3) { in rts522a_switch_output_voltage() 405 } else if (voltage == OUTPUT_1V8) { in rts522a_switch_output_voltage() 418 rts5227_fill_driving(pcr, voltage); in rts522a_switch_output_voltage()
|
| /drivers/gpu/drm/amd/display/dc/clk_mgr/dcn301/ |
| A D | vg_clk_mgr.c | 496 .voltage = 0, 503 .voltage = 0, 510 .voltage = 0, 517 .voltage = 0, 544 unsigned int voltage) in find_dcfclk_for_voltage() argument 551 if (clock_table->SocVoltage[i] == voltage) in find_dcfclk_for_voltage() 592 bw_params->clk_table.entries[i].voltage = clock_table->DfPstateTable[j].voltage; in vg_clk_mgr_helper_populate_bw_params() 597 bw_params->clk_table.entries[i].voltage = clock_table->DfPstateTable[j].voltage; in vg_clk_mgr_helper_populate_bw_params() 632 { .fclk = 400, .memclk = 400, .voltage = 2800 }, 633 { .fclk = 400, .memclk = 400, .voltage = 2800 }, [all …]
|
| /drivers/thermal/ |
| A D | devfreq_cooling.c | 151 unsigned long voltage; in get_voltage() local 164 voltage = dev_pm_opp_get_voltage(opp) / 1000; /* mV */ in get_voltage() 167 if (voltage == 0) { in get_voltage() 173 return voltage; in get_voltage() 199 unsigned long voltage; in devfreq_cooling_get_requested_power() local 209 voltage = get_voltage(df, freq); in devfreq_cooling_get_requested_power() 210 if (voltage == 0) { in devfreq_cooling_get_requested_power() 215 res = dfc->power_ops->get_real_power(df, power, freq, voltage); in devfreq_cooling_get_requested_power()
|