Lines Matching refs:priv

154 	struct max17055_data *const priv = dev->data;  in max17055_channel_get()  local
160 tmp = priv->voltage * 1250 / 16; in max17055_channel_get()
165 tmp = priv->ocv * 1250 / 16; in max17055_channel_get()
172 current_ma = current_to_ma(config->rsense_mohms, priv->avg_current); in max17055_channel_get()
177 valp->val1 = priv->state_of_charge / 256; in max17055_channel_get()
178 valp->val2 = priv->state_of_charge % 256 * 1000000 / 256; in max17055_channel_get()
181 valp->val1 = priv->internal_temp / 256; in max17055_channel_get()
182 valp->val2 = priv->internal_temp % 256 * 1000000 / 256; in max17055_channel_get()
185 tmp = capacity_to_ma(config->rsense_mohms, priv->full_cap); in max17055_channel_get()
189 tmp = capacity_to_ma(config->rsense_mohms, priv->remaining_cap); in max17055_channel_get()
193 if (priv->time_to_empty == 0xffff) { in max17055_channel_get()
198 tmp = priv->time_to_empty * 5625 / 60; in max17055_channel_get()
203 if (priv->time_to_full == 0xffff) { in max17055_channel_get()
208 tmp = priv->time_to_full * 5625 / 60; in max17055_channel_get()
213 valp->val1 = priv->cycle_count / 100; in max17055_channel_get()
214 valp->val2 = priv->cycle_count % 100 * 10000; in max17055_channel_get()
217 tmp = capacity_to_ma(config->rsense_mohms, priv->design_cap); in max17055_channel_get()
240 struct max17055_data *priv = dev->data; in max17055_sample_fetch() local
244 ret = max17055_reg_read(dev, VCELL, &priv->voltage); in max17055_sample_fetch()
252 ret = max17055_reg_read(dev, VFOCV, &priv->ocv); in max17055_sample_fetch()
259 ret = max17055_reg_read(dev, AVG_CURRENT, &priv->avg_current); in max17055_sample_fetch()
266 ret = max17055_reg_read(dev, REP_SOC, &priv->state_of_charge); in max17055_sample_fetch()
273 ret = max17055_reg_read(dev, INT_TEMP, &priv->internal_temp); in max17055_sample_fetch()
280 ret = max17055_reg_read(dev, REP_CAP, &priv->remaining_cap); in max17055_sample_fetch()
287 ret = max17055_reg_read(dev, FULL_CAP_REP, &priv->full_cap); in max17055_sample_fetch()
294 ret = max17055_reg_read(dev, TTE, &priv->time_to_empty); in max17055_sample_fetch()
301 ret = max17055_reg_read(dev, TTF, &priv->time_to_full); in max17055_sample_fetch()
308 ret = max17055_reg_read(dev, CYCLES, &priv->cycle_count); in max17055_sample_fetch()
315 ret = max17055_reg_read(dev, DESIGN_CAP, &priv->design_cap); in max17055_sample_fetch()