From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
To: <marc.zyngier@arm.com>, <tglx@linutronix.de>,
<jason@lakedaemon.net>, <rjw@rjwysocki.net>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Will Deacon <will.deacon@arm.com>,
Catalin Marinas <Catalin.Marinas@arm.com>,
<hanjun.guo@linaro.org>, <tomasz.nowicki@linaro.org>,
<graeme.gregory@linaro.org>, <dhdang@apm.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-acpi@vger.kernel.org>,
Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Subject: [PATCH v5 3/5] irqdomain: Introduce irq_domain_get_irqchip_fwnode_name helper function
Date: Tue, 8 Dec 2015 17:48:04 -0800 [thread overview]
Message-ID: <1449625686-5594-4-git-send-email-Suravee.Suthikulpanit@amd.com> (raw)
In-Reply-To: <1449625686-5594-1-git-send-email-Suravee.Suthikulpanit@amd.com>
This patch adds an accessor function to retrieve struct irqchip_fwid.name.
Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
---
include/linux/irqdomain.h | 1 +
kernel/irq/irqdomain.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index d72fabc..c0a95a9 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -187,6 +187,7 @@ static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d)
#ifdef CONFIG_IRQ_DOMAIN
struct fwnode_handle *irq_domain_alloc_fwnode(void *data);
void irq_domain_free_fwnode(struct fwnode_handle *fwnode);
+const char *irq_domain_get_irqchip_fwnode_name(struct fwnode_handle *fwnode);
struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,
irq_hw_number_t hwirq_max, int direct_max,
const struct irq_domain_ops *ops,
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 7f34d98..a8c1cf6 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -79,6 +79,24 @@ void irq_domain_free_fwnode(struct fwnode_handle *fwnode)
}
/**
+ * irq_domain_get_irqchip_fwnode_name - Retrieve associated name of
+ * specified irqchip fwnode
+ * @fwnode: Specified fwnode_handle
+ *
+ * Returns associated name of the specified fwnode, or NULL on failure.
+ */
+const char *irq_domain_get_irqchip_fwnode_name(struct fwnode_handle *fwnode)
+{
+ struct irqchip_fwid *fwid;
+
+ if (!is_fwnode_irqchip(fwnode))
+ return NULL;
+
+ fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
+ return fwid->name;
+}
+
+/**
* __irq_domain_add() - Allocate a new irq_domain data structure
* @of_node: optional device-tree node of the interrupt controller
* @size: Size of linear map; 0 for radix mapping only
--
2.1.0
WARNING: multiple messages have this Message-ID (diff)
From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
To: marc.zyngier@arm.com, tglx@linutronix.de, jason@lakedaemon.net,
rjw@rjwysocki.net
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
graeme.gregory@linaro.org,
Catalin Marinas <Catalin.Marinas@arm.com>,
dhdang@apm.com, Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org, tomasz.nowicki@linaro.org,
linux-acpi@vger.kernel.org, hanjun.guo@linaro.org,
Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 3/5] irqdomain: Introduce irq_domain_get_irqchip_fwnode_name helper function
Date: Tue, 8 Dec 2015 17:48:04 -0800 [thread overview]
Message-ID: <1449625686-5594-4-git-send-email-Suravee.Suthikulpanit@amd.com> (raw)
In-Reply-To: <1449625686-5594-1-git-send-email-Suravee.Suthikulpanit@amd.com>
This patch adds an accessor function to retrieve struct irqchip_fwid.name.
Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
---
include/linux/irqdomain.h | 1 +
kernel/irq/irqdomain.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index d72fabc..c0a95a9 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -187,6 +187,7 @@ static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d)
#ifdef CONFIG_IRQ_DOMAIN
struct fwnode_handle *irq_domain_alloc_fwnode(void *data);
void irq_domain_free_fwnode(struct fwnode_handle *fwnode);
+const char *irq_domain_get_irqchip_fwnode_name(struct fwnode_handle *fwnode);
struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,
irq_hw_number_t hwirq_max, int direct_max,
const struct irq_domain_ops *ops,
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 7f34d98..a8c1cf6 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -79,6 +79,24 @@ void irq_domain_free_fwnode(struct fwnode_handle *fwnode)
}
/**
+ * irq_domain_get_irqchip_fwnode_name - Retrieve associated name of
+ * specified irqchip fwnode
+ * @fwnode: Specified fwnode_handle
+ *
+ * Returns associated name of the specified fwnode, or NULL on failure.
+ */
+const char *irq_domain_get_irqchip_fwnode_name(struct fwnode_handle *fwnode)
+{
+ struct irqchip_fwid *fwid;
+
+ if (!is_fwnode_irqchip(fwnode))
+ return NULL;
+
+ fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
+ return fwid->name;
+}
+
+/**
* __irq_domain_add() - Allocate a new irq_domain data structure
* @of_node: optional device-tree node of the interrupt controller
* @size: Size of linear map; 0 for radix mapping only
--
2.1.0
WARNING: multiple messages have this Message-ID (diff)
From: Suravee.Suthikulpanit@amd.com (Suravee Suthikulpanit)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 3/5] irqdomain: Introduce irq_domain_get_irqchip_fwnode_name helper function
Date: Tue, 8 Dec 2015 17:48:04 -0800 [thread overview]
Message-ID: <1449625686-5594-4-git-send-email-Suravee.Suthikulpanit@amd.com> (raw)
In-Reply-To: <1449625686-5594-1-git-send-email-Suravee.Suthikulpanit@amd.com>
This patch adds an accessor function to retrieve struct irqchip_fwid.name.
Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
---
include/linux/irqdomain.h | 1 +
kernel/irq/irqdomain.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index d72fabc..c0a95a9 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -187,6 +187,7 @@ static inline struct device_node *irq_domain_get_of_node(struct irq_domain *d)
#ifdef CONFIG_IRQ_DOMAIN
struct fwnode_handle *irq_domain_alloc_fwnode(void *data);
void irq_domain_free_fwnode(struct fwnode_handle *fwnode);
+const char *irq_domain_get_irqchip_fwnode_name(struct fwnode_handle *fwnode);
struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,
irq_hw_number_t hwirq_max, int direct_max,
const struct irq_domain_ops *ops,
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 7f34d98..a8c1cf6 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -79,6 +79,24 @@ void irq_domain_free_fwnode(struct fwnode_handle *fwnode)
}
/**
+ * irq_domain_get_irqchip_fwnode_name - Retrieve associated name of
+ * specified irqchip fwnode
+ * @fwnode: Specified fwnode_handle
+ *
+ * Returns associated name of the specified fwnode, or NULL on failure.
+ */
+const char *irq_domain_get_irqchip_fwnode_name(struct fwnode_handle *fwnode)
+{
+ struct irqchip_fwid *fwid;
+
+ if (!is_fwnode_irqchip(fwnode))
+ return NULL;
+
+ fwid = container_of(fwnode, struct irqchip_fwid, fwnode);
+ return fwid->name;
+}
+
+/**
* __irq_domain_add() - Allocate a new irq_domain data structure
* @of_node: optional device-tree node of the interrupt controller
* @size: Size of linear map; 0 for radix mapping only
--
2.1.0
next prev parent reply other threads:[~2015-12-09 1:49 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 1:48 [PATCH v5 0/5] gicv2m: acpi: Add ACPI support for GICv2m MSI Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 1:48 ` [PATCH v5 1/5] acpi: pci: Setup MSI domain for ACPI based pci devices Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 10:13 ` Marc Zyngier
2015-12-09 10:13 ` Marc Zyngier
2015-12-09 10:13 ` Marc Zyngier
2015-12-09 17:41 ` Suravee Suthikulanit
2015-12-09 17:41 ` Suravee Suthikulanit
2015-12-09 17:41 ` Suravee Suthikulanit
2015-12-09 1:48 ` [PATCH v5 2/5] irqdomain: introduce is_fwnode_irqchip helper Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 10:20 ` Marc Zyngier
2015-12-09 10:20 ` Marc Zyngier
2015-12-09 10:20 ` Marc Zyngier
2015-12-09 1:48 ` Suravee Suthikulpanit [this message]
2015-12-09 1:48 ` [PATCH v5 3/5] irqdomain: Introduce irq_domain_get_irqchip_fwnode_name helper function Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 1:48 ` [PATCH v5 4/5] gicv2m: Refactor to prepare for ACPI support Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 10:25 ` Marc Zyngier
2015-12-09 10:25 ` Marc Zyngier
2015-12-09 10:25 ` Marc Zyngier
2015-12-09 1:48 ` [PATCH v5 5/5] gicv2m: acpi: Introducing GICv2m " Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 1:48 ` Suravee Suthikulpanit
2015-12-09 10:38 ` Marc Zyngier
2015-12-09 10:38 ` Marc Zyngier
2015-12-09 10:38 ` Marc Zyngier
2015-12-09 18:02 ` Suravee Suthikulanit
2015-12-09 18:02 ` Suravee Suthikulanit
2015-12-09 18:02 ` Suravee Suthikulanit
2015-12-09 18:16 ` Marc Zyngier
2015-12-09 18:16 ` Marc Zyngier
2015-12-09 18:51 ` Suravee Suthikulanit
2015-12-09 18:51 ` Suravee Suthikulanit
2015-12-09 18:51 ` Suravee Suthikulanit
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=1449625686-5594-4-git-send-email-Suravee.Suthikulpanit@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=Catalin.Marinas@arm.com \
--cc=dhdang@apm.com \
--cc=graeme.gregory@linaro.org \
--cc=hanjun.guo@linaro.org \
--cc=jason@lakedaemon.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=marc.zyngier@arm.com \
--cc=rjw@rjwysocki.net \
--cc=tglx@linutronix.de \
--cc=tomasz.nowicki@linaro.org \
--cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.