Home
last modified time | relevance | path

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

1234567

/linux-6.12.1/drivers/usb/typec/ucsi/
Dpsy.c50 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()
72 val->intval = pdo_fixed_voltage(pdo) * 1000; in ucsi_psy_get_voltage_min()
78 val->intval = UCSI_TYPEC_VSAFE5V * 1000; in ucsi_psy_get_voltage_min()
81 val->intval = 0; in ucsi_psy_get_voltage_min()
96 val->intval = pdo_fixed_voltage(pdo) * 1000; in ucsi_psy_get_voltage_max()
98 val->intval = 0; in ucsi_psy_get_voltage_max()
105 val->intval = UCSI_TYPEC_VSAFE5V * 1000; in ucsi_psy_get_voltage_max()
108 val->intval = 0; in ucsi_psy_get_voltage_max()
[all …]
/linux-6.12.1/drivers/power/supply/
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()
65 if (bp->full.intval > bp->max_energy) { in __find_main_battery()
67 bp->max_energy = bp->full.intval; in __find_main_battery()
93 if (bp.max_energy > bp.max_charge * bp.full.intval) in find_main_battery()
99 if (bp.max_charge > 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()
[all …]
Dqcom_battmgr.c132 } intval; member
500 val->intval = battmgr->status.status; in qcom_battmgr_bat_get_property()
503 val->intval = battmgr->info.charge_type; in qcom_battmgr_bat_get_property()
506 val->intval = battmgr->status.health; in qcom_battmgr_bat_get_property()
509 val->intval = battmgr->info.present; in qcom_battmgr_bat_get_property()
512 val->intval = battmgr->info.technology; in qcom_battmgr_bat_get_property()
515 val->intval = battmgr->info.cycle_count; in qcom_battmgr_bat_get_property()
518 val->intval = battmgr->info.voltage_max_design; in qcom_battmgr_bat_get_property()
521 val->intval = battmgr->info.voltage_max; in qcom_battmgr_bat_get_property()
524 val->intval = battmgr->status.voltage_now; in qcom_battmgr_bat_get_property()
[all …]
Dolpc_battery.c77 val->intval = !!(status & BAT_STAT_AC); in olpc_ac_get_prop()
103 val->intval = POWER_SUPPLY_STATUS_CHARGING; in olpc_bat_get_status()
105 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in olpc_bat_get_status()
107 val->intval = POWER_SUPPLY_STATUS_FULL; in olpc_bat_get_status()
109 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in olpc_bat_get_status()
113 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in olpc_bat_get_status()
115 val->intval = POWER_SUPPLY_STATUS_FULL; in olpc_bat_get_status()
117 val->intval = POWER_SUPPLY_STATUS_CHARGING; in olpc_bat_get_status()
134 val->intval = POWER_SUPPLY_HEALTH_GOOD; in olpc_bat_get_health()
138 val->intval = POWER_SUPPLY_HEALTH_OVERHEAT; in olpc_bat_get_health()
[all …]
Dmm8013.c103 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()
153 val->intval = POWER_SUPPLY_HEALTH_COLD; in mm8013_get_property()
155 val->intval = POWER_SUPPLY_HEALTH_OVERCURRENT; in mm8013_get_property()
157 val->intval = POWER_SUPPLY_HEALTH_UNSPEC_FAILURE; in mm8013_get_property()
[all …]
Drn5t618_power.c165 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in rn5t618_battery_status()
168 val->intval = rn5t618_decode_status(v); in rn5t618_battery_status()
170 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in rn5t618_battery_status()
187 val->intval = 0; in rn5t618_battery_present()
189 val->intval = 1; in rn5t618_battery_present()
204 val->intval = res * 2 * 2500 / 4095 * 1000; in rn5t618_battery_voltage_now()
220 val->intval = sign_extend32(res, 13) * 1000; in rn5t618_battery_current_now()
235 val->intval = v; in rn5t618_battery_capacity()
250 val->intval = sign_extend32(res, 11) * 10 / 16; in rn5t618_battery_temp()
268 val->intval = res * 60; in rn5t618_battery_tte()
[all …]
Daxp20x_usb_power.c190 val->intval = POWER_SUPPLY_USB_TYPE_SDP; in axp20x_get_usb_type()
193 val->intval = POWER_SUPPLY_USB_TYPE_CDP; in axp20x_get_usb_type()
196 val->intval = POWER_SUPPLY_USB_TYPE_DCP; in axp20x_get_usb_type()
199 val->intval = POWER_SUPPLY_USB_TYPE_UNKNOWN; in axp20x_get_usb_type()
219 val->intval = AXP20X_VBUS_VHOLD_uV(v); in axp20x_usb_power_get_property()
224 &val->intval); in axp20x_usb_power_get_property()
232 val->intval *= 1000; in axp20x_usb_power_get_property()
241 val->intval = ret * 1700; /* 1 step = 1.7 mV */ in axp20x_usb_power_get_property()
249 val->intval = power->axp_data->curr_lim_table[v]; in axp20x_usb_power_get_property()
251 val->intval = power->axp_data->curr_lim_table[ in axp20x_usb_power_get_property()
[all …]
Daxp20x_battery.c288 val->intval = !!(reg & AXP20X_PWR_OP_BATT_PRESENT); in axp20x_battery_get_prop()
298 val->intval = POWER_SUPPLY_STATUS_CHARGING; in axp20x_battery_get_prop()
308 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in axp20x_battery_get_prop()
321 val->intval = POWER_SUPPLY_STATUS_FULL; in axp20x_battery_get_prop()
323 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in axp20x_battery_get_prop()
333 val->intval = POWER_SUPPLY_HEALTH_DEAD; in axp20x_battery_get_prop()
337 val->intval = POWER_SUPPLY_HEALTH_GOOD; in axp20x_battery_get_prop()
342 &val->intval); in axp20x_battery_get_prop()
348 val->intval = axp20x_batt->max_ccc; in axp20x_battery_get_prop()
358 ret = iio_read_channel_processed(axp20x_batt->batt_chrg_i, &val->intval); in axp20x_battery_get_prop()
[all …]
Dadp5061.c186 val->intval = adp5061_in_current_lim[mode] * 1000; in adp5061_get_input_current_limit()
236 val->intval = adp5061_vmin[regval] * 1000; in adp5061_get_min_voltage()
252 val->intval = adp5061_const_chg_vmax[mode] * 1000; in adp5061_get_chg_volt_lim()
271 val->intval = adp5061_vmax[regval] * 1000; in adp5061_get_max_voltage()
349 val->intval = adp5061_const_ichg[regval] * 1000; in adp5061_get_const_chg_current()
365 val->intval = adp5061_prechg_current[regval] * 1000; in adp5061_get_prechg_current()
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()
451 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in adp5061_get_charger_status()
[all …]
Dcpcap-battery.c485 *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()
665 val->intval = POWER_SUPPLY_STATUS_FULL; in cpcap_battery_get_property()
669 val->intval = POWER_SUPPLY_STATUS_CHARGING; in cpcap_battery_get_property()
671 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in cpcap_battery_get_property()
674 val->intval = ddata->config.info.technology; in cpcap_battery_get_property()
677 val->intval = cpcap_battery_get_voltage(ddata); in cpcap_battery_get_property()
680 val->intval = ddata->config.info.voltage_max_design; in cpcap_battery_get_property()
683 val->intval = ddata->config.info.voltage_min_design; in cpcap_battery_get_property()
[all …]
Daxp20x_ac_power.c74 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()
86 val->intval = !!(reg & AXP20X_PWR_STATUS_ACIN_PRESENT); in axp20x_ac_power_get_property()
94 val->intval = !!(reg & AXP20X_PWR_STATUS_ACIN_AVAIL); in axp20x_ac_power_get_property()
97 if (val->intval && power->has_acin_path_sel) { in axp20x_ac_power_get_property()
103 val->intval = !!(reg & AXP813_ACIN_PATH_SEL); in axp20x_ac_power_get_property()
109 ret = iio_read_channel_processed(power->acin_v, &val->intval); in axp20x_ac_power_get_property()
114 val->intval *= 1000; in axp20x_ac_power_get_property()
119 ret = iio_read_channel_processed(power->acin_i, &val->intval); in axp20x_ac_power_get_property()
124 val->intval *= 1000; in axp20x_ac_power_get_property()
[all …]
Dmp2629_charger.c158 val->intval = chval * 1000; in mp2629_read_adc()
174 val->intval = rval * props[fld].step + props[fld].min; in mp2629_get_prop()
185 if (val->intval < props[fld].min || val->intval > props[fld].max) in mp2629_set_prop()
188 rval = (val->intval - props[fld].min) / props[fld].step; 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()
261 val->intval = POWER_SUPPLY_HEALTH_OVERVOLTAGE; in mp2629_charger_battery_get_prop()
[all …]
Dsbs-battery.c481 static int sbs_status_correct(struct i2c_client *client, int *intval) in sbs_status_correct() argument
492 if (*intval != POWER_SUPPLY_STATUS_FULL && ret == 0) in sbs_status_correct()
493 *intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in sbs_status_correct()
495 if (*intval == POWER_SUPPLY_STATUS_FULL) { in sbs_status_correct()
498 *intval = POWER_SUPPLY_STATUS_CHARGING; in sbs_status_correct()
500 *intval = POWER_SUPPLY_STATUS_DISCHARGING; in sbs_status_correct()
531 val->intval = 0; /* battery removed */ in sbs_get_ti_battery_presence_and_health()
538 val->intval = 0; /* battery removed */ in sbs_get_ti_battery_presence_and_health()
544 val->intval = 0; in sbs_get_ti_battery_presence_and_health()
556 val->intval = 0; in sbs_get_ti_battery_presence_and_health()
[all …]
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()
77 val->intval = GOLDFISH_BATTERY_READ(data, BATTERY_CURRENT_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()
[all …]
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 …]
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()
126 val->intval = twl4030_madc_bat_get_voltage(bat) * 1000; 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()
[all …]
Dda9150-charger.c46 val->intval = (psy == charger->supply_online) ? 1 : 0; in da9150_charger_supply_online()
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()
146 val->intval = POWER_SUPPLY_STATUS_DISCHARGING; in da9150_charger_battery_status()
159 val->intval = POWER_SUPPLY_STATUS_CHARGING; in da9150_charger_battery_status()
166 val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; in da9150_charger_battery_status()
169 val->intval = POWER_SUPPLY_STATUS_FULL; in da9150_charger_battery_status()
172 val->intval = POWER_SUPPLY_STATUS_UNKNOWN; in da9150_charger_battery_status()
189 val->intval = POWER_SUPPLY_HEALTH_COLD; in da9150_charger_battery_health()
[all …]
Dtest_power.c49 val->intval = ac_online; in test_power_get_ac_property()
63 val->intval = usb_online; in test_power_get_usb_property()
86 val->intval = battery_status; in test_power_get_battery_property()
89 val->intval = POWER_SUPPLY_CHARGE_TYPE_FAST; in test_power_get_battery_property()
92 val->intval = battery_health; in test_power_get_battery_property()
95 val->intval = battery_present; in test_power_get_battery_property()
98 val->intval = battery_technology; in test_power_get_battery_property()
101 val->intval = POWER_SUPPLY_CAPACITY_LEVEL_NORMAL; in test_power_get_battery_property()
105 val->intval = battery_capacity; in test_power_get_battery_property()
108 val->intval = battery_charge_counter; in test_power_get_battery_property()
[all …]
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()
Dip5xxx_power.c326 return ip5xxx_battery_get_status(ip5xxx, &val->intval); in ip5xxx_battery_get_property()
329 return ip5xxx_battery_get_charge_type(ip5xxx, &val->intval); in ip5xxx_battery_get_property()
332 return ip5xxx_battery_get_health(ip5xxx, &val->intval); in ip5xxx_battery_get_property()
335 return ip5xxx_battery_get_voltage_max(ip5xxx, &val->intval); in ip5xxx_battery_get_property()
341 val->intval = 2600000 + DIV_ROUND_CLOSEST(raw * 26855, 100); in ip5xxx_battery_get_property()
348 val->intval = 2600000 + DIV_ROUND_CLOSEST(raw * 26855, 100); in ip5xxx_battery_get_property()
355 val->intval = DIV_ROUND_CLOSEST(raw * 149197, 200); in ip5xxx_battery_get_property()
364 val->intval = 100000 * rval; in ip5xxx_battery_get_property()
368 val->intval = 100000 * 0x1f; in ip5xxx_battery_get_property()
381 val->intval = vmax + 14000 * (rval >> 1); in ip5xxx_battery_get_property()
[all …]
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 …]
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()
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 …]
/linux-6.12.1/drivers/net/wireless/ath/ath9k/
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()
85 bs->bs_bmissthreshold = DIV_ROUND_UP(conf->bmiss_timeout, 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()
[all …]
/linux-6.12.1/drivers/staging/nvec/
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()
267 val->intval = power->charge_full_design; in nvec_battery_get_property()
270 val->intval = power->charge_last_full; in nvec_battery_get_property()
[all …]

1234567