Lines Matching defs:bix
111 acpi_battery_bix_valid(struct acpi_bix *bix)
114 return (bix->lfcap != 0);
126 struct acpi_bix *bix;
146 bix = malloc(sizeof(*bix), M_TEMP, M_WAITOK | M_ZERO);
176 ACPI_BATT_GET_INFO(batt_dev, bix, sizeof(*bix)) != 0)
181 !acpi_battery_bix_valid(bix))
200 if (bix->units == ACPI_BIX_UNITS_MA && bix->dvol != 0 && dev == NULL) {
201 bst[i].rate = (bst[i].rate * bix->dvol) / 1000;
202 bst[i].cap = (bst[i].cap * bix->dvol) / 1000;
203 bix->lfcap = (bix->lfcap * bix->dvol) / 1000;
207 * The calculation above may set bix->lfcap to zero. This was
211 if (!acpi_battery_bix_valid(bix))
219 if (bst[i].cap > bix->lfcap)
220 bst[i].cap = bix->lfcap;
223 bi[i].cap = (100 * bst[i].cap) / bix->lfcap;
228 total_lfcap += bix->lfcap;
295 free(bix, M_TEMP);
399 bzero(&ioctl_arg->bix, sizeof(ioctl_arg->bix));
400 error = ACPI_BATT_GET_INFO(dev, &ioctl_arg->bix,
401 sizeof(ioctl_arg->bix));
424 acpi_battery_clean_str(ioctl_arg->bix.model,
425 sizeof(ioctl_arg->bix.model));
426 acpi_battery_clean_str(ioctl_arg->bix.serial,
427 sizeof(ioctl_arg->bix.serial));
428 acpi_battery_clean_str(ioctl_arg->bix.type,
429 sizeof(ioctl_arg->bix.type));
430 acpi_battery_clean_str(ioctl_arg->bix.oeminfo,
431 sizeof(ioctl_arg->bix.oeminfo));