summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/exynos4-is
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-10-19 18:13:12 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-02 14:25:18 -0200
commitced197bdde4eb4bd1cda708d5a9aa5cf900d3272 (patch)
tree9eaf22ae8f400cc415749af45e96fb2508c4f7b9 /drivers/media/platform/exynos4-is
parentea3f1a3db379788806a7b18f4cb5ede16c11bb80 (diff)
downloadop-kernel-dev-ced197bdde4eb4bd1cda708d5a9aa5cf900d3272.zip
op-kernel-dev-ced197bdde4eb4bd1cda708d5a9aa5cf900d3272.tar.gz
[media] exynos4-is: Activate mipi-csis in probe() if runtime PM is disabled
Devices should also operate normally when runtime PM is not enabled. In case runtime PM is disabled activate the device already in probe(). Any related power domain needs to be then left permanently in active state by the platform. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/exynos4-is')
-rw-r--r--drivers/media/platform/exynos4-is/mipi-csis.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c
index 31dfc50..f3c3591 100644
--- a/drivers/media/platform/exynos4-is/mipi-csis.c
+++ b/drivers/media/platform/exynos4-is/mipi-csis.c
@@ -790,6 +790,7 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
#define s5pcsis_parse_dt(pdev, state) (-ENOSYS)
#endif
+static int s5pcsis_pm_resume(struct device *dev, bool runtime);
static const struct of_device_id s5pcsis_of_match[];
static int s5pcsis_probe(struct platform_device *pdev)
@@ -902,13 +903,21 @@ static int s5pcsis_probe(struct platform_device *pdev)
/* .. and a pointer to the subdev. */
platform_set_drvdata(pdev, &state->sd);
memcpy(state->events, s5pcsis_events, sizeof(state->events));
+
pm_runtime_enable(dev);
+ if (!pm_runtime_enabled(dev)) {
+ ret = s5pcsis_pm_resume(dev, true);
+ if (ret < 0)
+ goto e_m_ent;
+ }
dev_info(&pdev->dev, "lanes: %d, hs_settle: %d, wclk: %d, freq: %u\n",
state->num_lanes, state->hs_settle, state->wclk_ext,
state->clk_frequency);
return 0;
+e_m_ent:
+ media_entity_cleanup(&state->sd.entity);
e_clkdis:
clk_disable(state->clock[CSIS_CLK_MUX]);
e_clkput:
@@ -1014,7 +1023,7 @@ static int s5pcsis_remove(struct platform_device *pdev)
struct csis_state *state = sd_to_csis_state(sd);
pm_runtime_disable(&pdev->dev);
- s5pcsis_pm_suspend(&pdev->dev, false);
+ s5pcsis_pm_suspend(&pdev->dev, true);
clk_disable(state->clock[CSIS_CLK_MUX]);
pm_runtime_set_suspended(&pdev->dev);
s5pcsis_clk_put(state);
OpenPOWER on IntegriCloud