pwm: imx: set can_sleep flag for imx_pwm
authorShawn Guo <shawn.guo@freescale.com>
Fri, 23 May 2014 08:41:28 +0000 (16:41 +0800)
committerThierry Reding <thierry.reding@gmail.com>
Thu, 7 Aug 2014 11:22:44 +0000 (13:22 +0200)
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>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-imx.c

index d797c7b84c3feb4b23bd2c2d21651902eda6784f..5449d9150d40d245fdd2380ca291ca53aa2b0b31 100644 (file)
@@ -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);