Home
last modified time | relevance | path

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

123456

/linux/drivers/power/supply/
A Dapm_power.c59 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()
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()
266 empty.intval = 0; in calculate_capacity()
269 if (full.intval - empty.intval) in calculate_capacity()
270 ret = ((cur.intval - empty.intval) * 100L) / in calculate_capacity()
[all …]
A Dolpc_battery.c77 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 Drn5t618_power.c195 val->intval = 0; in rn5t618_battery_present()
197 val->intval = 1; in rn5t618_battery_present()
243 val->intval = v; in rn5t618_battery_capacity()
276 val->intval = res * 60; in rn5t618_battery_tte()
294 val->intval = res * 60; in rn5t618_battery_ttf()
302 if (val->intval < CHG_MIN_CUR) in rn5t618_battery_set_current_limit()
339 val->intval = res * 1000; in rn5t618_battery_charge_full()
354 val->intval = res * 1000; in rn5t618_battery_charge_now()
453 val->intval = online; in rn5t618_adp_get_property()
573 val->intval = online; in rn5t618_usb_get_property()
[all …]
A Dcpcap-battery.c406 *val = prop.intval; in cpcap_battery_get_charger_status()
577 val->intval = 1; in cpcap_battery_get_property()
579 val->intval = 0; in cpcap_battery_get_property()
618 val->intval = latest->current_ua; in cpcap_battery_get_property()
648 val->intval = clamp(val->intval, 0, ddata->charge_full); in cpcap_battery_get_property()
649 val->intval = val->intval * 100 / ddata->charge_full; in cpcap_battery_get_property()
670 if (val->intval < 0) { in cpcap_battery_get_property()
677 val->intval = 0; in cpcap_battery_get_property()
691 val->intval = ddata->charge_full; in cpcap_battery_get_property()
733 val.intval = const_charge_voltage; in cpcap_battery_update_charger()
[all …]
A Daxp20x_usb_power.c196 &val->intval); in axp20x_usb_power_get_property()
222 &val->intval); in axp20x_usb_power_get_property()
266 val->intval = in axp20x_usb_power_get_property()
284 int intval) in axp813_usb_power_set_online() argument
294 int intval) in axp20x_usb_power_set_voltage_min() argument
298 switch (intval) { in axp20x_usb_power_set_voltage_min()
320 int intval) in axp813_usb_power_set_current_max() argument
324 switch (intval) { in axp813_usb_power_set_current_max()
345 int intval) in axp20x_usb_power_set_current_max() argument
349 switch (intval) { in axp20x_usb_power_set_current_max()
[all …]
A Daxp20x_ac_power.c75 val->intval = POWER_SUPPLY_HEALTH_GOOD; in axp20x_ac_power_get_property()
79 val->intval = POWER_SUPPLY_HEALTH_UNKNOWN; in axp20x_ac_power_get_property()
98 if (val->intval && power->has_acin_path_sel) { in axp20x_ac_power_get_property()
115 val->intval *= 1000; in axp20x_ac_power_get_property()
125 val->intval *= 1000; in axp20x_ac_power_get_property()
134 val->intval = AXP813_VHOLD_REG_TO_UV(reg); in axp20x_ac_power_get_property()
145 if (val->intval > 4000000) in axp20x_ac_power_get_property()
146 val->intval = 4000000; in axp20x_ac_power_get_property()
170 if (val->intval < 4000000 || val->intval > 4700000) in axp813_ac_power_set_property()
175 AXP813_VHOLD_UV_TO_BIT(val->intval)); in axp813_ac_power_set_property()
[all …]
A Dadp5061.c236 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 = 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()
512 val->intval = adp5061_iend[regval]; in adp5061_get_termination_current()
548 val->intval = 0; in adp5061_get_property()
[all …]
A Dsbs-battery.c544 val->intval = 0; in sbs_get_ti_battery_presence_and_health()
556 val->intval = 0; in sbs_get_ti_battery_presence_and_health()
558 val->intval = 1; in sbs_get_ti_battery_presence_and_health()
590 val->intval = 0; in sbs_get_battery_presence_and_health()
627 val->intval = ret; in sbs_get_battery_property()
630 val->intval = in sbs_get_battery_property()
633 val->intval = in sbs_get_battery_property()
636 val->intval = in sbs_get_battery_property()
639 val->intval = in sbs_get_battery_property()
671 val->intval = 0; in sbs_get_battery_property()
[all …]
A Dmp2629_charger.c166 val->intval = chval * 1000; in mp2629_read_adc()
193 if (val->intval < props[fld].min || val->intval > props[fld].max) in mp2629_set_prop()
214 val->intval = (vnow.intval * 100) / vlim.intval; in mp2629_get_battery_capacity()
215 val->intval = min(val->intval, MP2629_MAX_BATT_CAPACITY); in mp2629_get_battery_capacity()
238 val->intval = 4520000; in mp2629_charger_battery_get_prop()
242 val->intval = 4670000; in mp2629_charger_battery_get_prop()
267 val->intval = POWER_SUPPLY_HEALTH_GOOD; in mp2629_charger_battery_get_prop()
291 val->intval = POWER_SUPPLY_STATUS_FULL; in mp2629_charger_battery_get_prop()
372 val->intval = POWER_SUPPLY_USB_TYPE_SDP; in mp2629_charger_usb_get_prop()
375 val->intval = POWER_SUPPLY_USB_TYPE_CDP; in mp2629_charger_usb_get_prop()
[all …]
A Dgoldfish_battery.c71 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 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()
78 val->intval *= 20000; in lego_ev3_battery_get_property()
79 val->intval /= 15; in lego_ev3_battery_get_property()
82 val->intval = POWER_SUPPLY_SCOPE_SYSTEM; in lego_ev3_battery_get_property()
[all …]
A Daxp20x_battery.c254 &val->intval); in axp20x_battery_get_prop()
260 val->intval = axp20x_batt->max_ccc; in axp20x_battery_get_prop()
279 val->intval *= 1000; in axp20x_battery_get_prop()
290 val->intval = 100; in axp20x_battery_get_prop()
305 val->intval = reg & AXP209_FG_PERCENT; in axp20x_battery_get_prop()
310 &val->intval); in axp20x_battery_get_prop()
322 &val->intval); in axp20x_battery_get_prop()
327 val->intval *= 1000; in axp20x_battery_get_prop()
468 val->intval); in axp20x_battery_set_prop()
471 val->intval); in axp20x_battery_set_prop()
[all …]
A Dda9150-charger.c65 val->intval = v_val * 1000; in da9150_charger_vbus_voltage_now()
81 val->intval = i_val * 1000; in da9150_charger_ibus_current_avg()
97 val->intval = t_val / 100; in da9150_charger_tjunc_temp()
171 val->intval = POWER_SUPPLY_STATUS_FULL; in da9150_charger_battery_status()
191 val->intval = POWER_SUPPLY_HEALTH_COLD; in da9150_charger_battery_health()
204 val->intval = POWER_SUPPLY_HEALTH_DEAD; in da9150_charger_battery_health()
210 val->intval = POWER_SUPPLY_HEALTH_GOOD; in da9150_charger_battery_health()
225 val->intval = 0; in da9150_charger_battery_present()
227 val->intval = 1; in da9150_charger_battery_present()
279 val->intval = v_val * 1000; in da9150_charger_battery_voltage_now()
[all …]
A Dingenic-battery.c34 ret = iio_read_channel_processed(bat->channel, &val->intval); in ingenic_battery_get_property()
35 val->intval *= 1000; in ingenic_battery_get_property()
36 if (val->intval < info->voltage_min_design_uv) in ingenic_battery_get_property()
37 val->intval = POWER_SUPPLY_HEALTH_DEAD; in ingenic_battery_get_property()
38 else if (val->intval > info->voltage_max_design_uv) in ingenic_battery_get_property()
39 val->intval = POWER_SUPPLY_HEALTH_OVERVOLTAGE; in ingenic_battery_get_property()
41 val->intval = POWER_SUPPLY_HEALTH_GOOD; in ingenic_battery_get_property()
44 ret = iio_read_channel_processed(bat->channel, &val->intval); in ingenic_battery_get_property()
45 val->intval *= 1000; in ingenic_battery_get_property()
48 val->intval = info->voltage_min_design_uv; in ingenic_battery_get_property()
[all …]
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()
A Dtwl4030_madc_battery.c117 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 Dcros_usbpd-charger.c403 val->intval = port->psy_online; in cros_usbpd_charger_get_prop()
406 val->intval = port->psy_status; in cros_usbpd_charger_get_prop()
422 val->intval = -1; in cros_usbpd_charger_get_prop()
428 val->intval = -1; in cros_usbpd_charger_get_prop()
452 u16 intval; in cros_usbpd_charger_set_prop() local
459 if (val->intval < 0) in cros_usbpd_charger_set_prop()
460 intval = EC_POWER_LIMIT_NONE; in cros_usbpd_charger_set_prop()
462 intval = val->intval / 1000; in cros_usbpd_charger_set_prop()
471 input_current_limit = intval; in cros_usbpd_charger_set_prop()
483 intval); in cros_usbpd_charger_set_prop()
[all …]
A Dipaq_micro_battery.c138 val->intval = POWER_SUPPLY_TECHNOLOGY_NiCd; in micro_batt_get_property()
141 val->intval = POWER_SUPPLY_TECHNOLOGY_NiMH; in micro_batt_get_property()
144 val->intval = POWER_SUPPLY_TECHNOLOGY_LION; in micro_batt_get_property()
147 val->intval = POWER_SUPPLY_TECHNOLOGY_LIPO; in micro_batt_get_property()
150 val->intval = POWER_SUPPLY_TECHNOLOGY_UNKNOWN; in micro_batt_get_property()
155 val->intval = get_status(b); in micro_batt_get_property()
158 val->intval = 4700000; in micro_batt_get_property()
161 val->intval = get_capacity(b); in micro_batt_get_property()
164 val->intval = mb->temperature; in micro_batt_get_property()
167 val->intval = mb->voltage; in micro_batt_get_property()
[all …]
A Dbq256xx_charger.c934 val->intval = bq->init_data.ichg_max; in bq256xx_get_battery_property()
978 val->intval = in bq256xx_get_charger_property()
985 val->intval = in bq256xx_get_charger_property()
992 val->intval = in bq256xx_get_charger_property()
1081 val->intval = state.online; in bq256xx_get_charger_property()
1088 val->intval = ret; in bq256xx_get_charger_property()
1095 val->intval = ret; in bq256xx_get_charger_property()
1102 val->intval = ret; in bq256xx_get_charger_property()
1109 val->intval = ret; in bq256xx_get_charger_property()
1116 val->intval = ret; in bq256xx_get_charger_property()
[all …]
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()
A Dtest_power.c47 val->intval = ac_online; in test_power_get_ac_property()
61 val->intval = usb_online; in test_power_get_usb_property()
84 val->intval = battery_status; in test_power_get_battery_property()
90 val->intval = battery_health; in test_power_get_battery_property()
93 val->intval = battery_present; in test_power_get_battery_property()
103 val->intval = battery_capacity; in test_power_get_battery_property()
110 val->intval = 100; in test_power_get_battery_property()
114 val->intval = 3600; in test_power_get_battery_property()
117 val->intval = 26; in test_power_get_battery_property()
120 val->intval = battery_voltage; in test_power_get_battery_property()
[all …]
A Dqcom_smbb.c503 val->intval = chg->attr[ATTR_USBIN_IMAX]; in smbb_usbin_get_property()
506 val->intval = 2500000; in smbb_usbin_get_property()
526 val->intval); in smbb_usbin_set_property()
551 val->intval = chg->attr[ATTR_DCIN_IMAX]; in smbb_dcin_get_property()
554 val->intval = 2500000; in smbb_dcin_get_property()
574 val->intval); in smbb_dcin_set_property()
609 val->intval = POWER_SUPPLY_STATUS_FULL; in smbb_battery_get_property()
619 val->intval = POWER_SUPPLY_HEALTH_GOOD; in smbb_battery_get_property()
623 val->intval = POWER_SUPPLY_HEALTH_COLD; in smbb_battery_get_property()
637 val->intval = chg->attr[ATTR_BAT_IMAX]; in smbb_battery_get_property()
[all …]
/linux/drivers/usb/typec/ucsi/
A Dpsy.c35 val->intval = UCSI_PSY_OFFLINE; in ucsi_psy_get_online()
38 val->intval = UCSI_PSY_FIXED_ONLINE; in ucsi_psy_get_online()
59 val->intval = 0; in ucsi_psy_get_voltage_min()
76 val->intval = 0; in ucsi_psy_get_voltage_max()
86 val->intval = 0; in ucsi_psy_get_voltage_max()
105 val->intval = 0; in ucsi_psy_get_voltage_now()
115 val->intval = 0; in ucsi_psy_get_voltage_now()
132 val->intval = 0; in ucsi_psy_get_current_max()
145 val->intval = 0; in ucsi_psy_get_current_max()
159 val->intval = 0; in ucsi_psy_get_current_now()
[all …]
/linux/drivers/net/wireless/ath/ath9k/
A Dcommon-beacon.c57 conf->intval = conf->beacon_interval; in ath9k_cmn_beacon_config_sta()
63 dtim_intval = conf->intval * conf->dtim_period; in ath9k_cmn_beacon_config_sta()
70 conf->nexttbtt = ath9k_get_next_tbtt(ah, tsf, conf->intval); in ath9k_cmn_beacon_config_sta()
72 bs->bs_intval = TU_TO_USEC(conf->intval); in ath9k_cmn_beacon_config_sta()
101 conf->intval)); in ath9k_cmn_beacon_config_sta()
119 conf->intval = TU_TO_USEC(conf->beacon_interval); in ath9k_cmn_beacon_config_adhoc()
122 conf->nexttbtt = conf->intval; in ath9k_cmn_beacon_config_adhoc()
135 conf->nexttbtt, conf->intval, conf->beacon_interval); in ath9k_cmn_beacon_config_adhoc()
151 conf->intval = TU_TO_USEC(conf->beacon_interval); in ath9k_cmn_beacon_config_ap()
152 conf->intval /= bc_buf; in ath9k_cmn_beacon_config_ap()
[all …]
/linux/drivers/staging/nvec/
A Dnvec_power.c230 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 …]

Completed in 48 milliseconds

123456