Lines Matching defs:ccnt
111 struct ccnt {
148 static struct ccnt ccnt_data;
247 int *ccnt)
258 *ccnt = ((buf[0] & 0xff) << 8) | (buf[1] & 0xff);
264 static int calc_ccnt(struct pm860x_battery_info *info, struct ccnt *ccnt)
278 ccnt->pos += sum;
289 ccnt->neg += sum;
294 ccnt->spos += data;
304 ccnt->total_chg = (int) ((ccnt->pos * 18236) >> 40);
305 ccnt->total_dischg = (int) ((ccnt->neg * 18236) >> 40);
311 static int clear_ccnt(struct pm860x_battery_info *info, struct ccnt *ccnt)
315 memset(ccnt, 0, sizeof(*ccnt));
316 /* read to clear ccnt */
425 /* clear ccnt since battery is attached or dettached */