From: Heiner Kallweit <hkallweit1@gmail.com>
To: Jerome Brunet <jbrunet@baylibre.com>,
Mark Rutland <mark.rutland@arm.com>,
Marc Zyngier <marc.zyngier@arm.com>,
Linus Walleij <linus.walleij@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Thomas Gleixner <tglx@linutronix.de>,
Rob Herring <robh@kernel.org>,
Neil Armstrong <narmstrong@baylibre.com>
Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
linux-gpio@vger.kernel.org,
"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
Thierry Reding <treding@nvidia.com>
Subject: [PATCH v7 5/9] gpiolib: export gpiochip_irq_reqres and gpiochip_irq_relres
Date: Sat, 10 Jun 2017 23:57:37 +0200 [thread overview]
Message-ID: <e6618077-a362-86cf-7cd3-f46de39396e4@gmail.com> (raw)
In-Reply-To: <5b352c8d-a426-fa73-58b7-0c935979492b@gmail.com>
Customized versions of the request_resources and release_resources
callbacks usually just extend what is available in gpiochip_irq_reqres
and gpiochip_irq_relres. Therefore export them to make them available
to gpio drivers.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/gpio/gpiolib.c | 6 ++++--
include/linux/gpio/driver.h | 3 +++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 62ffb4e2..4d666abb 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1643,7 +1643,7 @@ static const struct irq_domain_ops gpiochip_domain_ops = {
.xlate = irq_domain_xlate_twocell,
};
-static int gpiochip_irq_reqres(struct irq_data *d)
+int gpiochip_irq_reqres(struct irq_data *d)
{
struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
@@ -1659,14 +1659,16 @@ static int gpiochip_irq_reqres(struct irq_data *d)
}
return 0;
}
+EXPORT_SYMBOL_GPL(gpiochip_irq_reqres);
-static void gpiochip_irq_relres(struct irq_data *d)
+void gpiochip_irq_relres(struct irq_data *d)
{
struct gpio_chip *chip = irq_data_get_irq_chip_data(d);
gpiochip_unlock_as_irq(chip, d->hwirq);
module_put(chip->gpiodev->owner);
}
+EXPORT_SYMBOL_GPL(gpiochip_irq_relres);
static int gpiochip_to_irq(struct gpio_chip *chip, unsigned offset)
{
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index af20369e..82bc27de 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -262,6 +262,9 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip,
bool nested,
struct lock_class_key *lock_key);
+int gpiochip_irq_reqres(struct irq_data *d);
+void gpiochip_irq_relres(struct irq_data *d);
+
#ifdef CONFIG_LOCKDEP
/*
--
2.13.1
next prev parent reply other threads:[~2017-06-10 21:57 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-10 21:37 [PATCH v7 0/9] pinctrl: meson: add support for GPIO IRQs Heiner Kallweit
2017-06-10 21:57 ` [PATCH v7 1/9] irqchip: add Amlogic Meson GPIO irqchip driver Heiner Kallweit
[not found] ` <b33ccc5c-f383-97e7-44e6-d6e1f104e26c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-12 8:54 ` Jerome Brunet
[not found] ` <1497257685.3086.4.camel-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>
2017-06-12 20:50 ` Heiner Kallweit
2017-06-13 8:31 ` Marc Zyngier
[not found] ` <91b20fc4-4969-02a6-cc47-ff711f604342-5wv7dgnIgG8@public.gmane.org>
2017-06-15 13:10 ` Heiner Kallweit
2017-06-15 13:27 ` Marc Zyngier
[not found] ` <9129464d-b7b6-a8f6-8671-091fc30e3161-5wv7dgnIgG8@public.gmane.org>
2017-06-15 15:24 ` Heiner Kallweit
2017-06-15 16:04 ` Marc Zyngier
[not found] ` <daddce59-cfe6-a1be-6c04-093dfa146aca-5wv7dgnIgG8@public.gmane.org>
2017-06-15 16:37 ` Heiner Kallweit
2017-06-15 16:58 ` Marc Zyngier
2017-06-15 19:03 ` Heiner Kallweit
[not found] ` <025c570f-71a2-7fe7-a83b-a4ef4be47db9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-16 8:23 ` Marc Zyngier
2017-06-10 21:57 ` [PATCH v7 2/9] dt-bindings: add Amlogic Meson GPIO interrupt-controller DT binding documentation Heiner Kallweit
2017-06-13 8:53 ` Marc Zyngier
[not found] ` <c5453bc7-1d8b-d3a1-91ac-779734444b8b-5wv7dgnIgG8@public.gmane.org>
2017-06-15 8:34 ` Heiner Kallweit
2017-06-23 18:33 ` Rob Herring
2017-06-10 21:57 ` [PATCH v7 3/9] ARM: dts: meson: add GPIO interrupt-controller support Heiner Kallweit
2017-06-10 21:57 ` [PATCH v7 4/9] ARM64: " Heiner Kallweit
2017-06-10 21:57 ` Heiner Kallweit [this message]
[not found] ` <e6618077-a362-86cf-7cd3-f46de39396e4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-20 8:47 ` [PATCH v7 5/9] gpiolib: export gpiochip_irq_reqres and gpiochip_irq_relres Linus Walleij
[not found] ` <5b352c8d-a426-fa73-58b7-0c935979492b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-10 21:58 ` [PATCH v7 6/9] pinctrl: meson: add support for GPIO interrupts Heiner Kallweit
2017-06-10 21:58 ` [PATCH v7 8/9] ARM: dts: meson: mark gpio controllers as interrupt controllers Heiner Kallweit
2017-06-10 21:58 ` [PATCH v7 7/9] pinctrl: meson: update DT binding documentation Heiner Kallweit
2017-06-10 21:58 ` [PATCH v7 9/9] ARM64: dts: meson: mark gpio controllers as interrupt controllers Heiner Kallweit
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=e6618077-a362-86cf-7cd3-f46de39396e4@gmail.com \
--to=hkallweit1@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=narmstrong@baylibre.com \
--cc=robh@kernel.org \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--cc=treding@nvidia.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;
as well as URLs for NNTP newsgroup(s).