Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4773077pxb; Tue, 25 Jan 2022 19:11:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5xhwYS+zOHXwCAdvcuslimOmqAq6fBxoR0/l6DZenn3+exTHu/dcbtnntjoG3Vymok4ds X-Received: by 2002:a63:8c47:: with SMTP id q7mr17173713pgn.591.1643166692306; Tue, 25 Jan 2022 19:11:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643166692; cv=none; d=google.com; s=arc-20160816; b=EpzGC3I4iAhn4+sZUnsw1vIrD4s0yNgErBTR3wUKnKiN0n0o4jlR7fai4J6LFBRNE6 VsyuF1aXmYhPxcIeevbzGZOuo6oF49NIPMOLIMYNi/VkVBxFH013ot9/T9P6An0EM1oS YCll/J2HqZhURvkPnIYBqBjsKECWjdKnENn7w9l8sMqGJysH1zoIYrbRUZmS0uf6qLfw ilt/S3EUqHTSyvKUU24174C1ElOtWN7q0lUihe3hP7xM75hDsLGEWjEF5XGPj9QUsCSP uBrlz1vzMY6MAEFbSPjX5Thtg9dUFKMcab0OnM+jxooIzmwE7iRkNmD88sFFVxGAfmIe 9RkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=y+R3o3okOUEIZN8/dDxsGECLwf9ITaDap15PmIOOEJw=; b=g4FOQMcpo0R9P9X9hCzzoIxXSs2VVrEfp+bsbPlRQYQusbV7sFTTSYlV6VB5GRCYqj mfph/hiHKd7hk8ev7dw+pAcPJQpzhAW7jgX4K2ks5Mgk8tC6IlAPWbLyPMrkdvbnB8+u ANELWJek6DAxCsdWwUXNEsivoN3h/W6xWkGXJrta7u++GZtvz5SBmOq3jTFoeHl/tksN uoUrTwYwD7imcZGfGjKptxQDbCE8EmjS6j75BNlBlHfqNhbXoelzvg0V7XrgZxjiMCqG BJnP5NjN6G8g2jzsYuz2KjOxnZAuNmXOyS1l/45X4Z8JMjrx39PdN5TnPviUeWWQchzX txBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 17si1952269pjg.157.2022.01.25.19.11.20; Tue, 25 Jan 2022 19:11:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381048AbiAYR4z (ORCPT + 99 others); Tue, 25 Jan 2022 12:56:55 -0500 Received: from mail-yb1-f182.google.com ([209.85.219.182]:40758 "EHLO mail-yb1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357539AbiAYRzC (ORCPT ); Tue, 25 Jan 2022 12:55:02 -0500 Received: by mail-yb1-f182.google.com with SMTP id 23so63924631ybf.7; Tue, 25 Jan 2022 09:54:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=y+R3o3okOUEIZN8/dDxsGECLwf9ITaDap15PmIOOEJw=; b=tsaGoOSmVk7vaXbB33hs4k9q3BbeTHUtBXwyeQUuY62ng6sjhay1Kb4Lkgq/AUAgN+ 6qPdLnFELJywM6E1EE3SVz6+TRd+7bnuB0tpov/WrsG3Svjy7GrVu8HZ/CbIDGP+QNJe oQEbuXHgOXLaHVLD24h2Y9Y/kXEefHWPXYT5bsrULtvYDNCfjkm3GDoPUe8hDayhTVVO Kz9Ms1OfHUy3KbMJp18jW8fgRMT87MzcCpM93IUAuBEeSiuySK97rE0ZoYdf+6HoURyf NGnh9UrhQrCFuOxTSDngSUEDDCzYrcrpIda+jjDv+UFSx1suftZpy/p6ntJvcZR8tCCq RDoQ== X-Gm-Message-State: AOAM530pDc2Zout0EHUtZV5IwPRSuSgNf6aZjx1i3U89GfCmC64SQrv0 5jnhfKkCY70mzNNEEnxmMQt4tbgQ+yC8QKXnGf0= X-Received: by 2002:a25:1bd5:: with SMTP id b204mr34517304ybb.552.1643133297390; Tue, 25 Jan 2022 09:54:57 -0800 (PST) MIME-Version: 1.0 References: <1642851166-27096-1-git-send-email-akhilrajeev@nvidia.com> <1642851166-27096-3-git-send-email-akhilrajeev@nvidia.com> In-Reply-To: <1642851166-27096-3-git-send-email-akhilrajeev@nvidia.com> From: "Rafael J. Wysocki" Date: Tue, 25 Jan 2022 18:54:46 +0100 Message-ID: Subject: Re: [PATCH v4 2/3] docs: firmware-guide: ACPI: Add named interrupt doc To: Akhil R Cc: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Andy Shevchenko , =?UTF-8?Q?Christian_K=C3=B6nig?= , Dmitry Osipenko , Greg Kroah-Hartman , Jon Hunter , Laxman Dewangan , Len Brown , ACPI Devel Maling List , linux-i2c , Linux Kernel Mailing List , linux-tegra , "Rafael J. Wysocki" , Sumit Semwal , Thierry Reding , Wolfram Sang Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jan 22, 2022 at 12:33 PM Akhil R wrote: > > Add a detailed example of the named interrupts in the ACPI table. > > Signed-off-by: Akhil R Acked-by: Rafael J. Wysocki > --- > Documentation/firmware-guide/acpi/enumeration.rst | 39 +++++++++++++++++++++++ > 1 file changed, 39 insertions(+) > > diff --git a/Documentation/firmware-guide/acpi/enumeration.rst b/Documentation/firmware-guide/acpi/enumeration.rst > index 74b830b2..d002256 100644 > --- a/Documentation/firmware-guide/acpi/enumeration.rst > +++ b/Documentation/firmware-guide/acpi/enumeration.rst > @@ -143,6 +143,45 @@ In robust cases the client unfortunately needs to call > acpi_dma_request_slave_chan_by_index() directly and therefore choose the > specific FixedDMA resource by its index. > > +Named Interrupts > +================ > + > +Drivers enumerated via ACPI can have names to interrupts in the ACPI table > +which can be used to get the IRQ number in the driver. > + > +The interrupt name can be listed in _DSD as 'interrupt-names'. The names > +should be listed as an array of strings which will map to the Interrupt() > +resource in the ACPI table corresponding to its index. > + > +The table below shows an example of its usage:: > + > + Device (DEV0) { > + ... > + Name (_CRS, ResourceTemplate() { > + ... > + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { > + 0x20, > + 0x24 > + } > + }) > + > + Name (_DSD, Package () { > + ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), > + Package () { > + Package () {"interrupt-names", > + Package (2) {"default", "alert"}}, > + } > + ... > + }) > + } > + > +The interrupt name 'default' will correspond to 0x20 in Interrupt() > +resource and 'alert' to 0x24. Note that only the Interrupt() resource > +is mapped and not GpioInt() or similar. > + > +The driver can call the function - fwnode_irq_get_byname() with the fwnode > +and interrupt name as arguments to get the corresponding IRQ number. > + > SPI serial bus support > ====================== > > -- > 2.7.4 >