* [PATCH v2] pwm: imx: set can_sleep flag for imx_pwm
@ 2014-05-23 8:41 Shawn Guo
2014-05-23 8:43 ` Uwe Kleine-König
2014-08-07 12:55 ` Thierry Reding
0 siblings, 2 replies; 4+ messages in thread
From: Shawn Guo @ 2014-05-23 8:41 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2] pwm: imx: set can_sleep flag for imx_pwm
2014-05-23 8:41 [PATCH v2] pwm: imx: set can_sleep flag for imx_pwm Shawn Guo
@ 2014-05-23 8:43 ` Uwe Kleine-König
2014-05-23 9:03 ` Shawn Guo
2014-08-07 12:55 ` Thierry Reding
1 sibling, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2014-05-23 8:43 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, May 23, 2014 at 04:41:28PM +0800, Shawn Guo wrote:
> 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.
Wasn't there a bug that was fixed or at least made more obvious with
this change? Is it worth mentioning in the commit log?
Otherwise
Acked-by: Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>
Uwe
>
> 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
>
>
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] pwm: imx: set can_sleep flag for imx_pwm
2014-05-23 8:43 ` Uwe Kleine-König
@ 2014-05-23 9:03 ` Shawn Guo
0 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2014-05-23 9:03 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, May 23, 2014 at 10:43:59AM +0200, Uwe Kleine-K?nig wrote:
> On Fri, May 23, 2014 at 04:41:28PM +0800, Shawn Guo wrote:
> > 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.
> Wasn't there a bug that was fixed or at least made more obvious with
> this change? Is it worth mentioning in the commit log?
The bug should be the one same as what we fixed on pwm-mxs[1]. But I
did not try to trigger it on pwm-imx myself, because it's obvious.
Shawn
[1] http://article.gmane.org/gmane.linux.pwm/570
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] pwm: imx: set can_sleep flag for imx_pwm
2014-05-23 8:41 [PATCH v2] pwm: imx: set can_sleep flag for imx_pwm Shawn Guo
2014-05-23 8:43 ` Uwe Kleine-König
@ 2014-08-07 12:55 ` Thierry Reding
1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2014-08-07 12:55 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, May 23, 2014 at 04:41:28PM +0800, Shawn Guo wrote:
> 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(+)
Applied, thanks.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140807/4e5cbc13/attachment.sig>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-07 12:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 8:41 [PATCH v2] pwm: imx: set can_sleep flag for imx_pwm Shawn Guo
2014-05-23 8:43 ` Uwe Kleine-König
2014-05-23 9:03 ` Shawn Guo
2014-08-07 12:55 ` Thierry Reding
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).