Skip to content

Commit 20e8ef5

Browse files
akhilr-nvwsakernel
authored andcommitted
docs: firmware-guide: ACPI: Add named interrupt doc
Add a detailed example of the named interrupts in the ACPI table. Signed-off-by: Akhil R <akhilrajeev@nvidia.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
1 parent ca0acb5 commit 20e8ef5

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Documentation/firmware-guide/acpi/enumeration.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,45 @@ In robust cases the client unfortunately needs to call
143143
acpi_dma_request_slave_chan_by_index() directly and therefore choose the
144144
specific FixedDMA resource by its index.
145145

146+
Named Interrupts
147+
================
148+
149+
Drivers enumerated via ACPI can have names to interrupts in the ACPI table
150+
which can be used to get the IRQ number in the driver.
151+
152+
The interrupt name can be listed in _DSD as 'interrupt-names'. The names
153+
should be listed as an array of strings which will map to the Interrupt()
154+
resource in the ACPI table corresponding to its index.
155+
156+
The table below shows an example of its usage::
157+
158+
Device (DEV0) {
159+
...
160+
Name (_CRS, ResourceTemplate() {
161+
...
162+
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) {
163+
0x20,
164+
0x24
165+
}
166+
})
167+
168+
Name (_DSD, Package () {
169+
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
170+
Package () {
171+
Package () {"interrupt-names",
172+
Package (2) {"default", "alert"}},
173+
}
174+
...
175+
})
176+
}
177+
178+
The interrupt name 'default' will correspond to 0x20 in Interrupt()
179+
resource and 'alert' to 0x24. Note that only the Interrupt() resource
180+
is mapped and not GpioInt() or similar.
181+
182+
The driver can call the function - fwnode_irq_get_byname() with the fwnode
183+
and interrupt name as arguments to get the corresponding IRQ number.
184+
146185
SPI serial bus support
147186
======================
148187

0 commit comments

Comments
 (0)