From: Jianlong Huang Date: Thu, 7 Jul 2022 08:47:24 +0000 (+0800) Subject: pinctrl: starfive: Fix gpiomon erro X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21bd5e757e5df81f6f54009cd0c9e5feb9114070;p=platform%2Fkernel%2Flinux-starfive.git pinctrl: starfive: Fix gpiomon erro If enable CONFIG_PM, 'pm_runtime_get_sync' will return erro Signed-off-by: Jianlong Huang --- diff --git a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c index 3d3237c..56c7415 100755 --- a/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c +++ b/drivers/pinctrl/starfive/pinctrl-starfive-jh7110.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -895,6 +896,9 @@ static int starfive_jh7110_sys_gpio_register(struct platform_device *pdev, pctl->gc.irq.handler = handle_bad_irq; pctl->gc.irq.init_hw = starfive_jh7110_sys_init_hw; + if (IS_ENABLED(CONFIG_PM)) + pm_runtime_enable(dev); + ret = platform_get_irq(pdev, 0); if (ret < 0) return ret; @@ -1595,6 +1599,9 @@ static int starfive_jh7110_aon_gpio_register(struct platform_device *pdev, pctl->gc.irq.handler = handle_bad_irq; pctl->gc.irq.init_hw = starfive_jh7110_aon_init_hw; + if (IS_ENABLED(CONFIG_PM)) + pm_runtime_enable(dev); + ret = platform_get_irq(pdev, 0); if (ret < 0) return ret;