From: Thierry Reding <thierry.reding@avionic-design.de>
To: Philip Avinash <avinashphilip@ti.com>
Cc: paul@pwsan.com, linux@arm.linux.org.uk, b-cousson@ti.com,
tony@atomide.com, nsekhar@ti.com, linux-kernel@vger.kernel.org,
hvaibhav@ti.com, gururaja.hebbar@ti.com, vaibhav.bedia@ti.com,
anilkumar@ti.com, linux-omap@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/7] pwm: pwm-tiehrpwm: Update the clock handling of pwm-tiehrpwm driver
Date: Wed, 2 Jan 2013 14:38:43 +0100 [thread overview]
Message-ID: <20130102133843.GA4414@avionic-0098.adnet.avionic-design.de> (raw)
In-Reply-To: <1357133094-30806-4-git-send-email-avinashphilip@ti.com>
[-- Attachment #1.1: Type: text/plain, Size: 1227 bytes --]
On Wed, Jan 02, 2013 at 06:54:50PM +0530, Philip Avinash wrote:
> The clock framework has changed and it's now better to invoke
> clock_prepare_enable() and clk_disable_unprepare() rather than the
> legacy clk_enable() and clk_disable() calls. This patch converts the
> pwm-tiehrpwm driver to the new framework.
>
> Signed-off-by: Philip Avinash <avinashphilip@ti.com>
> Cc: Thierry Reding <thierry.reding@avionic-design.de>
> ---
> In 3.8-rc1, common clock frame work support added to AM335x.
>
> drivers/pwm/pwm-tiehrpwm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
> index 72a6dd4..af6f162 100644
> --- a/drivers/pwm/pwm-tiehrpwm.c
> +++ b/drivers/pwm/pwm-tiehrpwm.c
> @@ -341,7 +341,7 @@ static int ehrpwm_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm)
> configure_polarity(pc, pwm->hwpwm);
>
> /* Enable TBCLK before enabling PWM device */
> - clk_enable(pc->tbclk);
> + clk_prepare_enable(pc->tbclk);
I apparently didn't catch this before, but maybe it would be useful to
check the return value here to make sure we only proceed if the clock
can actually be enabled.
Thierry
[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2013-01-02 13:38 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-02 13:24 [PATCH 0/7] HWMOD fixes for AM33xx PWM submodules and device tree nodes Philip Avinash
2013-01-02 13:24 ` [PATCH 1/7] ARM: OMAP: AM33xx hwmod: Corrects PWM subsystem HWMOD entries Philip Avinash
2013-02-08 15:10 ` Paul Walmsley
2013-02-08 15:14 ` Hiremath, Vaibhav
2013-02-12 6:57 ` Philip, Avinash
2013-01-02 13:24 ` [PATCH 2/7] ARM: OMAP: AM33xx hwmod: Add parent-child relationship for PWM subsystem Philip Avinash
2013-01-02 13:24 ` [PATCH 3/7] pwm: pwm-tiehrpwm: Update the clock handling of pwm-tiehrpwm driver Philip Avinash
2013-01-02 13:38 ` Thierry Reding [this message]
2013-01-10 4:11 ` Philip, Avinash
2013-01-02 13:24 ` [PATCH 4/7] ARM: AM33XX: clk: Add clock node for EHRPWM TBCLK Philip Avinash
2013-02-08 15:06 ` Paul Walmsley
2013-02-12 6:55 ` Philip, Avinash
2013-01-02 13:24 ` [PATCH 5/7] ARM: dts: AM33XX: Add PWMSS device tree nodes Philip Avinash
2013-01-02 13:24 ` [PATCH 6/7] ARM: dts: AM33XX: Add PWM backlight DT data to am335x-evm Philip Avinash
2013-01-02 13:24 ` [PATCH 7/7] ARM: dts: AM33XX: Add PWM backlight DT data to am335x-evmsk Philip Avinash
2013-01-10 4:10 ` [PATCH 0/7] HWMOD fixes for AM33xx PWM submodules and device tree nodes Philip, Avinash
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=20130102133843.GA4414@avionic-0098.adnet.avionic-design.de \
--to=thierry.reding@avionic-design.de \
--cc=anilkumar@ti.com \
--cc=avinashphilip@ti.com \
--cc=b-cousson@ti.com \
--cc=gururaja.hebbar@ti.com \
--cc=hvaibhav@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=nsekhar@ti.com \
--cc=paul@pwsan.com \
--cc=tony@atomide.com \
--cc=vaibhav.bedia@ti.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).