Lines Matching refs:tmp_val
73 uint16_t tmp_val = 0; in sbs_gauge_get_prop() local
77 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_AVG_CURRENT, &tmp_val); in sbs_gauge_get_prop()
78 val->avg_current = tmp_val * 1000; in sbs_gauge_get_prop()
81 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_CYCLE_COUNT, &tmp_val); in sbs_gauge_get_prop()
82 val->cycle_count = tmp_val; in sbs_gauge_get_prop()
85 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_CURRENT, &tmp_val); in sbs_gauge_get_prop()
86 val->current = (int16_t)tmp_val * 1000; in sbs_gauge_get_prop()
89 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_FULL_CAPACITY, &tmp_val); in sbs_gauge_get_prop()
90 val->full_charge_capacity = tmp_val * 1000; in sbs_gauge_get_prop()
93 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_REM_CAPACITY, &tmp_val); in sbs_gauge_get_prop()
94 val->remaining_capacity = tmp_val * 1000; in sbs_gauge_get_prop()
97 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_RUNTIME2EMPTY, &tmp_val); in sbs_gauge_get_prop()
98 val->runtime_to_empty = tmp_val; in sbs_gauge_get_prop()
101 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_AVG_TIME2FULL, &tmp_val); in sbs_gauge_get_prop()
102 val->runtime_to_full = tmp_val; in sbs_gauge_get_prop()
105 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_MANUFACTURER_ACCESS, &tmp_val); in sbs_gauge_get_prop()
106 val->sbs_mfr_access_word = tmp_val; in sbs_gauge_get_prop()
109 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_ASOC, &tmp_val); in sbs_gauge_get_prop()
110 val->absolute_state_of_charge = tmp_val; in sbs_gauge_get_prop()
113 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_RSOC, &tmp_val); in sbs_gauge_get_prop()
114 val->relative_state_of_charge = tmp_val; in sbs_gauge_get_prop()
117 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_TEMP, &tmp_val); in sbs_gauge_get_prop()
118 val->temperature = tmp_val; in sbs_gauge_get_prop()
121 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_VOLTAGE, &tmp_val); in sbs_gauge_get_prop()
122 val->voltage = tmp_val * 1000; in sbs_gauge_get_prop()
125 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_BATTERY_MODE, &tmp_val); in sbs_gauge_get_prop()
126 val->sbs_mode = tmp_val; in sbs_gauge_get_prop()
129 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_CHG_CURRENT, &tmp_val); in sbs_gauge_get_prop()
130 val->chg_current = tmp_val * 1000; in sbs_gauge_get_prop()
133 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_CHG_VOLTAGE, &tmp_val); in sbs_gauge_get_prop()
134 val->chg_voltage = tmp_val * 1000; in sbs_gauge_get_prop()
137 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_FLAGS, &tmp_val); in sbs_gauge_get_prop()
138 val->fg_status = tmp_val; in sbs_gauge_get_prop()
141 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_NOM_CAPACITY, &tmp_val); in sbs_gauge_get_prop()
142 val->design_cap = tmp_val; in sbs_gauge_get_prop()
145 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_DESIGN_VOLTAGE, &tmp_val); in sbs_gauge_get_prop()
146 val->design_volt = tmp_val; in sbs_gauge_get_prop()
149 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_AR, &tmp_val); in sbs_gauge_get_prop()
150 val->sbs_at_rate = tmp_val; in sbs_gauge_get_prop()
153 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_ARTTF, &tmp_val); in sbs_gauge_get_prop()
154 val->sbs_at_rate_time_to_full = tmp_val; in sbs_gauge_get_prop()
157 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_ARTTE, &tmp_val); in sbs_gauge_get_prop()
158 val->sbs_at_rate_time_to_empty = tmp_val; in sbs_gauge_get_prop()
161 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_AROK, &tmp_val); in sbs_gauge_get_prop()
162 val->sbs_at_rate_ok = tmp_val; in sbs_gauge_get_prop()
165 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_REM_CAPACITY_ALARM, &tmp_val); in sbs_gauge_get_prop()
166 val->sbs_remaining_capacity_alarm = tmp_val; in sbs_gauge_get_prop()
169 rc = sbs_cmd_reg_read(dev, SBS_GAUGE_CMD_REM_TIME_ALARM, &tmp_val); in sbs_gauge_get_prop()
170 val->sbs_remaining_time_alarm = tmp_val; in sbs_gauge_get_prop()
202 uint16_t tmp_val = 0; in sbs_gauge_set_prop() local
209 val.sbs_mfr_access_word = tmp_val; in sbs_gauge_set_prop()
214 val.sbs_remaining_capacity_alarm = tmp_val; in sbs_gauge_set_prop()
219 val.sbs_remaining_time_alarm = tmp_val; in sbs_gauge_set_prop()
223 val.sbs_mode = tmp_val; in sbs_gauge_set_prop()
227 val.sbs_at_rate = tmp_val; in sbs_gauge_set_prop()