Kernel: Add support for ACPI Control Method Batteries
The implementation is kinda weird but it exposes some battery information to userspace!
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include <BAN/ScopeGuard.h>
|
||||
#include <BAN/StringView.h>
|
||||
#include <kernel/ACPI/ACPI.h>
|
||||
#include <kernel/ACPI/BatterySystem.h>
|
||||
#include <kernel/ACPI/AML/OpRegion.h>
|
||||
#include <kernel/BootInfo.h>
|
||||
#include <kernel/InterruptController.h>
|
||||
@@ -774,6 +775,13 @@ acpi_release_global_lock:
|
||||
return {};
|
||||
}
|
||||
|
||||
BAN::ErrorOr<void> ACPI::initialize_acpi_devices()
|
||||
{
|
||||
ASSERT(m_namespace);
|
||||
TRY(BatterySystem::initialize(*m_namespace));
|
||||
return {};
|
||||
}
|
||||
|
||||
void ACPI::acpi_event_task()
|
||||
{
|
||||
auto get_fixed_event =
|
||||
|
||||
Reference in New Issue
Block a user