Lines Matching full:bat
31 #define ACPI_BATTERY_DIR_NAME "BAT%i"
55 struct power_supply *bat; member
543 battery->bat = power_supply_register(&sbs->device->dev, in acpi_battery_add()
545 if (IS_ERR(battery->bat)) { in acpi_battery_add()
546 result = PTR_ERR(battery->bat); in acpi_battery_add()
547 battery->bat = NULL; in acpi_battery_add()
551 result = device_create_file(&battery->bat->dev, &alarm_attr); in acpi_battery_add()
566 if (battery->bat) { in acpi_battery_remove()
568 device_remove_file(&battery->bat->dev, &alarm_attr); in acpi_battery_remove()
569 power_supply_unregister(battery->bat); in acpi_battery_remove()
606 struct acpi_battery *bat; in acpi_sbs_callback() local
620 bat = &sbs->battery[id]; in acpi_sbs_callback()
621 saved_battery_state = bat->present; in acpi_sbs_callback()
622 acpi_battery_read(bat); in acpi_sbs_callback()
623 if (saved_battery_state == bat->present) in acpi_sbs_callback()
625 kobject_uevent(&bat->bat->dev.kobj, KOBJ_CHANGE); in acpi_sbs_callback()