Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377297
b: refs/heads/master
c: 722a860
h: refs/heads/master
i:
  377295: 16abb86
v: v3
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Jun 19, 2013
1 parent 0fd9d97 commit 1723d28
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a908eb9936ba06678720226feed891d01827066f
refs/heads/master: 722a860ecb29aa34ec6f7d7f32b949209e86a2f3
26 changes: 8 additions & 18 deletions trunk/drivers/media/platform/exynos4-is/fimc-is.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,23 +834,11 @@ static int fimc_is_probe(struct platform_device *pdev)
goto err_clk;
}
pm_runtime_enable(dev);
/*
* Enable only the ISP power domain, keep FIMC-IS clocks off until
* the whole clock tree is configured. The ISP power domain needs
* be active in order to acces any CMU_ISP clock registers.
*/
ret = pm_runtime_get_sync(dev);
if (ret < 0)
goto err_irq;

ret = fimc_is_setup_clocks(is);
pm_runtime_put_sync(dev);

ret = pm_runtime_get_sync(dev);
if (ret < 0)
goto err_irq;

is->clk_init = true;

is->alloc_ctx = vb2_dma_contig_init_ctx(dev);
if (IS_ERR(is->alloc_ctx)) {
ret = PTR_ERR(is->alloc_ctx);
Expand All @@ -872,6 +860,8 @@ static int fimc_is_probe(struct platform_device *pdev)
if (ret < 0)
goto err_dfs;

pm_runtime_put_sync(dev);

dev_dbg(dev, "FIMC-IS registered successfully\n");
return 0;

Expand All @@ -891,9 +881,11 @@ static int fimc_is_probe(struct platform_device *pdev)
static int fimc_is_runtime_resume(struct device *dev)
{
struct fimc_is *is = dev_get_drvdata(dev);
int ret;

if (!is->clk_init)
return 0;
ret = fimc_is_setup_clocks(is);
if (ret)
return ret;

return fimc_is_enable_clocks(is);
}
Expand All @@ -902,9 +894,7 @@ static int fimc_is_runtime_suspend(struct device *dev)
{
struct fimc_is *is = dev_get_drvdata(dev);

if (is->clk_init)
fimc_is_disable_clocks(is);

fimc_is_disable_clocks(is);
return 0;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/media/platform/exynos4-is/fimc-is.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ struct fimc_is {
spinlock_t slock;

struct clk *clocks[ISS_CLKS_MAX];
bool clk_init;
void __iomem *regs;
void __iomem *pmu_regs;
int irq;
Expand Down

0 comments on commit 1723d28

Please sign in to comment.