Commit 2950da48 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[media] exynos4-is: add of_platform_populate() call for FIMC-IS child devices

Instead of relying on the "simple-bus" compatible and the driver core
populating FIMC-IS child devices make the fimc-is driver populating
its child devices.  This prevents issues related to accessing ISP_I2C
clock registers with corresponding power domain switched off, which
popped out after applying some pending IOMMU driver patches.  Now the
I2C_ISP child devices will be instantiated only when required parent
device drivers are initialized and ready.
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 056c61eb
...@@ -852,13 +852,18 @@ static int fimc_is_probe(struct platform_device *pdev) ...@@ -852,13 +852,18 @@ static int fimc_is_probe(struct platform_device *pdev)
goto err_pm; goto err_pm;
vb2_dma_contig_set_max_seg_size(dev, DMA_BIT_MASK(32)); vb2_dma_contig_set_max_seg_size(dev, DMA_BIT_MASK(32));
ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
if (ret < 0)
goto err_pm;
/* /*
* Register FIMC-IS V4L2 subdevs to this driver. The video nodes * Register FIMC-IS V4L2 subdevs to this driver. The video nodes
* will be created within the subdev's registered() callback. * will be created within the subdev's registered() callback.
*/ */
ret = fimc_is_register_subdevs(is); ret = fimc_is_register_subdevs(is);
if (ret < 0) if (ret < 0)
goto err_pm; goto err_of_dep;
ret = fimc_is_debugfs_create(is); ret = fimc_is_debugfs_create(is);
if (ret < 0) if (ret < 0)
...@@ -877,6 +882,8 @@ static int fimc_is_probe(struct platform_device *pdev) ...@@ -877,6 +882,8 @@ static int fimc_is_probe(struct platform_device *pdev)
fimc_is_debugfs_remove(is); fimc_is_debugfs_remove(is);
err_sd: err_sd:
fimc_is_unregister_subdevs(is); fimc_is_unregister_subdevs(is);
err_of_dep:
of_platform_depopulate(dev);
err_pm: err_pm:
if (!pm_runtime_enabled(dev)) if (!pm_runtime_enabled(dev))
fimc_is_runtime_suspend(dev); fimc_is_runtime_suspend(dev);
...@@ -936,6 +943,7 @@ static int fimc_is_remove(struct platform_device *pdev) ...@@ -936,6 +943,7 @@ static int fimc_is_remove(struct platform_device *pdev)
if (!pm_runtime_status_suspended(dev)) if (!pm_runtime_status_suspended(dev))
fimc_is_runtime_suspend(dev); fimc_is_runtime_suspend(dev);
free_irq(is->irq, is); free_irq(is->irq, is);
of_platform_depopulate(dev);
fimc_is_unregister_subdevs(is); fimc_is_unregister_subdevs(is);
vb2_dma_contig_clear_max_seg_size(dev); vb2_dma_contig_clear_max_seg_size(dev);
fimc_is_put_clocks(is); fimc_is_put_clocks(is);
......
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