diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2016-02-16 16:49:39 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-06-17 14:04:14 +0300 |
commit | c7b12cfddf7b4065a881b5890521a8a1a375924a (patch) | |
tree | fb8fa685ca168815087ccf8442cf28f6f31b8711 /drivers/media/platform/vsp1/vsp1_drv.c | |
parent | 1e6af546ee66b2870c5c21f4430910a27c26b5bb (diff) | |
download | linux-c7b12cfddf7b4065a881b5890521a8a1a375924a.tar.xz |
[media] v4l: vsp1: Don't handle clocks manually
The power domain performs functional clock handling when using runtime
PM, there's no need to enable and disable the clock manually.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_drv.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_drv.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c index d6abc7f1216a..13907d4f08af 100644 --- a/drivers/media/platform/vsp1/vsp1_drv.c +++ b/drivers/media/platform/vsp1/vsp1_drv.c @@ -514,10 +514,6 @@ static int vsp1_pm_resume(struct device *dev) static int vsp1_pm_runtime_suspend(struct device *dev) { - struct vsp1_device *vsp1 = dev_get_drvdata(dev); - - clk_disable_unprepare(vsp1->clock); - return 0; } @@ -526,16 +522,10 @@ static int vsp1_pm_runtime_resume(struct device *dev) struct vsp1_device *vsp1 = dev_get_drvdata(dev); int ret; - ret = clk_prepare_enable(vsp1->clock); - if (ret < 0) - return ret; - if (vsp1->info) { ret = vsp1_device_init(vsp1); - if (ret < 0) { - clk_disable_unprepare(vsp1->clock); + if (ret < 0) return ret; - } } return 0; @@ -640,18 +630,12 @@ static int vsp1_probe(struct platform_device *pdev) platform_set_drvdata(pdev, vsp1); - /* I/O, IRQ and clock resources */ + /* I/O and IRQ resources (clock managed by the clock PM domain) */ io = platform_get_resource(pdev, IORESOURCE_MEM, 0); vsp1->mmio = devm_ioremap_resource(&pdev->dev, io); if (IS_ERR(vsp1->mmio)) return PTR_ERR(vsp1->mmio); - vsp1->clock = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(vsp1->clock)) { - dev_err(&pdev->dev, "failed to get clock\n"); - return PTR_ERR(vsp1->clock); - } - irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!irq) { dev_err(&pdev->dev, "missing IRQ\n"); |