Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __ACPI_BATTERY_H
0003 #define __ACPI_BATTERY_H
0004 
0005 #include <linux/power_supply.h>
0006 
0007 #define ACPI_BATTERY_CLASS "battery"
0008 
0009 #define ACPI_BATTERY_NOTIFY_STATUS  0x80
0010 #define ACPI_BATTERY_NOTIFY_INFO    0x81
0011 #define ACPI_BATTERY_NOTIFY_THRESHOLD   0x82
0012 
0013 struct acpi_battery_hook {
0014     const char *name;
0015     int (*add_battery)(struct power_supply *battery);
0016     int (*remove_battery)(struct power_supply *battery);
0017     struct list_head list;
0018 };
0019 
0020 void battery_hook_register(struct acpi_battery_hook *hook);
0021 void battery_hook_unregister(struct acpi_battery_hook *hook);
0022 
0023 #endif