diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2016-02-16 08:49:39 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-06-17 07:04:14 -0400 |
commit | c7b12cfddf7b4065a881b5890521a8a1a375924a (patch) | |
tree | fb8fa685ca168815087ccf8442cf28f6f31b8711 | |
parent | 1e6af546ee66b2870c5c21f4430910a27c26b5bb (diff) |
[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>
-rw-r--r-- | drivers/media/platform/vsp1/vsp1.h | 1 | ||||
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_drv.c | 20 |
2 files changed, 2 insertions, 19 deletions
diff --git a/drivers/media/platform/vsp1/vsp1.h b/drivers/media/platform/vsp1/vsp1.h index 9e09bce43cf3..37cc05e34de0 100644 --- a/drivers/media/platform/vsp1/vsp1.h +++ b/drivers/media/platform/vsp1/vsp1.h | |||
@@ -62,7 +62,6 @@ struct vsp1_device { | |||
62 | const struct vsp1_device_info *info; | 62 | const struct vsp1_device_info *info; |
63 | 63 | ||
64 | void __iomem *mmio; | 64 | void __iomem *mmio; |
65 | struct clk *clock; | ||
66 | 65 | ||
67 | struct vsp1_bru *bru; | 66 | struct vsp1_bru *bru; |
68 | struct vsp1_hsit *hsi; | 67 | struct vsp1_hsit *hsi; |
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) | |||
514 | 514 | ||
515 | static int vsp1_pm_runtime_suspend(struct device *dev) | 515 | static int vsp1_pm_runtime_suspend(struct device *dev) |
516 | { | 516 | { |
517 | struct vsp1_device *vsp1 = dev_get_drvdata(dev); | ||
518 | |||
519 | clk_disable_unprepare(vsp1->clock); | ||
520 | |||
521 | return 0; | 517 | return 0; |
522 | } | 518 | } |
523 | 519 | ||
@@ -526,16 +522,10 @@ static int vsp1_pm_runtime_resume(struct device *dev) | |||
526 | struct vsp1_device *vsp1 = dev_get_drvdata(dev); | 522 | struct vsp1_device *vsp1 = dev_get_drvdata(dev); |
527 | int ret; | 523 | int ret; |
528 | 524 | ||
529 | ret = clk_prepare_enable(vsp1->clock); | ||
530 | if (ret < 0) | ||
531 | return ret; | ||
532 | |||
533 | if (vsp1->info) { | 525 | if (vsp1->info) { |
534 | ret = vsp1_device_init(vsp1); | 526 | ret = vsp1_device_init(vsp1); |
535 | if (ret < 0) { | 527 | if (ret < 0) |
536 | clk_disable_unprepare(vsp1->clock); | ||
537 | return ret; | 528 | return ret; |
538 | } | ||
539 | } | 529 | } |
540 | 530 | ||
541 | return 0; | 531 | return 0; |
@@ -640,18 +630,12 @@ static int vsp1_probe(struct platform_device *pdev) | |||
640 | 630 | ||
641 | platform_set_drvdata(pdev, vsp1); | 631 | platform_set_drvdata(pdev, vsp1); |
642 | 632 | ||
643 | /* I/O, IRQ and clock resources */ | 633 | /* I/O and IRQ resources (clock managed by the clock PM domain) */ |
644 | io = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 634 | io = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
645 | vsp1->mmio = devm_ioremap_resource(&pdev->dev, io); | 635 | vsp1->mmio = devm_ioremap_resource(&pdev->dev, io); |
646 | if (IS_ERR(vsp1->mmio)) | 636 | if (IS_ERR(vsp1->mmio)) |
647 | return PTR_ERR(vsp1->mmio); | 637 | return PTR_ERR(vsp1->mmio); |
648 | 638 | ||
649 | vsp1->clock = devm_clk_get(&pdev->dev, NULL); | ||
650 | if (IS_ERR(vsp1->clock)) { | ||
651 | dev_err(&pdev->dev, "failed to get clock\n"); | ||
652 | return PTR_ERR(vsp1->clock); | ||
653 | } | ||
654 | |||
655 | irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | 639 | irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); |
656 | if (!irq) { | 640 | if (!irq) { |
657 | dev_err(&pdev->dev, "missing IRQ\n"); | 641 | dev_err(&pdev->dev, "missing IRQ\n"); |