Lines Matching refs:capacity
26 #define DS2782_REG_RARC 0x06 /* Remaining active relative capacity */
38 #define DS2786_REG_RARC 0x02 /* Remaining active relative capacity */
49 int (*get_battery_capacity)(struct ds278x_info *info, int *capacity);
62 int capacity;
161 static int ds2782_get_capacity(struct ds278x_info *info, int *capacity)
169 *capacity = raw;
201 static int ds2786_get_capacity(struct ds278x_info *info, int *capacity)
209 /* Relative capacity is displayed with resolution 0.5 % */
210 *capacity = raw/2 ;
218 int capacity;
224 err = info->ops->get_battery_capacity(info, &capacity);
228 info->capacity = capacity;
230 if (capacity == 100)
280 int old_capacity = info->capacity;
284 if ((old_status != info->status) || (old_capacity != info->capacity))
422 info->capacity = 100;