Commit c7b12cfd authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

[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: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 1e6af546
...@@ -62,7 +62,6 @@ struct vsp1_device { ...@@ -62,7 +62,6 @@ struct vsp1_device {
const struct vsp1_device_info *info; const struct vsp1_device_info *info;
void __iomem *mmio; void __iomem *mmio;
struct clk *clock;
struct vsp1_bru *bru; struct vsp1_bru *bru;
struct vsp1_hsit *hsi; struct vsp1_hsit *hsi;
......
...@@ -514,10 +514,6 @@ static int vsp1_pm_resume(struct device *dev) ...@@ -514,10 +514,6 @@ static int vsp1_pm_resume(struct device *dev)
static int vsp1_pm_runtime_suspend(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; return 0;
} }
...@@ -526,16 +522,10 @@ static int vsp1_pm_runtime_resume(struct device *dev) ...@@ -526,16 +522,10 @@ static int vsp1_pm_runtime_resume(struct device *dev)
struct vsp1_device *vsp1 = dev_get_drvdata(dev); struct vsp1_device *vsp1 = dev_get_drvdata(dev);
int ret; int ret;
ret = clk_prepare_enable(vsp1->clock);
if (ret < 0)
return ret;
if (vsp1->info) { if (vsp1->info) {
ret = vsp1_device_init(vsp1); ret = vsp1_device_init(vsp1);
if (ret < 0) { if (ret < 0)
clk_disable_unprepare(vsp1->clock);
return ret; return ret;
}
} }
return 0; return 0;
...@@ -640,18 +630,12 @@ static int vsp1_probe(struct platform_device *pdev) ...@@ -640,18 +630,12 @@ static int vsp1_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, vsp1); 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); io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
vsp1->mmio = devm_ioremap_resource(&pdev->dev, io); vsp1->mmio = devm_ioremap_resource(&pdev->dev, io);
if (IS_ERR(vsp1->mmio)) if (IS_ERR(vsp1->mmio))
return PTR_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); irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!irq) { if (!irq) {
dev_err(&pdev->dev, "missing IRQ\n"); dev_err(&pdev->dev, "missing IRQ\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment