From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Marc Zyngier <marc.zyngier@arm.com>, linux-gpio@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Jason Cooper <jason@lakedaemon.net>,
Rob Herring <robh@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
David Daney <david.daney@cavium.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Jassi Brar <jaswinder.singh@linaro.org>,
Masahiro Yamada <yamada.masahiro@socionext.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH v5 1/3] irqdomain: export of_phandle_args_to_fwspec
Date: Wed, 13 Sep 2017 17:56:28 +0900 [thread overview]
Message-ID: <1505292990-22957-2-git-send-email-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <1505292990-22957-1-git-send-email-yamada.masahiro@socionext.com>
This helper will be useful for irqchip drivers that need to convert
DT binding into IRQ fwspec.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
This patch is necessary for my GPIO driver.
Since it is trivial enough, I hope Marc will allow this to go
though the GPIO subsystem.
If this patch is rejected, I can copy this function into my GPIO
driver, but I'd like to avoid code duplication.
include/linux/irqdomain.h | 2 ++
kernel/irq/irqdomain.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 81e4889..440772c 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -259,6 +259,8 @@ extern void irq_set_default_host(struct irq_domain *host);
extern int irq_domain_alloc_descs(int virq, unsigned int nr_irqs,
irq_hw_number_t hwirq, int node,
const struct cpumask *affinity);
+extern void of_phandle_args_to_fwspec(struct of_phandle_args *irq_data,
+ struct irq_fwspec *fwspec);
static inline struct fwnode_handle *of_node_to_fwnode(struct device_node *node)
{
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index e84b705..e34cd63 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -727,8 +727,8 @@ static int irq_domain_translate(struct irq_domain *d,
return 0;
}
-static void of_phandle_args_to_fwspec(struct of_phandle_args *irq_data,
- struct irq_fwspec *fwspec)
+void of_phandle_args_to_fwspec(struct of_phandle_args *irq_data,
+ struct irq_fwspec *fwspec)
{
int i;
@@ -738,6 +738,7 @@ static void of_phandle_args_to_fwspec(struct of_phandle_args *irq_data,
for (i = 0; i < irq_data->args_count; i++)
fwspec->param[i] = irq_data->args[i];
}
+EXPORT_SYMBOL_GPL(of_phandle_args_to_fwspec);
unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec)
{
--
2.7.4
next prev parent reply other threads:[~2017-09-13 8:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 8:56 [PATCH v5 0/3] gpio: uniphier: UniPhier GPIO driver Masahiro Yamada
2017-09-13 8:56 ` Masahiro Yamada [this message]
2017-09-21 11:34 ` [PATCH v5 1/3] irqdomain: export of_phandle_args_to_fwspec Linus Walleij
2017-09-21 12:04 ` Masahiro Yamada
2017-09-25 10:11 ` Thomas Gleixner
2017-09-27 2:42 ` Masahiro Yamada
2017-09-13 8:56 ` [PATCH v5 2/3] dt-bindings: gpio: uniphier: add UniPhier GPIO binding Masahiro Yamada
2017-09-13 8:56 ` [PATCH v5 3/3] gpio: uniphier: add UniPhier GPIO controller driver Masahiro Yamada
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=1505292990-22957-2-git-send-email-yamada.masahiro@socionext.com \
--to=yamada.masahiro@socionext.com \
--cc=david.daney@cavium.com \
--cc=jason@lakedaemon.net \
--cc=jaswinder.singh@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mhiramat@kernel.org \
--cc=robh@kernel.org \
--cc=tglx@linutronix.de \
/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