Felix Held | 18b51e9 | 2021-05-08 01:30:30 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <acpi/acpigen.h> |
| 4 | #include <amdblocks/alib.h> |
| 5 | #include <types.h> |
| 6 | |
| 7 | void acpigen_dptc_call_alib(const char *buf_name, uint8_t *buffer, size_t size) |
| 8 | { |
| 9 | /* Name (buf_name, Buffer(size) {...} */ |
| 10 | acpigen_write_name(buf_name); |
| 11 | acpigen_write_byte_buffer(buffer, size); |
| 12 | |
| 13 | /* \_SB.ALIB(0xc, buf_name) */ |
| 14 | acpigen_emit_namestring("\\_SB.ALIB"); |
| 15 | acpigen_write_integer(ALIB_FUNCTION_DYNAMIC_POWER_THERMAL_CONFIG); |
| 16 | acpigen_emit_namestring(buf_name); |
| 17 | } |