From: t.stanislaws@samsung.com (Tomasz Stanislawski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 3/4] media: s5p-tv: Fix sdo driver to work with CCF
Date: Wed, 25 Sep 2013 17:59:45 +0200 [thread overview]
Message-ID: <52430871.6040003@samsung.com> (raw)
In-Reply-To: <1379775649-6331-4-git-send-email-m.krawczuk@partner.samsung.com>
Rename to 'media: s5p-tv: sdo: integrate with CCF'
On 09/21/2013 05:00 PM, Mateusz Krawczuk wrote:
> Replace clk_enable by clock_enable_prepare and clk_disable with clk_disable_unprepare.
> Clock prepare is required by Clock Common Framework, and old clock driver didn`t support it.
> Without it Common Clock Framework prints a warning.
>
> Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/media/platform/s5p-tv/sdo_drv.c | 20 ++++++++++++--------
> 1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/platform/s5p-tv/sdo_drv.c b/drivers/media/platform/s5p-tv/sdo_drv.c
> index e49ac6c..17272e1 100644
> --- a/drivers/media/platform/s5p-tv/sdo_drv.c
> +++ b/drivers/media/platform/s5p-tv/sdo_drv.c
> @@ -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);
>
WARNING: multiple messages have this Message-ID (diff)
From: Tomasz Stanislawski <t.stanislaws@samsung.com>
To: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
Cc: m.chehab@samsung.com, t.figa@samsung.com,
kyungmin.park@samsung.com, b.zolnierkie@samsung.com,
s.nawrocki@samsung.com, linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/4] media: s5p-tv: Fix sdo driver to work with CCF
Date: Wed, 25 Sep 2013 17:59:45 +0200 [thread overview]
Message-ID: <52430871.6040003@samsung.com> (raw)
In-Reply-To: <1379775649-6331-4-git-send-email-m.krawczuk@partner.samsung.com>
Rename to 'media: s5p-tv: sdo: integrate with CCF'
On 09/21/2013 05:00 PM, Mateusz Krawczuk wrote:
> Replace clk_enable by clock_enable_prepare and clk_disable with clk_disable_unprepare.
> Clock prepare is required by Clock Common Framework, and old clock driver didn`t support it.
> Without it Common Clock Framework prints a warning.
>
> Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/media/platform/s5p-tv/sdo_drv.c | 20 ++++++++++++--------
> 1 file changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/platform/s5p-tv/sdo_drv.c b/drivers/media/platform/s5p-tv/sdo_drv.c
> index e49ac6c..17272e1 100644
> --- a/drivers/media/platform/s5p-tv/sdo_drv.c
> +++ b/drivers/media/platform/s5p-tv/sdo_drv.c
> @@ -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);
>
next prev parent reply other threads:[~2013-09-25 15:59 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-21 15:00 [PATCH v5 0/4] media: s5p-tv: clean-up and fixes Mateusz Krawczuk
2013-09-21 15:00 ` Mateusz Krawczuk
2013-09-21 15:00 ` [PATCH v5 1/4] media: s5p-tv: Replace mxr_ macro by default dev_ Mateusz Krawczuk
2013-09-21 15:00 ` Mateusz Krawczuk
2013-09-23 14:50 ` Tomasz Stanislawski
2013-09-23 14:50 ` Tomasz Stanislawski
2013-09-23 15:48 ` Bartlomiej Zolnierkiewicz
2013-09-23 15:48 ` Bartlomiej Zolnierkiewicz
2013-09-23 17:44 ` Joe Perches
2013-09-23 17:44 ` Joe Perches
2013-09-24 12:52 ` Tomasz Stanislawski
2013-09-24 12:52 ` Tomasz Stanislawski
2013-09-24 15:35 ` Bartlomiej Zolnierkiewicz
2013-09-24 15:35 ` Bartlomiej Zolnierkiewicz
2013-09-24 16:24 ` Joe Perches
2013-09-24 16:24 ` Joe Perches
2013-09-24 9:43 ` Tomasz Stanislawski
2013-09-24 9:43 ` Tomasz Stanislawski
2013-09-24 10:33 ` Bartlomiej Zolnierkiewicz
2013-09-24 10:33 ` Bartlomiej Zolnierkiewicz
2013-09-24 13:02 ` Mauro Carvalho Chehab
2013-09-24 13:02 ` Mauro Carvalho Chehab
2013-09-21 15:00 ` [PATCH v5 2/4] media: s5p-tv: Restore vpll clock rate Mateusz Krawczuk
2013-09-21 15:00 ` Mateusz Krawczuk
2013-09-25 15:46 ` Tomasz Stanislawski
2013-09-25 15:46 ` Tomasz Stanislawski
2013-10-12 10:06 ` Sylwester Nawrocki
2013-10-12 10:06 ` Sylwester Nawrocki
2013-09-21 15:00 ` [PATCH v5 3/4] media: s5p-tv: Fix sdo driver to work with CCF Mateusz Krawczuk
2013-09-21 15:00 ` Mateusz Krawczuk
2013-09-25 15:59 ` Tomasz Stanislawski [this message]
2013-09-25 15:59 ` Tomasz Stanislawski
2013-10-12 10:25 ` Sylwester Nawrocki
2013-10-12 10:25 ` Sylwester Nawrocki
2013-09-21 15:00 ` [PATCH v5 4/4] media: s5p-tv: Fix mixer " Mateusz Krawczuk
2013-09-21 15:00 ` Mateusz Krawczuk
2013-09-23 12:44 ` Sylwester Nawrocki
2013-09-25 16:10 ` Tomasz Stanislawski
2013-09-25 16:09 ` Tomasz Stanislawski
2013-09-25 16:09 ` Tomasz Stanislawski
2013-10-12 10:27 ` Sylwester Nawrocki
2013-10-12 10:27 ` Sylwester Nawrocki
2013-09-23 3:52 ` [PATCH v5 0/4] media: s5p-tv: clean-up and fixes Sachin Kamat
2013-09-23 3:52 ` Sachin Kamat
2013-09-23 12:26 ` Tomasz Figa
2013-09-23 12:26 ` Tomasz Figa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52430871.6040003@samsung.com \
--to=t.stanislaws@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.