Commit a889c115 authored by Mateusz Krawczuk's avatar Mateusz Krawczuk Committed by Mauro Carvalho Chehab

[media] s5p-tv: sdo: Prepare for common clock framework

Replace clk_enable() by clock_enable_prepare() and clk_disable()
with clk_disable_unprepare(). clk_{prepare/unprepare} calls are
required by common clock framework and this driver was missed while
converting all users of the Samsung original clocks driver to its
new implementation based on the common clock API.
Signed-off-by: default avatarMateusz Krawczuk <m.krawczuk@partner.samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
[s.nawrocki@samsung.com: edited commit description]
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0495d405
......@@ -208,9 +208,9 @@ static int sdo_streamon(struct sdo_device *sdev)
clk_get_rate(sdev->fout_vpll));
/* enable clock in SDO */
sdo_write_mask(sdev, SDO_CLKCON, ~0, SDO_TVOUT_CLOCK_ON);
ret = clk_enable(sdev->dacphy);
ret = clk_prepare_enable(sdev->dacphy);
if (ret < 0) {
dev_err(sdev->dev, "clk_enable(dacphy) failed\n");
dev_err(sdev->dev, "clk_prepare_enable(dacphy) failed\n");
goto fail;
}
/* enable DAC */
......@@ -229,7 +229,7 @@ static int sdo_streamoff(struct sdo_device *sdev)
int tries;
sdo_write_mask(sdev, SDO_DAC, 0, SDO_POWER_ON_DAC);
clk_disable(sdev->dacphy);
clk_disable_unprepare(sdev->dacphy);
sdo_write_mask(sdev, SDO_CLKCON, 0, SDO_TVOUT_CLOCK_ON);
for (tries = 100; tries; --tries) {
if (sdo_read(sdev, SDO_CLKCON) & SDO_TVOUT_CLOCK_READY)
......@@ -273,7 +273,7 @@ static int sdo_runtime_suspend(struct device *dev)
dev_info(dev, "suspend\n");
regulator_disable(sdev->vdet);
regulator_disable(sdev->vdac);
clk_disable(sdev->sclk_dac);
clk_disable_unprepare(sdev->sclk_dac);
return 0;
}
......@@ -285,7 +285,7 @@ static int sdo_runtime_resume(struct device *dev)
dev_info(dev, "resume\n");
ret = clk_enable(sdev->sclk_dac);
ret = clk_prepare_enable(sdev->sclk_dac);
if (ret < 0)
return ret;
......@@ -318,7 +318,7 @@ static int sdo_runtime_resume(struct device *dev)
vdac_r_dis:
regulator_disable(sdev->vdac);
dac_clk_dis:
clk_disable(sdev->sclk_dac);
clk_disable_unprepare(sdev->sclk_dac);
return ret;
}
......@@ -424,7 +424,11 @@ static int sdo_probe(struct platform_device *pdev)
}
/* enable gate for dac clock, because mixer uses it */
clk_enable(sdev->dac);
ret = clk_prepare_enable(sdev->dac);
if (ret < 0) {
dev_err(dev, "clk_prepare_enable(dac) failed\n");
goto fail_fout_vpll;
}
/* configure power management */
pm_runtime_enable(dev);
......@@ -463,7 +467,7 @@ static int sdo_remove(struct platform_device *pdev)
struct sdo_device *sdev = sd_to_sdev(sd);
pm_runtime_disable(&pdev->dev);
clk_disable(sdev->dac);
clk_disable_unprepare(sdev->dac);
clk_put(sdev->fout_vpll);
clk_put(sdev->dacphy);
clk_put(sdev->dac);
......
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