1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <amdblocks/acpi.h>
4 #include <amdblocks/gpio.h>
5 #include <amdblocks/pmlib.h>
10 static struct chipset_power_state chipset_state
;
12 void fill_chipset_state(void)
14 acpi_fill_pm_gpe_state(&chipset_state
.gpe_state
);
15 gpio_fill_wake_state(&chipset_state
.gpio_state
);
18 void elog_gsmi_cb_platform_log_wake_source(void)
21 acpi_log_events(&chipset_state
);
24 static void add_chipset_state_cbmem(int unused
)
26 struct chipset_power_state
*state
;
28 state
= cbmem_add(CBMEM_ID_POWER_STATE
, sizeof(*state
));
31 memcpy(state
, &chipset_state
, sizeof(*state
));
34 CBMEM_CREATION_HOOK(add_chipset_state_cbmem
);