summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/acpi/acpigen.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/include/acpi/acpigen.h b/src/include/acpi/acpigen.h
index a99489de1f..dffde851f5 100644
--- a/src/include/acpi/acpigen.h
+++ b/src/include/acpi/acpigen.h
@@ -360,6 +360,7 @@ void acpigen_write_debug_integer(uint64_t val);
void acpigen_write_debug_op(uint8_t op);
void acpigen_write_if(void);
void acpigen_write_if_and(uint8_t arg1, uint8_t arg2);
+void acpigen_write_if_lequal_op_op(uint8_t op, uint8_t val);
void acpigen_write_if_lequal_op_int(uint8_t op, uint64_t val);
void acpigen_write_if_lequal_namestr_int(const char *namestr, uint64_t val);
void acpigen_write_else(void);
@@ -368,6 +369,7 @@ void acpigen_write_to_integer(uint8_t src, uint8_t dst);
void acpigen_write_byte_buffer(uint8_t *arr, size_t size);
void acpigen_write_return_byte_buffer(uint8_t *arr, size_t size);
void acpigen_write_return_singleton_buffer(uint8_t arg);
+void acpigen_write_return_op(uint8_t arg);
void acpigen_write_return_byte(uint8_t arg);
void acpigen_write_upc(enum acpi_upc_type type);
void acpigen_write_pld(const struct acpi_pld *pld);
@@ -439,6 +441,16 @@ void acpigen_write_indexfield(const char *idx, const char *data,
int get_cst_entries(acpi_cstate_t **);
/*
+ * Get element from package into specified destination op:
+ * <dest_op> = DeRefOf (<package_op>[<element])
+ *
+ * Example:
+ * acpigen_get_package_op_element(ARG0_OP, 0, LOCAL0_OP)
+ * Local0 = DeRefOf (Arg0[0])
+ */
+void acpigen_get_package_op_element(uint8_t package_op, unsigned int element, uint8_t dest_op);
+
+/*
* Soc-implemented functions for generating ACPI AML code for GPIO handling. All
* these functions are expected to use only Local5, Local6 and Local7
* variables. If the functions call into another ACPI method, then there is no
@@ -478,6 +490,14 @@ int acpigen_disable_tx_gpio(struct acpi_gpio *gpio);
*/
void acpigen_get_rx_gpio(struct acpi_gpio *gpio);
+/*
+ * Helper function for getting a TX GPIO value based on the GPIO polarity.
+ * The return value is stored in Local0 variable.
+ * This function ends up calling acpigen_soc_get_tx_gpio to make callbacks
+ * into SoC acpigen code
+ */
+void acpigen_get_tx_gpio(struct acpi_gpio *gpio);
+
/* refer to ACPI 6.4.3.5.3 Word Address Space Descriptor section for details */
void acpigen_resource_word(u16 res_type, u16 gen_flags, u16 type_flags, u16 gran,
u16 range_min, u16 range_max, u16 translation, u16 length);