Merge branches 'acpi-battery', 'acpi-doc' and 'acpi-pmic'
* acpi-battery: Revert "ACPI: battery: Add the ThinkPad "Not Charging" quirk" ACPI: battery: do not export degraded capacity values over 100 ACPI: battery: make function __battery_hook_unregister() static ACPI: battery: Add the ThinkPad "Not Charging" quirk thinkpad_acpi: Add support for battery thresholds power: add to_power_supply macro to the API battery: Add the battery hooking API * acpi-doc: ACPI: sysfs: Update device object sysfs documentation * acpi-pmic: ACPI / PMIC: Replace license boilerplate with SPDX license identifier
This commit is contained in:
21
include/acpi/battery.h
Normal file
21
include/acpi/battery.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef __ACPI_BATTERY_H
|
||||
#define __ACPI_BATTERY_H
|
||||
|
||||
#define ACPI_BATTERY_CLASS "battery"
|
||||
|
||||
#define ACPI_BATTERY_NOTIFY_STATUS 0x80
|
||||
#define ACPI_BATTERY_NOTIFY_INFO 0x81
|
||||
#define ACPI_BATTERY_NOTIFY_THRESHOLD 0x82
|
||||
|
||||
struct acpi_battery_hook {
|
||||
const char *name;
|
||||
int (*add_battery)(struct power_supply *battery);
|
||||
int (*remove_battery)(struct power_supply *battery);
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
void battery_hook_register(struct acpi_battery_hook *hook);
|
||||
void battery_hook_unregister(struct acpi_battery_hook *hook);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user