linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@freescale.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Shawn Guo <shawn.guo@freescale.com>,
	linux-pwm@vger.kernel.org, Liu Ying <Ying.Liu@freescale.com>,
	kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] pwm: imx: set can_sleep flag for imx_pwm
Date: Fri, 23 May 2014 16:41:28 +0800	[thread overview]
Message-ID: <1400834488-2660-1-git-send-email-shawn.guo@freescale.com> (raw)

The .config() hook imx_pwm_config() calls clk APIs like clk_prepare()
and clk_get_rate(), which might sleep, so we need to set can_sleep flag
on pwm_chip.

Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
---
Changes since v1:
 - Set can_sleep flag for both imx_pwm_v1 and imx_pwm_v2

 drivers/pwm/pwm-imx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index d797c7b84c3f..5449d9150d40 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -262,6 +262,7 @@ static int imx_pwm_probe(struct platform_device *pdev)
 	imx->chip.dev = &pdev->dev;
 	imx->chip.base = -1;
 	imx->chip.npwm = 1;
+	imx->chip.can_sleep = true;
 
 	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	imx->mmio_base = devm_ioremap_resource(&pdev->dev, r);
-- 
1.8.3.2

             reply	other threads:[~2014-05-23  8:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-23  8:41 Shawn Guo [this message]
2014-05-23  8:43 ` [PATCH v2] pwm: imx: set can_sleep flag for imx_pwm Uwe Kleine-König
2014-05-23  9:03   ` Shawn Guo
2014-08-07 12:55 ` Thierry Reding

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=1400834488-2660-1-git-send-email-shawn.guo@freescale.com \
    --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).