From: "tip-bot2 for Zhipeng Wang" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Zhipeng Wang <zhipeng.wang_1@nxp.com>,
Thomas Gleixner <tglx@kernel.org>, Frank Li <Frank.Li@nxp.com>,
Radu Rendec <radu@rendec.net>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/drivers] genirq/irqdomain: Add devm_irq_domain_create_linear()
Date: Sun, 08 Nov 2026 21:49:30 -0000 [thread overview]
Message-ID: <179417457003.2093942.1785721322103496168.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20261104073759.386777-10-Zhipeng.wang_1@oss.nxp.com>
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: 8d095487a7bef8e060e360eb4d85aa1ab0fd62a5
Gitweb: https://git.kernel.org/tip/8d095487a7bef8e060e360eb4d85aa1ab0fd62a5
Author: Zhipeng Wang <zhipeng.wang_1@nxp.com>
AuthorDate: Wed, 04 Nov 2026 16:37:57 +09:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Sun, 08 Nov 2026 22:43:44 +01:00
genirq/irqdomain: Add devm_irq_domain_create_linear()
irq_domain_create_linear() has no devres-managed counterpart, so a
driver that wants a linear revmap domain tied to the device lifetime has
to open-code an irq_domain_info and call devm_irq_domain_instantiate()
directly.
Add devm_irq_domain_create_linear() as the devres-managed sibling of
irq_domain_create_linear(): it builds the same linear-revmap
irq_domain_info and hands it to devm_irq_domain_instantiate(), so the
domain is removed when the owning device is unbound. The return
convention matches irq_domain_create_linear() (NULL on failure).
Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Radu Rendec <radu@rendec.net>
Link: https://patch.msgid.link/20261104073759.386777-10-Zhipeng.wang_1@oss.nxp.com
---
include/linux/irqdomain.h | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 3ba75a4..d8caafc 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -457,6 +457,36 @@ static inline struct irq_domain *irq_domain_create_linear(struct fwnode_handle *
return IS_ERR(d) ? NULL : d;
}
+/**
+ * devm_irq_domain_create_linear - Allocate and register a linear revmap
+ * irq_domain tied to the device lifetime.
+ * @dev: Device that owns the domain. The domain is removed via devres
+ * when the device is unbound.
+ * @fwnode: pointer to interrupt controller's FW node.
+ * @size: Number of interrupts in the domain.
+ * @ops: map/unmap domain callbacks
+ * @host_data: Controller private data pointer
+ *
+ * Returns: Newly created irq_domain, or NULL on failure.
+ */
+static inline struct irq_domain *devm_irq_domain_create_linear(struct device *dev,
+ struct fwnode_handle *fwnode,
+ unsigned int size,
+ const struct irq_domain_ops *ops,
+ void *host_data)
+{
+ const struct irq_domain_info info = {
+ .fwnode = fwnode,
+ .size = size,
+ .hwirq_max = size,
+ .ops = ops,
+ .host_data = host_data,
+ };
+ struct irq_domain *d = devm_irq_domain_instantiate(dev, &info);
+
+ return IS_ERR(d) ? NULL : d;
+}
+
static inline struct irq_domain *irq_domain_create_tree(struct fwnode_handle *fwnode,
const struct irq_domain_ops *ops,
void *host_data)
next prev parent reply other threads:[~2026-11-08 21:49 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 7:37 [PATCH v7 00/10] irqchip/imx-irqsteer: Allow building as module Zhipeng.wang_1
2026-11-04 7:37 ` [PATCH v7 01/10] irqchip/imx-irqsteer: Call chained_irq_exit() on the handler error path Zhipeng.wang_1
2026-11-08 21:49 ` [tip: irq/drivers] " tip-bot2 for Zhipeng Wang
2026-11-04 7:37 ` [PATCH v7 02/10] irqchip/imx-irqsteer: Validate IRQ count before creating domain Zhipeng.wang_1
2026-11-08 21:49 ` [tip: irq/drivers] " tip-bot2 for Fabio Estevam
2026-11-09 3:31 ` Borislav Petkov
2026-11-09 4:12 ` Radu Rendec
2026-11-04 7:37 ` [PATCH v7 03/10] irqchip/imx-irqsteer: Dispose of parent IRQ mappings in remove() Zhipeng.wang_1
2026-11-08 21:49 ` [tip: irq/drivers] " tip-bot2 for Zhipeng Wang
2026-11-04 7:37 ` [PATCH v7 04/10] irqchip/imx-irqsteer: Convert to devm_pm_runtime_set_active_enabled() Zhipeng.wang_1
2026-11-08 21:49 ` [tip: irq/drivers] " tip-bot2 for Zhipeng Wang
2026-11-04 7:37 ` [PATCH v7 05/10] irqchip/imx-irqsteer: Mask all interrupts in probe() Zhipeng.wang_1
2026-11-08 21:49 ` [tip: irq/drivers] " tip-bot2 for Zhipeng Wang
2026-11-04 7:37 ` [PATCH v7 06/10] irqchip/imx-irqsteer: Let devres own the clock Zhipeng.wang_1
2026-11-08 21:49 ` [tip: irq/drivers] " tip-bot2 for Zhipeng Wang
2026-11-04 7:37 ` [PATCH v7 07/10] irqchip/imx-irqsteer: Allow building as module Zhipeng.wang_1
2026-11-08 21:49 ` [tip: irq/drivers] " tip-bot2 for Jindong Yue
2026-11-04 7:37 ` [PATCH v7 08/10] irqchip/imx-irqsteer: Dispose of child IRQ mappings in remove() Zhipeng.wang_1
2026-11-08 20:24 ` Radu Rendec
2026-11-08 21:49 ` [tip: irq/drivers] " tip-bot2 for Zhipeng Wang
2026-11-04 7:37 ` [PATCH v7 09/10] genirq/irqdomain: Add devm_irq_domain_create_linear() Zhipeng.wang_1
2026-11-08 21:49 ` tip-bot2 for Zhipeng Wang [this message]
2026-11-04 7:37 ` [PATCH v7 10/10] irqchip/imx-irqsteer: Use devm_irq_domain_create_linear() Zhipeng.wang_1
2026-11-08 20:30 ` Radu Rendec
2026-11-08 21:49 ` [tip: irq/drivers] " tip-bot2 for Zhipeng Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179417457003.2093942.1785721322103496168.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=Frank.Li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=radu@rendec.net \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
--cc=zhipeng.wang_1@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®