[PATCH v3 2/3] pinctrl: rockchip: enable gpio pclk for rockchip_gpio_to_irq
Jianqun Xu
jay.xu at rock-chips.com
Tue Oct 13 02:37:30 EDT 2020
There need to enable pclk_gpio when do irq_create_mapping, since it will
do access to gpio controller.
Reviewed-by: Heiko Stuebner <heiko at sntech.de>
Signed-off-by: Jianqun Xu <jay.xu at rock-chips.com>
---
drivers/pinctrl/pinctrl-rockchip.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index 927d132d6716..a2f361aa6d05 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -3157,7 +3157,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;
}
--
2.17.1
More information about the Linux-rockchip
mailing list