From: Shawn Guo <shawn.guo@freescale.com>
To: Liu Ying <Ying.Liu@freescale.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
linux-pwm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
kernel@pengutronix.de
Subject: Re: [PATCH] pwm: imx: set can_sleep flag for imx_pwm_v2
Date: Fri, 23 May 2014 15:05:07 +0800 [thread overview]
Message-ID: <20140523070501.GE32184@dragon> (raw)
In-Reply-To: <537EED44.7030906@freescale.com>
On Fri, May 23, 2014 at 02:40:04PM +0800, Liu Ying wrote:
> Hi Shawn,
>
> On 05/23/2014 01:48 PM, Shawn Guo wrote:
> > The .config() hook of imx_pwm_data_v2 calls clk_get_rate() which might
> > sleep, so we need to set can_sleep flag on it.
> >
> > Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
> > ---
> > drivers/pwm/pwm-imx.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
> > index d797c7b84c3f..ab3809fb36a7 100644
> > --- a/drivers/pwm/pwm-imx.c
> > +++ b/drivers/pwm/pwm-imx.c
> > @@ -272,6 +272,9 @@ static int imx_pwm_probe(struct platform_device *pdev)
> > imx->config = data->config;
> > imx->set_enable = data->set_enable;
> >
> > + if (data == &imx_pwm_data_v2)
> > + imx->chip.can_sleep = true;
> > +
> > ret = pwmchip_add(&imx->chip);
> > if (ret < 0)
> > return ret;
> >
>
> clk_prepare_enable()/clk_disable_unprepare() called in imx_pwm_config() may sleep.
>
> So, the can_sleep flag should be true for both i.MX PWM v1 and v2, right?
Yes, you're right. I missed that. Thanks for pointing it out.
Will send v2 shortly.
Shawn
prev parent reply other threads:[~2014-05-23 7:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 5:48 [PATCH] pwm: imx: set can_sleep flag for imx_pwm_v2 Shawn Guo
2014-05-23 6:40 ` Liu Ying
2014-05-23 7:05 ` Shawn Guo [this message]
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=20140523070501.GE32184@dragon \
--to=shawn.guo@freescale.com \
--cc=Ying.Liu@freescale.com \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.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).