Home
last modified time | relevance | path

Searched refs:intval (Results 1 – 25 of 74) sorted by relevance

123

/linux/drivers/power/supply/
H A Dolpc_battery.c76 val->intval = !!(status & BAT_STAT_AC); in olpc_ac_get_prop()
102 val->intval = POWER_SUPPLY_STATUS_CHARGING; in olpc_bat_get_status()
104 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in olpc_bat_get_status()
106 val->intval = POWER_SUPPLY_STATUS_FULL; in olpc_bat_get_status()
108 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in olpc_bat_get_status()
112 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in olpc_bat_get_status()
114 val->intval = POWER_SUPPLY_STATUS_FULL; in olpc_bat_get_status()
116 val->intval = POWER_SUPPLY_STATUS_CHARGING; in olpc_bat_get_status()
133 val->intval = POWER_SUPPLY_HEALTH_GOOD; in olpc_bat_get_health()
137 val->intval = POWER_SUPPLY_HEALTH_OVERHEAT; in olpc_bat_get_health()
[all …]
H A Dadp5061.c185 val->intval = adp5061_in_current_lim[mode] * 1000; in adp5061_get_input_current_limit()
235 val->intval = adp5061_vmin[regval] * 1000; in adp5061_get_min_voltage()
251 val->intval = adp5061_const_chg_vmax[mode] * 1000; in adp5061_get_chg_volt_lim()
270 val->intval = adp5061_vmax[regval] * 1000; in adp5061_get_max_voltage()
348 val->intval = adp5061_const_ichg[regval] * 1000; in adp5061_get_const_chg_current()
364 val->intval = adp5061_prechg_current[regval] * 1000; in adp5061_get_prechg_current()
397 val->intval = adp5061_vweak_th[regval] * 1000; in adp5061_get_vweak_th()
431 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in adp5061_get_chg_type()
433 val->intval = adp5061_chg_type[chg_type]; in adp5061_get_chg_type()
450 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in adp5061_get_charger_status()
[all …]
H A Dmacsmc-power.c346 val->intval = macsmc_battery_get_status(power); in macsmc_battery_get_property()
347 ret = val->intval < 0 ? val->intval : 0; in macsmc_battery_get_property()
350 val->intval = 1; in macsmc_battery_get_property()
353 val->intval = macsmc_battery_get_charge_behaviour(power); in macsmc_battery_get_property()
354 ret = val->intval < 0 ? val->intval : 0; in macsmc_battery_get_property()
358 val->intval = vu16 == 0xffff ? 0 : vu16 * 60; in macsmc_battery_get_property()
362 val->intval = vu16 == 0xffff ? 0 : vu16 * 60; in macsmc_battery_get_property()
366 val->intval = vu8; in macsmc_battery_get_property()
369 val->intval = macsmc_battery_get_capacity_level(power); in macsmc_battery_get_property()
370 ret = val->intval < 0 ? val->intval : 0; in macsmc_battery_get_property()
[all …]
H A Dtest_power.c52 val->intval = ac_online; in test_power_get_ac_property()
66 val->intval = usb_online; in test_power_get_usb_property()
89 val->intval = battery_status; in test_power_get_battery_property()
92 val->intval = battery_charge_types; in test_power_get_battery_property()
95 val->intval = battery_health; in test_power_get_battery_property()
98 val->intval = battery_present; in test_power_get_battery_property()
101 val->intval = battery_technology; in test_power_get_battery_property()
104 val->intval = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL; in test_power_get_battery_property()
108 val->intval = battery_capacity; in test_power_get_battery_property()
111 val->intval = battery_charge_counter; in test_power_get_battery_property()
[all …]
H A Dmp2629_charger.c157 val->intval = chval * 1000; in mp2629_read_adc()
173 val->intval = rval * props[fld].step + props[fld].min; in mp2629_get_prop()
184 if (val->intval < props[fld].min || val->intval > props[fld].max) in mp2629_set_prop()
187 rval = (val->intval - props[fld].min) / props[fld].step; in mp2629_set_prop()
205 val->intval = (vnow.intval * 100) / vlim.intval; in mp2629_get_battery_capacity()
206 val->intval = min(val->intval, MP2629_MAX_BATT_CAPACITY); in mp2629_get_battery_capacity()
229 val->intval = 4520000; in mp2629_charger_battery_get_prop()
233 val->intval = 4670000; in mp2629_charger_battery_get_prop()
258 val->intval = POWER_SUPPLY_HEALTH_GOOD; in mp2629_charger_battery_get_prop()
260 val->intval = POWER_SUPPLY_HEALTH_OVERVOLTAGE; in mp2629_charger_battery_get_prop()
[all …]
H A Dlego_ev3_battery.c46 val->intval = batt->technology; in lego_ev3_battery_get_property()
50 ret = iio_read_channel_processed(batt->iio_v, &val->intval); in lego_ev3_battery_get_property()
54 val->intval *= 2000; in lego_ev3_battery_get_property()
55 val->intval += 50000; in lego_ev3_battery_get_property()
64 val->intval += val2; in lego_ev3_battery_get_property()
67 val->intval = batt->v_max; in lego_ev3_battery_get_property()
70 val->intval = batt->v_min; in lego_ev3_battery_get_property()
74 ret = iio_read_channel_processed(batt->iio_i, &val->intval); in lego_ev3_battery_get_property()
78 val->intval *= 20000; in lego_ev3_battery_get_property()
79 val->intval /= 15; in lego_ev3_battery_get_property()
[all …]
H A Dpmu_battery.c36 val->intval = (!!(pmu_power_flags & PMU_PWR_AC_PRESENT)) || in pmu_get_ac_prop()
92 val->intval = POWER_SUPPLY_STATUS_CHARGING; in pmu_bat_get_property()
94 val->intval = POWER_SUPPLY_STATUS_FULL; in pmu_bat_get_property()
96 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in pmu_bat_get_property()
99 val->intval = !!(pbi->flags & PMU_BATT_PRESENT); in pmu_bat_get_property()
105 val->intval = pbi->charge * 1000; /* mWh -> µWh */ in pmu_bat_get_property()
108 val->intval = pbi->max_charge * 1000; /* mWh -> µWh */ in pmu_bat_get_property()
111 val->intval = pbi->amperage * 1000; /* mA -> µA */ in pmu_bat_get_property()
114 val->intval = pbi->voltage * 1000; /* mV -> µV */ in pmu_bat_get_property()
117 val->intval = pbi->time_remaining; in pmu_bat_get_property()
H A Dwilco-charger.c118 val->intval = raw; in wilco_charge_get_property()
132 mode = psp_val_to_charge_mode(val->intval); in wilco_charge_set_property()
137 if (val->intval < CHARGE_LOWER_LIMIT_MIN || in wilco_charge_set_property()
138 val->intval > CHARGE_LOWER_LIMIT_MAX) in wilco_charge_set_property()
141 val->intval); in wilco_charge_set_property()
143 if (val->intval < CHARGE_UPPER_LIMIT_MIN || in wilco_charge_set_property()
144 val->intval > CHARGE_UPPER_LIMIT_MAX) in wilco_charge_set_property()
147 val->intval); in wilco_charge_set_property()
H A Dlenovo_yoga_c630_battery.c223 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in yoga_c630_psy_bat_get_property()
225 val->intval = POWER_SUPPLY_STATUS_CHARGING; in yoga_c630_psy_bat_get_property()
227 val->intval = POWER_SUPPLY_STATUS_FULL; in yoga_c630_psy_bat_get_property()
229 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in yoga_c630_psy_bat_get_property()
232 val->intval = ecbat->bat_present; in yoga_c630_psy_bat_get_property()
235 val->intval = ecbat->design_voltage; in yoga_c630_psy_bat_get_property()
239 val->intval = ecbat->design_capacity; in yoga_c630_psy_bat_get_property()
243 val->intval = ecbat->full_charge_capacity; in yoga_c630_psy_bat_get_property()
247 val->intval = ecbat->capacity_now; in yoga_c630_psy_bat_get_property()
250 val->intval = ecbat->current_now; in yoga_c630_psy_bat_get_property()
[all …]
H A Dmax8998_charger.c44 val->intval = 0; in max8998_battery_get_property()
46 val->intval = 1; in max8998_battery_get_property()
54 val->intval = 1; in max8998_battery_get_property()
56 val->intval = 0; in max8998_battery_get_property()
65 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in max8998_battery_get_property()
68 val->intval = POWER_SUPPLY_STATUS_FULL; in max8998_battery_get_property()
70 val->intval = POWER_SUPPLY_STATUS_CHARGING; in max8998_battery_get_property()
72 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in max8998_battery_get_property()
H A Dcros_usbpd-charger.c402 val->intval = port->psy_online; in cros_usbpd_charger_get_prop()
405 val->intval = port->psy_status; in cros_usbpd_charger_get_prop()
408 val->intval = port->psy_current_max * 1000; in cros_usbpd_charger_get_prop()
411 val->intval = port->psy_voltage_max_design * 1000; in cros_usbpd_charger_get_prop()
414 val->intval = port->psy_voltage_now * 1000; in cros_usbpd_charger_get_prop()
417 val->intval = port->psy_usb_type; in cros_usbpd_charger_get_prop()
421 val->intval = -1; in cros_usbpd_charger_get_prop()
423 val->intval = input_current_limit * 1000; in cros_usbpd_charger_get_prop()
427 val->intval = -1; in cros_usbpd_charger_get_prop()
429 val->intval = input_voltage_limit * 1000; in cros_usbpd_charger_get_prop()
[all …]
H A Dhuawei-gaokun-battery.c154 val->intval = ecbat->online; in gaokun_psy_get_adp_property()
157 val->intval = POWER_SUPPLY_USB_TYPE_C; in gaokun_psy_get_adp_property()
287 val->intval = ecbat->charge_now; in gaokun_psy_get_bat_property()
291 val->intval = ecbat->bat_present; in gaokun_psy_get_bat_property()
295 val->intval = POWER_SUPPLY_TECHNOLOGY_LION; in gaokun_psy_get_bat_property()
299 val->intval = le16_to_cpu(ecbat->info.cycle_count); in gaokun_psy_get_bat_property()
303 val->intval = le16_to_cpu(ecbat->info.design_voltage) * MILLI_TO_MICRO; in gaokun_psy_get_bat_property()
307 val->intval = le16_to_cpu(ecbat->status.voltage_now) * MILLI_TO_MICRO; in gaokun_psy_get_bat_property()
311 val->intval = (s16)le16_to_cpu(ecbat->status.rate_now) * MILLI_TO_MICRO; in gaokun_psy_get_bat_property()
315 val->intval = le16_to_cpu(ecbat->info.design_capacity) * MILLI_TO_MICRO; in gaokun_psy_get_bat_property()
[all …]
H A Dbd99954-charger.c290 val->intval = POWER_SUPPLY_STATUS_CHARGING; in bd9995x_power_supply_get_property()
294 val->intval = POWER_SUPPLY_STATUS_FULL; in bd9995x_power_supply_get_property()
313 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in bd9995x_power_supply_get_property()
317 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in bd9995x_power_supply_get_property()
327 val->intval = state.online; in bd9995x_power_supply_get_property()
334 val->intval = tmp * 1000; in bd9995x_power_supply_get_property()
341 val->intval = tmp * 1000; in bd9995x_power_supply_get_property()
360 val->intval = tmp * 1000; in bd9995x_power_supply_get_property()
365 val->intval = 0; in bd9995x_power_supply_get_property()
378 val->intval = clamp_val(tmp << 4, 2560, 19200); in bd9995x_power_supply_get_property()
[all …]
H A Dmax8925_power.c202 val->intval = info->ac_online; in max8925_ac_get_prop()
208 val->intval = ret * 2000; /* unit is uV */ in max8925_ac_get_prop()
236 val->intval = info->usb_online; in max8925_usb_get_prop()
242 val->intval = ret * 2000; /* unit is uV */ in max8925_usb_get_prop()
270 val->intval = info->bat_online; in max8925_bat_get_prop()
276 val->intval = ret * 2000; /* unit is uV */ in max8925_bat_get_prop()
289 val->intval = 0; in max8925_bat_get_prop()
291 val->intval = ret; /* unit is mA */ in max8925_bat_get_prop()
307 val->intval = POWER_SUPPLY_CHARGE_TYPE_FAST; in max8925_bat_get_prop()
311 val->intval = POWER_SUPPLY_CHARGE_TYPE_TRICKLE; in max8925_bat_get_prop()
[all …]
H A Dmax1721x_battery.c142 val->intval = in max1721x_battery_get_property()
148 val->intval = max172xx_percent_to_ps(reg); in max1721x_battery_get_property()
152 val->intval = max172xx_voltage_to_ps(reg); in max1721x_battery_get_property()
156 val->intval = max172xx_capacity_to_ps(reg); in max1721x_battery_get_property()
160 val->intval = max172xx_capacity_to_ps(reg); in max1721x_battery_get_property()
164 val->intval = max172xx_time_to_ps(reg); in max1721x_battery_get_property()
168 val->intval = max172xx_time_to_ps(reg); in max1721x_battery_get_property()
172 val->intval = max172xx_temperature_to_ps(reg); in max1721x_battery_get_property()
177 val->intval = in max1721x_battery_get_property()
182 val->intval = in max1721x_battery_get_property()
H A Drt9471.c376 !!val->intval); in rt9471_charger_set_property()
378 return regmap_field_write(chip->rm_fields[F_HZ], !val->intval); in rt9471_charger_set_property()
381 chip, F_ICHG_REG, RT9471_RANGE_ICHG, val->intval); in rt9471_charger_set_property()
384 chip, F_VBAT_REG, RT9471_RANGE_VCHG, val->intval); in rt9471_charger_set_property()
387 chip, F_AICR, RT9471_RANGE_AICR, val->intval); in rt9471_charger_set_property()
390 chip, F_MIVR, RT9471_RANGE_MIVR, val->intval); in rt9471_charger_set_property()
393 chip, F_IPRE_CHG, RT9471_RANGE_IPRE, val->intval); in rt9471_charger_set_property()
395 return rt9471_set_ieoc(chip, val->intval); in rt9471_charger_set_property()
412 return rt9471_get_status(chip, &val->intval); in rt9471_charger_get_property()
414 return rt9471_get_vbus_good(chip, &val->intval); in rt9471_charger_get_property()
[all …]
H A Drt9467-charger.c661 return rt9467_psy_get_status(data, &val->intval); in rt9467_psy_get_property()
663 return regmap_field_read(data->rm_field[F_PWR_RDY], &val->intval); in rt9467_psy_get_property()
665 return rt9467_get_adc(data, RT9467_ADC_VBUS_DIV5, &val->intval); in rt9467_psy_get_property()
670 val->intval = 500000; in rt9467_psy_get_property()
672 val->intval = 1500000; in rt9467_psy_get_property()
676 return rt9467_get_adc(data, RT9467_ADC_IBUS, &val->intval); in rt9467_psy_get_property()
679 val->intval = data->ichg_ua; in rt9467_psy_get_property()
683 val->intval = RT9467_ICHG_MAX_uA; in rt9467_psy_get_property()
688 &val->intval); in rt9467_psy_get_property()
690 val->intval = RT9467_CV_MAX_uV; in rt9467_psy_get_property()
[all …]
H A Dda9052-battery.c509 ret = da9052_bat_check_status(bat, &val->intval); in da9052_bat_get_property()
512 val->intval = in da9052_bat_get_property()
516 ret = da9052_bat_check_presence(bat, &val->intval); in da9052_bat_get_property()
519 ret = da9052_bat_check_health(bat, &val->intval); in da9052_bat_get_property()
522 val->intval = DA9052_BAT_CUTOFF_VOLT * 1000; in da9052_bat_get_property()
525 ret = da9052_bat_read_volt(bat, &val->intval); in da9052_bat_get_property()
528 ret = da9052_read_chg_current(bat, &val->intval); in da9052_bat_get_property()
531 ret = da9052_bat_read_capacity(bat, &val->intval); in da9052_bat_get_property()
534 val->intval = da9052_adc_read_temp(bat->da9052); in da9052_bat_get_property()
535 ret = val->intval; in da9052_bat_get_property()
[all …]
H A Dmax17042_battery.c278 ret = max17042_get_status(chip, &val->intval); in max17042_get_property()
288 val->intval = 0; in max17042_get_property()
290 val->intval = 1; in max17042_get_property()
293 val->intval = POWER_SUPPLY_TECHNOLOGY_LION; in max17042_get_property()
300 val->intval = data; in max17042_get_property()
307 val->intval = data >> 8; in max17042_get_property()
308 val->intval *= 20000; /* Units of LSB = 20mV */ in max17042_get_property()
315 val->intval = (data & 0xff) * 20000; /* Units of 20mV */ in max17042_get_property()
325 val->intval = data >> 7; in max17042_get_property()
326 val->intval *= 10000; /* Units of LSB = 10mV */ in max17042_get_property()
[all …]
H A Dpm8916_bms_vm.c72 val->intval = POWER_SUPPLY_STATUS_CHARGING; in pm8916_bms_vm_battery_get_property()
74 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in pm8916_bms_vm_battery_get_property()
79 val->intval = POWER_SUPPLY_HEALTH_DEAD; in pm8916_bms_vm_battery_get_property()
81 val->intval = POWER_SUPPLY_HEALTH_OVERVOLTAGE; in pm8916_bms_vm_battery_get_property()
83 val->intval = POWER_SUPPLY_HEALTH_GOOD; in pm8916_bms_vm_battery_get_property()
87 val->intval = bat->vbat_now; in pm8916_bms_vm_battery_get_property()
98 val->intval = bat->last_ocv; in pm8916_bms_vm_battery_get_property()
H A Dwm831x_backup.c34 val->intval = ret; in wm831x_backup_read_voltage()
127 val->intval = POWER_SUPPLY_STATUS_CHARGING; in wm831x_backup_get_prop()
129 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in wm831x_backup_get_prop()
139 val->intval = 1; in wm831x_backup_get_prop()
141 val->intval = 0; in wm831x_backup_get_prop()
H A Dcollie_battery.c107 val->intval = bat->status; in collie_bat_get_property()
110 val->intval = bat->technology; in collie_bat_get_property()
113 val->intval = collie_read_bat(bat); in collie_bat_get_property()
117 val->intval = bat->bat_max; in collie_bat_get_property()
119 val->intval = bat->full_chrg; in collie_bat_get_property()
122 val->intval = bat->bat_max; in collie_bat_get_property()
125 val->intval = bat->bat_min; in collie_bat_get_property()
128 val->intval = collie_read_temp(bat); in collie_bat_get_property()
131 val->intval = bat->is_present ? bat->is_present(bat) : 1; in collie_bat_get_property()
/linux/drivers/net/wireless/ath/ath9k/
H A Dcommon-beacon.c58 conf->intval = conf->beacon_interval; in ath9k_cmn_beacon_config_sta()
64 dtim_intval = conf->intval * conf->dtim_period; in ath9k_cmn_beacon_config_sta()
71 conf->nexttbtt = ath9k_get_next_tbtt(ah, tsf, conf->intval); in ath9k_cmn_beacon_config_sta()
73 bs->bs_intval = TU_TO_USEC(conf->intval); in ath9k_cmn_beacon_config_sta()
86 bs->bs_bmissthreshold = DIV_ROUND_UP(conf->bmiss_timeout, conf->intval); in ath9k_cmn_beacon_config_sta()
102 conf->intval)); in ath9k_cmn_beacon_config_sta()
120 conf->intval = TU_TO_USEC(conf->beacon_interval); in ath9k_cmn_beacon_config_adhoc()
123 conf->nexttbtt = conf->intval; in ath9k_cmn_beacon_config_adhoc()
136 conf->nexttbtt, conf->intval, conf->beacon_interval); in ath9k_cmn_beacon_config_adhoc()
152 conf->intval = TU_TO_USEC(conf->beacon_interval); in ath9k_cmn_beacon_config_ap()
[all …]
/linux/drivers/acpi/
H A Dsbs.c136 val->intval = sbs->charger_present; in sbs_get_ac_property()
170 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in acpi_sbs_battery_get_property()
172 val->intval = POWER_SUPPLY_STATUS_CHARGING; in acpi_sbs_battery_get_property()
174 val->intval = POWER_SUPPLY_STATUS_FULL; in acpi_sbs_battery_get_property()
177 val->intval = battery->present; in acpi_sbs_battery_get_property()
180 val->intval = acpi_battery_technology(battery); in acpi_sbs_battery_get_property()
183 val->intval = battery->cycle_count; in acpi_sbs_battery_get_property()
186 val->intval = battery->design_voltage * in acpi_sbs_battery_get_property()
190 val->intval = battery->voltage_now * in acpi_sbs_battery_get_property()
195 val->intval = abs(battery->rate_now) * in acpi_sbs_battery_get_property()
[all …]
/linux/drivers/hid/
H A Dhid-kysona.c51 val->intval = 1; in kysona_battery_get_property()
54 val->intval = drv_data->online; in kysona_battery_get_property()
58 val->intval = drv_data->battery_charging ? in kysona_battery_get_property()
62 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in kysona_battery_get_property()
65 val->intval = POWER_SUPPLY_SCOPE_DEVICE; in kysona_battery_get_property()
68 val->intval = drv_data->battery_capacity; in kysona_battery_get_property()
72 val->intval = drv_data->battery_voltage * 1000; in kysona_battery_get_property()

123