summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorJianqun Xu <jay.xu@rock-chips.com>2020-10-13 09:37:30 +0300
committerLinus Walleij <linus.walleij@linaro.org>2020-11-04 17:00:28 +0300
commit63fbf8013b2f6430754526ef9594f229c7219b1f (patch)
tree00025caa87ffd892622116e9ff59bd4c64d085c7 /drivers/pinctrl
parentf83c2609079cde0bb3ad4c1da60f9c69c0ec8920 (diff)
downloadlinux-63fbf8013b2f6430754526ef9594f229c7219b1f.tar.xz
pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq
There need to enable pclk_gpio when do irq_create_mapping, since it will do access to gpio controller. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Kever Yang<kever.yang@rock-chips.com> Link: https://lore.kernel.org/r/20201013063731.3618-3-jay.xu@rock-chips.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-rockchip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 0401c1da79dd..7b398ed2113e 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -3155,7 +3155,9 @@ static int rockchip_gpio_to_irq(struct gpio_chip *gc, unsigned offset)
if (!bank->domain)
return -ENXIO;
+ clk_enable(bank->clk);
virq = irq_create_mapping(bank->domain, offset);
+ clk_disable(bank->clk);
return (virq) ? : -ENXIO;
}