|
|
@@ -709,7 +709,13 @@ static int zynq_gpio_probe(struct platform_device *pdev)
|
|
|
dev_err(&pdev->dev, "input clock not found.\n");
|
|
|
return PTR_ERR(gpio->clk);
|
|
|
}
|
|
|
+ ret = clk_prepare_enable(gpio->clk);
|
|
|
+ if (ret) {
|
|
|
+ dev_err(&pdev->dev, "Unable to enable clock.\n");
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
|
|
|
+ pm_runtime_set_active(&pdev->dev);
|
|
|
pm_runtime_enable(&pdev->dev);
|
|
|
ret = pm_runtime_get_sync(&pdev->dev);
|
|
|
if (ret < 0)
|
|
|
@@ -747,6 +753,7 @@ static int zynq_gpio_probe(struct platform_device *pdev)
|
|
|
pm_runtime_put(&pdev->dev);
|
|
|
err_pm_dis:
|
|
|
pm_runtime_disable(&pdev->dev);
|
|
|
+ clk_disable_unprepare(gpio->clk);
|
|
|
|
|
|
return ret;
|
|
|
}
|