summaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/achware.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-09-04 18:27:43 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-09-04 19:34:15 +0200
commitf06011ad6225b0f5e4246b5635c5570fa8d5fcdf (patch)
tree39e4d0fe7a3b7bfb307d20e1786cd7ee0da367fc /drivers/acpi/acpica/achware.h
parent84b43284af40742abeb2cdd6998a4084866ba015 (diff)
ACPICA: Introduce acpi_hw_gpe_read() and acpi_hw_gpe_write()
Now that GPE blocks are validated at the initialization time, accesses to GPE registers can be made more straightforward by ommitting all of the redundant checks in acpi_hw_read() and acpi_hw_write() and only invoking the OS-provided helper for the given type of access (read or write) and the address space holding these registers. For this reason, introduce simplified routines for accessing GPE registers, acpi_hw_gpe_read() and acpi_hw_gpe_write(), designed in accordance with the above observation, and modify all of the code accessing GPE registers to use them instead of acpi_hw_read() and acpi_hw_write(), respectively. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/achware.h')
-rw-r--r--drivers/acpi/acpica/achware.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/achware.h b/drivers/acpi/acpica/achware.h
index f1f644b58b15..4dba7229f9c1 100644
--- a/drivers/acpi/acpica/achware.h
+++ b/drivers/acpi/acpica/achware.h
@@ -78,6 +78,10 @@ acpi_status acpi_hw_validate_io_block(u64 address, u32 bit_width, u32 count);
/*
* hwgpe - GPE support
*/
+acpi_status acpi_hw_gpe_read(u64 *value, struct acpi_generic_address *reg);
+
+acpi_status acpi_hw_gpe_write(u64 value, struct acpi_generic_address *reg);
+
u32 acpi_hw_get_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info);
acpi_status