pwm: imx: set can_sleep flag for imx_pwm
Subsystems (2)
PATCH v2 1/1 pwm: imx: set can_sleep flag for imx_pwm
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.
---
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(+)
drivers/pwm/pwm-imx.c +1 -0
@@ -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);
Signature · 1 line
1.8.3.2
PATCH v2 1/1 pwm: imx: set can_sleep flag for imx_pwm
Quoted 3 lines · Shawn Guo
The .config() hook
imx_pwm_config()calls clk APIs likeclk_prepare()andclk_get_rate(), which might sleep, so we need to setcan_sleepflag onpwm_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
Uwe
Quoted 25 lines
Signed-off-by Shawn Guo <[email protected]>---
Changes since v1:
- Setcan_sleepflag for bothimx_pwm_v1andimx_pwm_v2drivers/pwm/pwm-imx.c | 1 + 1 file changed, 1 insertion(+)drivers/pwm/pwm-imx.c +1
-0@@ -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);Signature · 1 line
1.8.3.2
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH v2 1/1 pwm: imx: set can_sleep flag for imx_pwm
Quoted 6 lines · Uwe Kleine-K?nig
Quoted 3 lines · Shawn Guo
The .config() hook
imx_pwm_config()calls clk APIs likeclk_prepare()andclk_get_rate(), which might sleep, so we need to setcan_sleepflag onpwm_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
Thierry Reding
AppliedPATCH v2 1/1 pwm: imx: set can_sleep flag for imx_pwm
In reply to Shawn GuoQuoted 11 lines · Shawn Guo
The .config() hook
imx_pwm_config()calls clk APIs likeclk_prepare()andclk_get_rate(), which might sleep, so we need to setcan_sleepflag onpwm_chip.Signed-off-by Shawn Guo <[email protected]>---
Changes since v1:
- Setcan_sleepflag for bothimx_pwm_v1andimx_pwm_v2drivers/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>