diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2018-01-09 17:58:46 -0800 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2018-01-10 14:21:25 +0100 |
commit | 64ff2c8e468ceff3cd678a4fa2edfc77dadc6bfe (patch) | |
tree | 0f055ee55152208e0f1614ff4acc01de3188ad2e /drivers/gpio | |
parent | 9961dbcd228e868224f5f725dfae69de739855dc (diff) |
gpiolib: Export gpiochip_irqchip_irq_valid() to drivers
Some pinctrl drivers can use the gpiochip irq valid information
to figure out if certain gpios are exposed to the kernel for
usage or not. Expose this API so we can use it in the
pinmux_ops::request ops.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpiolib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 0e78a5023cb2..94a5575d1ebe 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1501,14 +1501,15 @@ static void gpiochip_irqchip_free_valid_mask(struct gpio_chip *gpiochip) gpiochip->irq.valid_mask = NULL; } -static bool gpiochip_irqchip_irq_valid(const struct gpio_chip *gpiochip, - unsigned int offset) +bool gpiochip_irqchip_irq_valid(const struct gpio_chip *gpiochip, + unsigned int offset) { /* No mask means all valid */ if (likely(!gpiochip->irq.valid_mask)) return true; return test_bit(offset, gpiochip->irq.valid_mask); } +EXPORT_SYMBOL_GPL(gpiochip_irqchip_irq_valid); /** * gpiochip_set_cascaded_irqchip() - connects a cascaded irqchip to a gpiochip |