linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Clement Leger <cleger@kalray.eu>
To: linux-kernel@vger.kernel.org
Cc: Clement Leger <cleger@kalray.eu>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	linux-gpio@vger.kernel.org
Subject: [PATCH 1/5] gpio: export acpi_gpiochip_request_interrupts in gpio/driver.h
Date: Wed,  4 Dec 2019 11:10:35 +0100	[thread overview]
Message-ID: <20191204101042.4275-2-cleger@kalray.eu> (raw)

dwapb-gpio driver which uses this function will be moved to pinctrl for
pinctrl support. Export this function in gpio/driver.h to allow using
it.

Signed-off-by: Clement Leger <cleger@kalray.eu>
---
 drivers/gpio/gpiolib-acpi.h |  4 ----
 include/linux/gpio/driver.h | 12 ++++++++++++
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpiolib-acpi.h b/drivers/gpio/gpiolib-acpi.h
index 1c6d65cf0629..ba2f187babe3 100644
--- a/drivers/gpio/gpiolib-acpi.h
+++ b/drivers/gpio/gpiolib-acpi.h
@@ -34,7 +34,6 @@ struct acpi_gpio_info {
 void acpi_gpiochip_add(struct gpio_chip *chip);
 void acpi_gpiochip_remove(struct gpio_chip *chip);
 
-void acpi_gpiochip_request_interrupts(struct gpio_chip *chip);
 void acpi_gpiochip_free_interrupts(struct gpio_chip *chip);
 
 int acpi_gpio_update_gpiod_flags(enum gpiod_flags *flags,
@@ -56,9 +55,6 @@ int acpi_gpio_count(struct device *dev, const char *con_id);
 static inline void acpi_gpiochip_add(struct gpio_chip *chip) { }
 static inline void acpi_gpiochip_remove(struct gpio_chip *chip) { }
 
-static inline void
-acpi_gpiochip_request_interrupts(struct gpio_chip *chip) { }
-
 static inline void
 acpi_gpiochip_free_interrupts(struct gpio_chip *chip) { }
 
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index e2480ef94c55..40b9f13d77e1 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -733,6 +733,18 @@ void gpiochip_unlock_as_irq(struct gpio_chip *chip, unsigned int offset);
 
 struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc);
 
+
+#ifdef CONFIG_GPIO_ACPI
+
+void acpi_gpiochip_request_interrupts(struct gpio_chip *chip);
+
+#else
+
+static inline void acpi_gpiochip_request_interrupts(struct gpio_chip *chip)
+{
+}
+
+#endif /* CONFIG_GPIO_ACPI */
 #else /* CONFIG_GPIOLIB */
 
 static inline struct gpio_chip *gpiod_to_chip(const struct gpio_desc *desc)
-- 
2.15.0.276.g89ea799


             reply	other threads:[~2019-12-04 10:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 10:10 Clement Leger [this message]
2019-12-04 12:35 ` [PATCH 1/5] gpio: export acpi_gpiochip_request_interrupts in gpio/driver.h Andy Shevchenko
2019-12-04 13:39   ` Clément Leger
2019-12-04 17:44     ` Andy Shevchenko

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=20191204101042.4275-2-cleger@kalray.eu \
    --to=cleger@kalray.eu \
    --cc=bgolaszewski@baylibre.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).