acpigen: Add acpigen_notify

A fairly common thing in ACPI is notifying a device when some kind of
device-specific event happens; this function simplifies writing this
pattern.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I0f18db9cc836ec9249604452f03ed9b4c6478827
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42102
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c
index bf1b373..a4a74f6 100644
--- a/src/acpi/acpigen.c
+++ b/src/acpi/acpigen.c
@@ -1964,3 +1964,10 @@
 			  (((uint64_t)address->part_id & 0xffff) << 8) |
 			  (((uint64_t)address->class & 0xff)));
 }
+
+void acpigen_notify(const char *namestr, int value)
+{
+	acpigen_emit_byte(NOTIFY_OP);
+	acpigen_emit_namestring(namestr);
+	acpigen_write_integer(value);
+}