acpi: Add support for SSDT generation

Some devices need to generate code for the Secondary System Descriptor
Table (SSDT). Add a method to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff --git a/include/dm/acpi.h b/include/dm/acpi.h
index dfda88e..e956e49 100644
--- a/include/dm/acpi.h
+++ b/include/dm/acpi.h
@@ -74,6 +74,19 @@
 	 * @return 0 if OK, -ve on error
 	 */
 	int (*write_tables)(const struct udevice *dev, struct acpi_ctx *ctx);
+
+	/**
+	 * fill_ssdt() - Generate SSDT code for a device
+	 *
+	 * This is called to create the SSDT code. The method should write out
+	 * whatever ACPI code is needed by this device. It will end up in the
+	 * SSDT table.
+	 *
+	 * @dev: Device to write
+	 * @ctx: ACPI context to use
+	 * @return 0 if OK, -ve on error
+	 */
+	int (*fill_ssdt)(const struct udevice *dev, struct acpi_ctx *ctx);
 };
 
 #define device_get_acpi_ops(dev)	((dev)->driver->acpi_ops)
@@ -118,6 +131,16 @@
  */
 int acpi_write_dev_tables(struct acpi_ctx *ctx);
 
+/**
+ * acpi_fill_ssdt() - Generate ACPI tables for SSDT
+ *
+ * This is called to create the SSDT code for all devices.
+ *
+ * @ctx: ACPI context to use
+ * @return 0 if OK, -ve on error
+ */
+int acpi_fill_ssdt(struct acpi_ctx *ctx);
+
 #endif /* __ACPI__ */
 
 #endif