Lines Matching defs:bat
107 struct power_supply bat;
138 #define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
535 battery->bat.properties = charge_battery_props;
536 battery->bat.num_properties =
539 battery->bat.properties = energy_battery_props;
540 battery->bat.num_properties =
544 battery->bat.name = acpi_device_bid(battery->device);
545 battery->bat.type = POWER_SUPPLY_TYPE_BATTERY;
546 battery->bat.get_property = acpi_battery_get_property;
548 result = power_supply_register(&battery->device->dev, &battery->bat);
551 return device_create_file(battery->bat.dev, &alarm_attr);
556 if (!battery->bat.dev)
558 device_remove_file(battery->bat.dev, &alarm_attr);
559 power_supply_unregister(&battery->bat);
560 battery->bat.dev = NULL;
620 if (!battery->bat.dev)
913 old = battery->bat.dev;
923 if (old && battery->bat.dev)
924 power_supply_changed(&battery->bat);