/drivers/power/ |
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() 65 if (bp->full.intval > bp->max_energy) { in __find_main_battery() 67 bp->max_energy = bp->full.intval; in __find_main_battery() 94 if (bp.max_energy > bp.max_charge * bp.full.intval) in find_main_battery() 100 if (bp.max_charge > bp.max_energy / bp.full.intval) in find_main_battery() 137 if (!I.intval) in do_calculate_time() 179 empty.intval = 0; in do_calculate_time() 189 return ((cur.intval - full.intval) * 60L) / I.intval; in do_calculate_time() 191 return -((cur.intval - empty.intval) * 60L) / I.intval; in do_calculate_time() [all …]
|
D | olpc_battery.c | 71 val->intval = !!(status & BAT_STAT_AC); in olpc_ac_get_prop() 98 val->intval = POWER_SUPPLY_STATUS_CHARGING; in olpc_bat_get_status() 100 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in olpc_bat_get_status() 102 val->intval = POWER_SUPPLY_STATUS_FULL; in olpc_bat_get_status() 104 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in olpc_bat_get_status() 108 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in olpc_bat_get_status() 110 val->intval = POWER_SUPPLY_STATUS_FULL; in olpc_bat_get_status() 112 val->intval = POWER_SUPPLY_STATUS_CHARGING; in olpc_bat_get_status() 129 val->intval = POWER_SUPPLY_HEALTH_GOOD; in olpc_bat_get_health() 133 val->intval = POWER_SUPPLY_HEALTH_OVERHEAT; in olpc_bat_get_health() [all …]
|
D | sbs-battery.c | 221 val->intval = 1; in sbs_get_battery_presence_and_health() 223 val->intval = 0; in sbs_get_battery_presence_and_health() 224 chip->is_present = val->intval; in sbs_get_battery_presence_and_health() 235 val->intval = 0; /* battery removed */ in sbs_get_battery_presence_and_health() 245 val->intval = 0; in sbs_get_battery_presence_and_health() 257 val->intval = 0; in sbs_get_battery_presence_and_health() 259 val->intval = 1; in sbs_get_battery_presence_and_health() 262 val->intval = POWER_SUPPLY_HEALTH_UNSPEC_FAILURE; in sbs_get_battery_presence_and_health() 264 val->intval = POWER_SUPPLY_HEALTH_OVERHEAT; in sbs_get_battery_presence_and_health() 266 val->intval = POWER_SUPPLY_HEALTH_DEAD; in sbs_get_battery_presence_and_health() [all …]
|
D | max17042_battery.c | 140 val->intval = 0; in max17042_get_property() 142 val->intval = 1; in max17042_get_property() 149 val->intval = ret; in max17042_get_property() 156 val->intval = ret >> 8; in max17042_get_property() 157 val->intval *= 20000; /* Units of LSB = 20mV */ in max17042_get_property() 167 val->intval = ret >> 7; in max17042_get_property() 168 val->intval *= 10000; /* Units of LSB = 10mV */ in max17042_get_property() 175 val->intval = ret * 625 / 8; in max17042_get_property() 182 val->intval = ret * 625 / 8; in max17042_get_property() 189 val->intval = ret * 625 / 8; in max17042_get_property() [all …]
|
D | pmu_battery.c | 38 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()
|
D | rx51_battery.c | 165 val->intval = POWER_SUPPLY_TECHNOLOGY_LION; in rx51_battery_get_property() 168 val->intval = 4200000; in rx51_battery_get_property() 171 val->intval = rx51_battery_read_voltage(di) ? 1 : 0; in rx51_battery_get_property() 174 val->intval = rx51_battery_read_voltage(di); in rx51_battery_get_property() 177 val->intval = rx51_battery_read_temperature(di); in rx51_battery_get_property() 180 val->intval = rx51_battery_read_capacity(di); in rx51_battery_get_property() 186 if (val->intval == INT_MAX || val->intval == INT_MIN) in rx51_battery_get_property()
|
D | test_power.c | 41 val->intval = ac_online; in test_power_get_ac_property() 55 val->intval = usb_online; in test_power_get_usb_property() 78 val->intval = battery_status; in test_power_get_battery_property() 81 val->intval = POWER_SUPPLY_CHARGE_TYPE_FAST; in test_power_get_battery_property() 84 val->intval = battery_health; in test_power_get_battery_property() 87 val->intval = battery_present; in test_power_get_battery_property() 90 val->intval = battery_technology; in test_power_get_battery_property() 93 val->intval = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL; in test_power_get_battery_property() 97 val->intval = battery_capacity; in test_power_get_battery_property() 101 val->intval = 100; in test_power_get_battery_property() [all …]
|
D | charger-manager.c | 99 if (ret == 0 && val.intval) in is_batt_present() 107 if (ret == 0 && val.intval) { in is_batt_present() 137 if (ret == 0 && val.intval) { in is_ext_pwr_online() 167 *uV = val.intval; in get_batt_uV() 202 if (val.intval == 0) in is_charging() 217 if (val.intval == POWER_SUPPLY_STATUS_FULL || in is_charging() 218 val.intval == POWER_SUPPLY_STATUS_DISCHARGING || in is_charging() 219 val.intval == POWER_SUPPLY_STATUS_NOT_CHARGING) in is_charging() 246 val.intval = 0; in is_full_charged() 251 if (!ret && val.intval > desc->fullbatt_full_capacity) in is_full_charged() [all …]
|
D | lp8788-charger.c | 156 val->intval = lp8788_is_charger_detected(pchg); in lp8788_charger_get_property() 160 val->intval = LP8788_ISEL_STEP * in lp8788_charger_get_property() 184 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in lp8788_get_battery_status() 190 val->intval = POWER_SUPPLY_STATUS_CHARGING; in lp8788_get_battery_status() 193 val->intval = POWER_SUPPLY_STATUS_FULL; in lp8788_get_battery_status() 196 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in lp8788_get_battery_status() 214 val->intval = POWER_SUPPLY_HEALTH_UNSPEC_FAILURE; in lp8788_get_battery_health() 216 val->intval = POWER_SUPPLY_HEALTH_DEAD; in lp8788_get_battery_health() 218 val->intval = POWER_SUPPLY_HEALTH_GOOD; in lp8788_get_battery_health() 233 val->intval = !(data & LP8788_NO_BATT_M); in lp8788_get_battery_present() [all …]
|
D | power_supply_sysfs.c | 77 value.intval = psy->type; in power_supply_show_property() 92 return sprintf(buf, "%s\n", status_text[value.intval]); in power_supply_show_property() 94 return sprintf(buf, "%s\n", charge_type[value.intval]); in power_supply_show_property() 96 return sprintf(buf, "%s\n", health_text[value.intval]); in power_supply_show_property() 98 return sprintf(buf, "%s\n", technology_text[value.intval]); in power_supply_show_property() 100 return sprintf(buf, "%s\n", capacity_level_text[value.intval]); in power_supply_show_property() 102 return sprintf(buf, "%s\n", type_text[value.intval]); in power_supply_show_property() 104 return sprintf(buf, "%s\n", scope_text[value.intval]); in power_supply_show_property() 111 return sprintf(buf, "%d\n", value.intval); in power_supply_show_property() 128 value.intval = long_val; in power_supply_store_property()
|
D | max8925_power.c | 204 val->intval = info->ac_online; in max8925_ac_get_prop() 210 val->intval = ret * 2000; /* unit is uV */ in max8925_ac_get_prop() 238 val->intval = info->usb_online; in max8925_usb_get_prop() 244 val->intval = ret * 2000; /* unit is uV */ in max8925_usb_get_prop() 272 val->intval = info->bat_online; in max8925_bat_get_prop() 278 val->intval = ret * 2000; /* unit is uV */ in max8925_bat_get_prop() 291 val->intval = 0; in max8925_bat_get_prop() 293 val->intval = ret; /* unit is mA */ in max8925_bat_get_prop() 309 val->intval = POWER_SUPPLY_CHARGE_TYPE_FAST; in max8925_bat_get_prop() 313 val->intval = POWER_SUPPLY_CHARGE_TYPE_TRICKLE; in max8925_bat_get_prop() [all …]
|
D | jz4740-battery.c | 137 val->intval = jz_battery->status; in jz_battery_get_property() 140 val->intval = jz_battery->pdata->info.technology; in jz_battery_get_property() 145 val->intval = POWER_SUPPLY_HEALTH_DEAD; in jz_battery_get_property() 147 val->intval = POWER_SUPPLY_HEALTH_GOOD; in jz_battery_get_property() 150 val->intval = jz_battery_get_capacity(psy); in jz_battery_get_property() 153 val->intval = jz_battery_read_voltage(jz_battery); in jz_battery_get_property() 154 if (val->intval < 0) in jz_battery_get_property() 155 return val->intval; in jz_battery_get_property() 158 val->intval = info->voltage_max_design; in jz_battery_get_property() 161 val->intval = info->voltage_min_design; in jz_battery_get_property() [all …]
|
D | collie_battery.c | 109 val->intval = bat->status; in collie_bat_get_property() 112 val->intval = bat->technology; in collie_bat_get_property() 115 val->intval = collie_read_bat(bat); in collie_bat_get_property() 119 val->intval = bat->bat_max; in collie_bat_get_property() 121 val->intval = bat->full_chrg; in collie_bat_get_property() 124 val->intval = bat->bat_max; in collie_bat_get_property() 127 val->intval = bat->bat_min; in collie_bat_get_property() 130 val->intval = collie_read_temp(bat); in collie_bat_get_property() 133 val->intval = bat->is_present ? bat->is_present(bat) : 1; in collie_bat_get_property()
|
D | da9052-battery.c | 514 ret = da9052_bat_check_status(bat, &val->intval); in da9052_bat_get_property() 517 val->intval = in da9052_bat_get_property() 521 ret = da9052_bat_check_presence(bat, &val->intval); in da9052_bat_get_property() 524 ret = da9052_bat_check_health(bat, &val->intval); in da9052_bat_get_property() 527 val->intval = DA9052_BAT_CUTOFF_VOLT * 1000; in da9052_bat_get_property() 530 ret = da9052_bat_read_volt(bat, &val->intval); in da9052_bat_get_property() 533 ret = da9052_read_chg_current(bat, &val->intval); in da9052_bat_get_property() 536 ret = da9052_bat_read_capacity(bat, &val->intval); in da9052_bat_get_property() 539 val->intval = da9052_adc_read_temp(bat->da9052); in da9052_bat_get_property() 540 ret = val->intval; in da9052_bat_get_property() [all …]
|
D | max8997_charger.c | 55 val->intval = 0; in max8997_battery_get_property() 60 val->intval = POWER_SUPPLY_STATUS_FULL; in max8997_battery_get_property() 64 val->intval = 0; in max8997_battery_get_property() 69 val->intval = 1; in max8997_battery_get_property() 73 val->intval = 0; in max8997_battery_get_property() 79 val->intval = 1; in max8997_battery_get_property()
|
D | smb347-charger.c | 884 int ret, intval; in get_const_charge_current() local 899 intval = hw_to_current(fcc_tbl, ARRAY_SIZE(fcc_tbl), v & 7); in get_const_charge_current() 902 intval = hw_to_current(pcc_tbl, ARRAY_SIZE(pcc_tbl), v & 7); in get_const_charge_current() 905 return intval; in get_const_charge_current() 914 int ret, intval; in get_const_charge_voltage() local 928 intval = 3500000 + v * 20000; in get_const_charge_voltage() 930 return intval; in get_const_charge_voltage() 943 val->intval = smb->mains_online; in smb347_mains_get_property() 951 val->intval = ret; in smb347_mains_get_property() 959 val->intval = ret; in smb347_mains_get_property() [all …]
|
D | tosa_battery.c | 108 val->intval = bat->status; in tosa_bat_get_property() 111 val->intval = bat->technology; in tosa_bat_get_property() 114 val->intval = tosa_read_bat(bat); in tosa_bat_get_property() 118 val->intval = bat->bat_max; in tosa_bat_get_property() 120 val->intval = bat->full_chrg; in tosa_bat_get_property() 123 val->intval = bat->bat_max; in tosa_bat_get_property() 126 val->intval = bat->bat_min; in tosa_bat_get_property() 129 val->intval = tosa_read_temp(bat); in tosa_bat_get_property() 132 val->intval = bat->is_present ? bat->is_present(bat) : 1; in tosa_bat_get_property()
|
D | s3c_adc_battery.c | 95 val->intval = bat->volt_value; in s3c_adc_backup_bat_get_property() 98 val->intval = bat->pdata->backup_volt_min; in s3c_adc_backup_bat_get_property() 101 val->intval = bat->pdata->backup_volt_max; in s3c_adc_backup_bat_get_property() 210 val->intval = bat->level == 100000 ? in s3c_adc_bat_get_property() 213 val->intval = bat->status; in s3c_adc_bat_get_property() 216 val->intval = 100000; in s3c_adc_bat_get_property() 219 val->intval = 0; in s3c_adc_bat_get_property() 222 val->intval = bat->level; in s3c_adc_bat_get_property() 225 val->intval = bat->volt_value; in s3c_adc_bat_get_property() 228 val->intval = bat->cur_value; in s3c_adc_bat_get_property()
|
D | ds2760_battery.c | 414 val->intval = di->charge_status; in ds2760_battery_get_property() 424 val->intval = di->voltage_uV; in ds2760_battery_get_property() 427 val->intval = di->current_uA; in ds2760_battery_get_property() 430 val->intval = di->rated_capacity; in ds2760_battery_get_property() 433 val->intval = di->full_active_uAh; in ds2760_battery_get_property() 436 val->intval = di->empty_uAh; in ds2760_battery_get_property() 439 val->intval = di->accum_current_uAh; in ds2760_battery_get_property() 442 val->intval = di->temp_C; in ds2760_battery_get_property() 445 val->intval = di->life_sec; in ds2760_battery_get_property() 448 val->intval = di->rem_capacity; in ds2760_battery_get_property() [all …]
|
D | wm97xx_battery.c | 62 val->intval = bat_status; in wm97xx_bat_get_property() 65 val->intval = pdata->batt_tech; in wm97xx_bat_get_property() 69 val->intval = wm97xx_read_bat(bat_ps); in wm97xx_bat_get_property() 75 val->intval = wm97xx_read_temp(bat_ps); in wm97xx_bat_get_property() 81 val->intval = pdata->max_voltage; in wm97xx_bat_get_property() 87 val->intval = pdata->min_voltage; in wm97xx_bat_get_property() 92 val->intval = 1; in wm97xx_bat_get_property()
|
D | goldfish_battery.c | 77 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_AC_ONLINE); in goldfish_ac_get_property() 96 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_STATUS); in goldfish_battery_get_property() 99 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_HEALTH); in goldfish_battery_get_property() 102 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_PRESENT); in goldfish_battery_get_property() 105 val->intval = POWER_SUPPLY_TECHNOLOGY_LION; in goldfish_battery_get_property() 108 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_CAPACITY); in goldfish_battery_get_property()
|
/drivers/net/wireless/ath/ath9k/ |
D | htc_drv_beacon.c | 73 u32 nexttbtt = 0, intval, tsftu; in ath9k_htc_beacon_config_sta() local 82 intval = bss_conf->beacon_interval; in ath9k_htc_beacon_config_sta() 98 sleepduration = intval; in ath9k_htc_beacon_config_sta() 100 sleepduration = intval; in ath9k_htc_beacon_config_sta() 109 num_beacons = tsftu / intval + 1; in ath9k_htc_beacon_config_sta() 110 offset = tsftu % intval; in ath9k_htc_beacon_config_sta() 113 nexttbtt += intval; in ath9k_htc_beacon_config_sta() 130 bs.bs_intval = intval; in ath9k_htc_beacon_config_sta() 132 bs.bs_dtimperiod = dtimperiod*intval; in ath9k_htc_beacon_config_sta() 133 bs.bs_nextdtim = bs.bs_nexttbtt + dtimcount*intval; in ath9k_htc_beacon_config_sta() [all …]
|
D | beacon.c | 271 u16 intval; in ath9k_beacon_choose_slot() local 282 intval = cur_conf->beacon_interval ? : ATH_DEFAULT_BINTVAL; in ath9k_beacon_choose_slot() 286 slot = (tsftu % (intval * ATH_BCBUF)) / intval; in ath9k_beacon_choose_slot() 414 u32 intval, bool reset_tsf) in ath9k_beacon_init() argument 422 ath9k_hw_beaconinit(ah, nexttbtt, intval); in ath9k_beacon_init() 438 u32 nexttbtt, intval; in ath9k_beacon_config_ap() local 441 intval = TU_TO_USEC(conf->beacon_interval); in ath9k_beacon_config_ap() 442 intval /= ATH_BCBUF; in ath9k_beacon_config_ap() 443 nexttbtt = intval; in ath9k_beacon_config_ap() 453 nexttbtt, intval, conf->beacon_interval); in ath9k_beacon_config_ap() [all …]
|
/drivers/staging/nvec/ |
D | nvec_power.c | 231 val->intval = power->on; in nvec_power_get_property() 247 val->intval = power->bat_status; in nvec_battery_get_property() 250 val->intval = power->bat_cap; in nvec_battery_get_property() 253 val->intval = power->bat_present; in nvec_battery_get_property() 256 val->intval = power->bat_voltage_now; in nvec_battery_get_property() 259 val->intval = power->bat_current_now; in nvec_battery_get_property() 262 val->intval = power->bat_current_avg; in nvec_battery_get_property() 265 val->intval = power->time_remain; in nvec_battery_get_property() 268 val->intval = power->charge_full_design; in nvec_battery_get_property() 271 val->intval = power->charge_last_full; in nvec_battery_get_property() [all …]
|
/drivers/platform/x86/ |
D | compal-laptop.c | 581 val->intval = bat_status(); in bat_get_property() 584 val->intval = bat_health(); in bat_get_property() 587 val->intval = bat_is_present(); in bat_get_property() 590 val->intval = bat_technology(); in bat_get_property() 593 val->intval = ec_read_u16(BAT_VOLTAGE_DESIGN) * 1000; in bat_get_property() 596 val->intval = ec_read_u16(BAT_VOLTAGE_NOW) * 1000; in bat_get_property() 599 val->intval = ec_read_s16(BAT_CURRENT_NOW) * 1000; in bat_get_property() 602 val->intval = ec_read_s16(BAT_CURRENT_AVG) * 1000; in bat_get_property() 605 val->intval = ec_read_u8(BAT_POWER) * 1000000; in bat_get_property() 608 val->intval = ec_read_u16(BAT_CHARGE_DESIGN) * 1000; in bat_get_property() [all …]
|