| /drivers/usb/typec/ucsi/ |
| A D | psy.c | 50 val->intval = scope; in ucsi_psy_get_scope() 57 val->intval = UCSI_PSY_OFFLINE; in ucsi_psy_get_online() 60 val->intval = UCSI_PSY_FIXED_ONLINE; in ucsi_psy_get_online() 81 val->intval = 0; in ucsi_psy_get_voltage_min() 98 val->intval = 0; in ucsi_psy_get_voltage_max() 108 val->intval = 0; in ucsi_psy_get_voltage_max() 127 val->intval = 0; in ucsi_psy_get_voltage_now() 137 val->intval = 0; in ucsi_psy_get_voltage_now() 154 val->intval = 0; in ucsi_psy_get_current_max() 179 val->intval = 0; in ucsi_psy_get_current_now() [all …]
|
| /drivers/power/supply/ |
| A D | apm_power.c | 59 if (bp->full.intval > bp->max_charge) { in __find_main_battery() 61 bp->max_charge = bp->full.intval; in __find_main_battery() 67 bp->max_energy = bp->full.intval; in __find_main_battery() 136 if (!I.intval) in do_calculate_time() 178 empty.intval = 0; in do_calculate_time() 188 return ((cur.intval - full.intval) * 60L) / I.intval; in do_calculate_time() 190 return -((cur.intval - empty.intval) * 60L) / I.intval; in do_calculate_time() 265 empty.intval = 0; in calculate_capacity() 268 if (full.intval - empty.intval) in calculate_capacity() 269 ret = ((cur.intval - empty.intval) * 100L) / in calculate_capacity() [all …]
|
| A D | qcom_battmgr.c | 133 } intval; member 501 val->intval = battmgr->status.status; in qcom_battmgr_bat_get_property() 507 val->intval = battmgr->status.health; in qcom_battmgr_bat_get_property() 510 val->intval = battmgr->info.present; in qcom_battmgr_bat_get_property() 582 val->intval = battmgr->status.percent; in qcom_battmgr_bat_get_property() 594 val->intval = battmgr->info.year; in qcom_battmgr_bat_get_property() 597 val->intval = battmgr->info.month; in qcom_battmgr_bat_get_property() 600 val->intval = battmgr->info.day; in qcom_battmgr_bat_get_property() 698 val->intval = battmgr->ac.online; in qcom_battmgr_ac_get_property() 766 val->intval = battmgr->usb.online; in qcom_battmgr_usb_get_property() [all …]
|
| A D | olpc_battery.c | 77 val->intval = !!(status & BAT_STAT_AC); in olpc_ac_get_prop() 134 val->intval = POWER_SUPPLY_HEALTH_GOOD; in olpc_bat_get_health() 227 switch (tech.intval) { in olpc_bat_get_charge_full_design() 231 val->intval = 3000000*.8; in olpc_bat_get_charge_full_design() 242 val->intval = 2800000; in olpc_bat_get_charge_full_design() 270 val->intval = soc * (full.intval / 100); in olpc_bat_get_charge_now() 292 switch (tech.intval) { in olpc_bat_get_voltage_max_design() 296 val->intval = 6000000; in olpc_bat_get_voltage_max_design() 306 val->intval = 6400000; in olpc_bat_get_voltage_max_design() 309 val->intval = 6500000; in olpc_bat_get_voltage_max_design() [all …]
|
| A D | rn5t618_power.c | 187 val->intval = 0; in rn5t618_battery_present() 189 val->intval = 1; in rn5t618_battery_present() 235 val->intval = v; in rn5t618_battery_capacity() 268 val->intval = res * 60; in rn5t618_battery_tte() 286 val->intval = res * 60; in rn5t618_battery_ttf() 294 if (val->intval < CHG_MIN_CUR) in rn5t618_battery_set_current_limit() 331 val->intval = res * 1000; in rn5t618_battery_charge_full() 346 val->intval = res * 1000; in rn5t618_battery_charge_now() 445 val->intval = online; in rn5t618_adp_get_property() 565 val->intval = online; in rn5t618_usb_get_property() [all …]
|
| A D | mm8013.c | 103 val->intval = regval; in mm8013_get_property() 110 val->intval = 1000 * regval; in mm8013_get_property() 117 val->intval = 1000 * regval; in mm8013_get_property() 124 val->intval = 1000 * regval; in mm8013_get_property() 131 val->intval = -1000 * (s16)regval; in mm8013_get_property() 138 val->intval = -1000 * (s16)regval; in mm8013_get_property() 145 val->intval = regval; in mm8013_get_property() 170 val->intval = ((s16)regval > 0); in mm8013_get_property() 204 val->intval = regval; in mm8013_get_property() 215 val->intval = regval; in mm8013_get_property() [all …]
|
| A D | axp20x_usb_power.c | 228 &val->intval, 1000); in axp20x_usb_power_get_property() 403 int intval) in axp20x_usb_power_set_voltage_min() argument 407 switch (intval) { in axp20x_usb_power_set_voltage_min() 429 int intval) in axp717_usb_power_set_voltage_min() argument 434 if (intval < 3880000 || intval > 5080000) in axp717_usb_power_set_voltage_min() 445 int intval) in axp20x_usb_power_set_input_current_limit() argument 451 if (intval == -1) in axp20x_usb_power_set_input_current_limit() 458 intval = power->max_input_cur; in axp20x_usb_power_set_input_current_limit() 485 int intval) in axp717_usb_power_set_input_current_limit() argument 490 if (intval < 100000 || intval > 3250000) in axp717_usb_power_set_input_current_limit() [all …]
|
| A D | cpcap-battery.c | 485 *val = prop.intval; in cpcap_battery_get_charger_status() 659 val->intval = 1; in cpcap_battery_get_property() 661 val->intval = 0; in cpcap_battery_get_property() 700 val->intval = latest->current_ua; in cpcap_battery_get_property() 730 val->intval = clamp(val->intval, 0, ddata->charge_full); in cpcap_battery_get_property() 731 val->intval = val->intval * 100 / ddata->charge_full; in cpcap_battery_get_property() 752 if (val->intval < 0) { in cpcap_battery_get_property() 759 val->intval = 0; in cpcap_battery_get_property() 773 val->intval = ddata->charge_full; in cpcap_battery_get_property() 815 val.intval = const_charge_voltage; in cpcap_battery_update_charger() [all …]
|
| A D | adp5061.c | 236 val->intval = adp5061_vmin[regval] * 1000; in adp5061_get_min_voltage() 271 val->intval = adp5061_vmax[regval] * 1000; in adp5061_get_max_voltage() 398 val->intval = adp5061_vweak_th[regval] * 1000; in adp5061_get_vweak_th() 432 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in adp5061_get_chg_type() 434 val->intval = adp5061_chg_type[chg_type]; in adp5061_get_chg_type() 456 val->intval = POWER_SUPPLY_STATUS_CHARGING; in adp5061_get_charger_status() 459 val->intval = POWER_SUPPLY_STATUS_FULL; in adp5061_get_charger_status() 466 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in adp5061_get_charger_status() 515 val->intval = adp5061_iend[regval]; in adp5061_get_termination_current() 551 val->intval = 0; in adp5061_get_property() [all …]
|
| A D | axp20x_battery.c | 345 &val->intval); in axp20x_battery_get_prop() 367 val->intval = -val1; in axp20x_battery_get_prop() 382 val->intval = 100; in axp20x_battery_get_prop() 402 &val->intval); in axp20x_battery_get_prop() 514 &val->intval); in axp717_battery_get_prop() 558 &val->intval); in axp717_battery_get_prop() 784 val->intval); in axp20x_battery_set_prop() 787 val->intval); in axp20x_battery_set_prop() 789 switch (val->intval) { in axp20x_battery_set_prop() 820 val->intval); in axp717_battery_set_prop() [all …]
|
| A D | axp20x_ac_power.c | 74 val->intval = POWER_SUPPLY_HEALTH_GOOD; in axp20x_ac_power_get_property() 78 val->intval = POWER_SUPPLY_HEALTH_UNKNOWN; in axp20x_ac_power_get_property() 97 if (val->intval && power->has_acin_path_sel) { in axp20x_ac_power_get_property() 114 val->intval *= 1000; in axp20x_ac_power_get_property() 124 val->intval *= 1000; in axp20x_ac_power_get_property() 133 val->intval = AXP813_VHOLD_REG_TO_UV(reg); in axp20x_ac_power_get_property() 144 if (val->intval > 4000000) in axp20x_ac_power_get_property() 145 val->intval = 4000000; in axp20x_ac_power_get_property() 169 if (val->intval < 4000000 || val->intval > 4700000) in axp813_ac_power_set_property() 174 AXP813_VHOLD_UV_TO_BIT(val->intval)); in axp813_ac_power_set_property() [all …]
|
| A D | sbs-battery.c | 545 val->intval = 0; in sbs_get_ti_battery_presence_and_health() 557 val->intval = 0; in sbs_get_ti_battery_presence_and_health() 559 val->intval = 1; in sbs_get_ti_battery_presence_and_health() 591 val->intval = 0; in sbs_get_battery_presence_and_health() 628 val->intval = ret; in sbs_get_battery_property() 631 val->intval = in sbs_get_battery_property() 634 val->intval = in sbs_get_battery_property() 637 val->intval = in sbs_get_battery_property() 640 val->intval = in sbs_get_battery_property() 672 val->intval = 0; in sbs_get_battery_property() [all …]
|
| A D | mp2629_charger.c | 158 val->intval = chval * 1000; in mp2629_read_adc() 185 if (val->intval < props[fld].min || val->intval > props[fld].max) in mp2629_set_prop() 206 val->intval = (vnow.intval * 100) / vlim.intval; in mp2629_get_battery_capacity() 207 val->intval = min(val->intval, MP2629_MAX_BATT_CAPACITY); in mp2629_get_battery_capacity() 230 val->intval = 4520000; in mp2629_charger_battery_get_prop() 234 val->intval = 4670000; in mp2629_charger_battery_get_prop() 259 val->intval = POWER_SUPPLY_HEALTH_GOOD; in mp2629_charger_battery_get_prop() 283 val->intval = POWER_SUPPLY_STATUS_FULL; in mp2629_charger_battery_get_prop() 364 val->intval = POWER_SUPPLY_USB_TYPE_SDP; in mp2629_charger_usb_get_prop() 367 val->intval = POWER_SUPPLY_USB_TYPE_CDP; in mp2629_charger_usb_get_prop() [all …]
|
| A D | test_power.c | 52 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() 95 val->intval = battery_health; in test_power_get_battery_property() 98 val->intval = battery_present; in test_power_get_battery_property() 115 val->intval = 100; in test_power_get_battery_property() 119 val->intval = 3600; in test_power_get_battery_property() 122 val->intval = 26; in test_power_get_battery_property() 125 val->intval = battery_voltage; in test_power_get_battery_property() 157 if (val->intval < 0 || in test_power_set_battery_property() [all …]
|
| A D | goldfish_battery.c | 71 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_AC_ONLINE); in goldfish_ac_get_property() 74 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_VOLTAGE_MAX); in goldfish_ac_get_property() 95 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_STATUS); in goldfish_battery_get_property() 98 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_HEALTH); in goldfish_battery_get_property() 101 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_PRESENT); in goldfish_battery_get_property() 104 val->intval = POWER_SUPPLY_TECHNOLOGY_LION; in goldfish_battery_get_property() 107 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_CAPACITY); in goldfish_battery_get_property() 110 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_VOLTAGE); in goldfish_battery_get_property() 113 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_TEMP); in goldfish_battery_get_property() 116 val->intval = GOLDFISH_BATTERY_READ(data, in goldfish_battery_get_property() [all …]
|
| A D | lego_ev3_battery.c | 47 val->intval = batt->technology; in lego_ev3_battery_get_property() 51 ret = iio_read_channel_processed(batt->iio_v, &val->intval); in lego_ev3_battery_get_property() 55 val->intval *= 2000; in lego_ev3_battery_get_property() 56 val->intval += 50000; in lego_ev3_battery_get_property() 65 val->intval += val2; in lego_ev3_battery_get_property() 68 val->intval = batt->v_max; in lego_ev3_battery_get_property() 71 val->intval = batt->v_min; in lego_ev3_battery_get_property() 79 val->intval *= 20000; in lego_ev3_battery_get_property() 80 val->intval /= 15; in lego_ev3_battery_get_property() 83 val->intval = POWER_SUPPLY_SCOPE_SYSTEM; in lego_ev3_battery_get_property() [all …]
|
| A D | da9150-charger.c | 63 val->intval = v_val * 1000; in da9150_charger_vbus_voltage_now() 79 val->intval = i_val * 1000; in da9150_charger_ibus_current_avg() 95 val->intval = t_val / 100; in da9150_charger_tjunc_temp() 169 val->intval = POWER_SUPPLY_STATUS_FULL; in da9150_charger_battery_status() 189 val->intval = POWER_SUPPLY_HEALTH_COLD; in da9150_charger_battery_health() 202 val->intval = POWER_SUPPLY_HEALTH_DEAD; in da9150_charger_battery_health() 208 val->intval = POWER_SUPPLY_HEALTH_GOOD; in da9150_charger_battery_health() 223 val->intval = 0; in da9150_charger_battery_present() 225 val->intval = 1; in da9150_charger_battery_present() 277 val->intval = v_val * 1000; in da9150_charger_battery_voltage_now() [all …]
|
| A D | twl4030_madc_battery.c | 117 val->intval = POWER_SUPPLY_STATUS_FULL; in twl4030_madc_bat_get_property() 120 val->intval = POWER_SUPPLY_STATUS_CHARGING; in twl4030_madc_bat_get_property() 122 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in twl4030_madc_bat_get_property() 129 val->intval = POWER_SUPPLY_TECHNOLOGY_LION; in twl4030_madc_bat_get_property() 132 val->intval = twl4030_madc_bat_get_current(bat); in twl4030_madc_bat_get_property() 136 val->intval = 1; in twl4030_madc_bat_get_property() 141 val->intval = (percent * bat->pdata->capacity) / 100; in twl4030_madc_bat_get_property() 145 val->intval = twl4030_madc_bat_voltscale(bat, in twl4030_madc_bat_get_property() 149 val->intval = bat->pdata->capacity; in twl4030_madc_bat_get_property() 152 val->intval = twl4030_madc_bat_get_temp(bat); in twl4030_madc_bat_get_property() [all …]
|
| A D | rk817_charger.c | 500 val->intval = 0; in rk817_bat_get_prop() 511 if (val->intval > 100) in rk817_bat_get_prop() 512 val->intval = 100; in rk817_bat_get_prop() 513 if (val->intval < 0) in rk817_bat_get_prop() 514 val->intval = 0; in rk817_bat_get_prop() 517 val->intval = charger->volt_avg_uv; in rk817_bat_get_prop() 520 val->intval = charger->cur_avg_ua; in rk817_bat_get_prop() 545 val->intval = charger->plugged_in; in rk817_chg_get_prop() 549 val->intval = 5500000; in rk817_chg_get_prop() 553 val->intval = 3800000; in rk817_chg_get_prop() [all …]
|
| A D | pmu_battery.c | 36 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()
|
| A D | bq256xx_charger.c | 971 val->intval = bq->init_data.ichg_max; in bq256xx_get_battery_property() 1015 val->intval = in bq256xx_get_charger_property() 1022 val->intval = in bq256xx_get_charger_property() 1029 val->intval = in bq256xx_get_charger_property() 1118 val->intval = state.online; in bq256xx_get_charger_property() 1125 val->intval = ret; in bq256xx_get_charger_property() 1132 val->intval = ret; in bq256xx_get_charger_property() 1139 val->intval = ret; in bq256xx_get_charger_property() 1146 val->intval = ret; in bq256xx_get_charger_property() 1153 val->intval = ret; in bq256xx_get_charger_property() [all …]
|
| A D | lenovo_yoga_c630_battery.c | 227 val->intval = POWER_SUPPLY_STATUS_FULL; 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() 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() 253 val->intval = ecbat->rate_now; in yoga_c630_psy_bat_get_property() 256 val->intval = ecbat->voltage_now; in yoga_c630_psy_bat_get_property() 268 val->intval = POWER_SUPPLY_SCOPE_SYSTEM; in yoga_c630_psy_bat_get_property() 339 val->intval = ecbat->adapter_online; in yoga_c630_psy_adpt_get_property() [all …]
|
| /drivers/platform/x86/x86-android-tablets/ |
| A D | vexia_atla10_ec.c | 114 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in atla10_ec_psy_get_property() 116 val->intval = POWER_SUPPLY_STATUS_CHARGING; in atla10_ec_psy_get_property() 118 val->intval = POWER_SUPPLY_STATUS_FULL; in atla10_ec_psy_get_property() 120 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in atla10_ec_psy_get_property() 123 val->intval = data->state.capacity; in atla10_ec_psy_get_property() 133 val->intval = min(charge_now_mAh, charge_full_mAh) * 1000; in atla10_ec_psy_get_property() 145 val->intval = -val->intval; in atla10_ec_psy_get_property() 151 val->intval = le16_to_cpu(data->state.temp) / 10; in atla10_ec_psy_get_property() 157 val->intval = ATLA10_EC_VOLTAGE_MIN_DESIGN_uV; in atla10_ec_psy_get_property() 160 val->intval = 1; in atla10_ec_psy_get_property() [all …]
|
| /drivers/net/wireless/ath/ath9k/ |
| A D | common-beacon.c | 58 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() 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() 153 conf->intval /= bc_buf; in ath9k_cmn_beacon_config_ap() [all …]
|
| /drivers/staging/nvec/ |
| A D | nvec_power.c | 230 val->intval = power->on; in nvec_power_get_property() 246 val->intval = power->bat_status; in nvec_battery_get_property() 249 val->intval = power->bat_cap; in nvec_battery_get_property() 252 val->intval = power->bat_present; in nvec_battery_get_property() 255 val->intval = power->bat_voltage_now; in nvec_battery_get_property() 258 val->intval = power->bat_current_now; in nvec_battery_get_property() 261 val->intval = power->bat_current_avg; in nvec_battery_get_property() 264 val->intval = power->time_remain; in nvec_battery_get_property() 276 val->intval = power->capacity_remain; in nvec_battery_get_property() 279 val->intval = power->bat_temperature; in nvec_battery_get_property() [all …]
|