ACPI: introduce ACPI GPIO controller driver
Subsystems (2)
RFC PATCH 1/1 ACPI: introduce ACPI GPIO controller driver
Quoted 1 line
From
998bd309b8cf758a26b35d3802429452aba8090dMon Sep 17 00:00:00 2001
From: Zhang Rui <[email protected]>
Date: Tue, 25 Sep 2012 09:40:08 +0800
Subject: [PATCH] ACPI: Introduce ACPI GPIO controller driver
Hardware Reduced ACPI platforms do not have SCI. Instead, it uses GPIO Interrupt connections to signal ACPI events. Thus there are GPIO Controller devices described in ACPI namespace. These GPIO controllers can either be used for ACPI events, or be used by other devices directly as Interrupt resources.
This patch introduces ACPI GPIO controller driver, together with ACPI 5.0 event model support.
If you want to get more details on ACPI 5 event model, please refer to section 5.6.6, ACPI 5.0 specification.
--- drivers/acpi/Makefile | 1 + drivers/acpi/bus.c | 1 + drivers/acpi/gpio.c | 450 +++++++++++++++++++++++++++++++++++++++++++ drivers/acpi/internal.h | 5 + include/acpi/acpi_drivers.h | 4 + 5 files changed, 461 insertions(+), 0 deletions(-) create mode 100644 drivers/acpi/gpio.c
drivers/acpi/Makefile +1 -0
@@ -34,6 +34,7 @@ acpi-y += bus.o glue.o acpi-y += scan.o acpi-y += processor_core.o acpi-y += ec.o +acpi-y += gpio.o acpi-$(CONFIG_ACPI_DOCK) += dock.o acpi-y += pci_root.o pci_link.o pci_irq.o pci_bind.o acpi-y += power.o
drivers/acpi/bus.c +1 -0
@@ -1071,6 +1071,7 @@ static int __init acpi_init(void)pci_mmcfg_late_init ();acpi_scan_init ();acpi_ec_init (); +acpi_gpio_init ();acpi_debugfs_init ();acpi_sleep_proc_init ();acpi_wakeup_device_init ();
drivers/acpi/gpio.c new file +450 -0
450 lines not on this page · raw message
drivers/acpi/internal.h +5 -0
@@ -74,6 +74,11 @@ void acpi_ec_block_transactions(void);void acpi_ec_unblock_transactions (void );void acpi_ec_unblock_transactions_early (void ); +/* -------------------------------------------------------------------------- +GPIO Controller +-------------------------------------------------------------------------- */ +int acpi_gpio_init (void ); +/*-------------------------------------------------------------------------- Suspend/Resume -------------------------------------------------------------------------- */
include/acpi/acpi_drivers.h +4 -0
@@ -79,6 +79,10 @@#define ACPI_FIXED_HARDWARE_EVENT 0x100/* -------------------------------------------------------------------------- +GPIO +-------------------------------------------------------------------------- */ +int acpi_device_get_gpio_irq (char *path,int pin,int *irq); +/* -------------------------------------------------------------------------- PCI -------------------------------------------------------------------------- */
Signature · 1 line
1.7.7.6